Licensed license file and licensed / unlicensed machines

In the VS2010 solution, I have a license.licx file that contains:

DataDynamics.ActiveReports.ActiveReport, ActiveReports6, Version=6.1.2814.0, Culture=neutral, PublicKeyToken=cc4967777c49a3ff DataDynamics.ActiveReports.Web.WebViewer, ActiveReports.Web, Version=6.1.2814.0, Culture=neutral, PublicKeyToken=cc4967777c49a3ff DataDynamics.ActiveReports.Export.Pdf.PdfExport, ActiveReports.PdfExport, Version=6.1.2814.0, Culture=neutral, PublicKeyToken=cc4967777c49a3ff DataDynamics.ActiveReports.Design.Designer, ActiveReports.Design6, Version=6.1.2814.0, Culture=neutral, PublicKeyToken=cc4967777c49a3ff DataDynamics.ActiveReports.Viewer.Viewer, ActiveReports.Viewer6, Version=6.1.2814.0, Culture=neutral, PublicKeyToken=cc4967777c49a3ff 

If I create a solution on a machine that has a license for ActiveReport, then everything is fine. If I create a solution on a machine that does not have a license for ActiveReport, I get:

Error 1 'Failed to load the file or assembly' ActiveReports6, Version = 6.1.2814.0, Culture = neutral, PublicKeyToken = cc4967777c49a3ff 'or one of its dependencies. The operation is not supported. (Exception from HRESULT: 0x80131515) 'LC

On a machine that does NOT have a license for ActiveReport, if I delete the above lines from the license.licx file, then everything builds in order. I always thought that if the license is not found, the unlicensed version will be used, but it will not kill the assembly. How to get this build solution on any computer, regardless of whether it is licensed or not?

+4
source share
4 answers

Contact ActiveReports and they told me that a license file can be supported for each user, regardless of whether they have a paid license or not. The trick is that users who will not generate reports need to install a trial license (which ActiveReports provides for free), and users who paid for the license will have their own license. A forensic license, like a real paid license, will process the license.licx file and will provide the correct action when it sees the record that it recognizes in the .licx file.

+3
source

In fact, it seems that there is no ActiveReports version installed on this machine.

We solve such problems by keeping external assemblies in the path relative to the project (i.e. .. \ Assemblies) and changing all projects to include HintPath, for example:

 <Reference Include="ActiveReports3"> <SpecificVersion>False</SpecificVersion> <HintPath>..\..\..\..\Assemblies\ActiveReports3.dll</HintPath> </Reference> 

Thus, you do not need to worry about the fact that every developer has the same version. You should be able to debug this configuration, but not create it for release.

Update

I forgot to mention another practice that we are implementing: if a component does not require this (we only have one that I can recall from my head), we never store the version in the license.licx file. Our license.licx command for the above example:

 DataDynamics.ActiveReports.ActiveReport3, ActiveReports3 

If you do this, you need to save the license.licx file, but it definitely fixes various version problems.

+3
source

If I build the solution on a machine that does not have a license for ActiveReport, I get

This is part of the problem. As a rule, licensing requires a license from each developer. Attempting to license only part of your development team is likely to violate your ActiveReports license.

+2
source

It is normal to use a trial version of ActiveReports as you describe. I saw a number of problems with licensing Visual Studio with various components. Usually they can be solved by following these steps:

  • Clean up solution using Build> Clean
  • Delete licx file (Visual Studio will generate this file as needed).
  • Add the ARViewer control to the form in your project (you can delete it later). This must be done on a machine with a valid ActiveReports license. And this is what should initiate the restoration of the licx file with the correct information.
  • Rebuild (make sure that you are performing a real rebuild, I know that this should be a clean + build, but rebuilding seems important sometimes).

Other than that, just make sure your links are correct. For example, make sure that you do not have several versions of the DLL mentioned in different projects as part of the solution, and make sure that “Copy local” and “Use specific version” as you expect.

If you still have problems creating a new project, add ActiveReports (or any other component you are having problems with) and make a quick hello world application to make sure it works correctly and then compare the two project (links, files, etc.).

+1
source

Source: https://habr.com/ru/post/1384151/


All Articles