Login  
Search All Forums
Dart Home | PowerSNMP for .NET | Custom Development Reply | PowerSNMP for .NET Topics | Forums   
AuthorForum: PowerSNMP for .NET
Topic: License Exception when building w/MSBUILD
AndrewSmith

From: Lakewood, CO USA
Posts: 7
Member Since: 12/20/07
posted March 12, 2008 5:49 PM

I'm trying to build a project i had built on my computer on our build box and I'm getting an error when msbuild tries to build it via Cruise Control. The exception is below.
When i open the solution in vs2008 it builds fine with no errors.

Any ideas? I believe the license is installed correctly or i wouldn't be able to build in VS2008.

<error code="LC0004" message="Exception occurred creating type 'Dart.PowerSNMP.Agent, Dart.PowerSNMP, Version=1.0.4.3, Culture=neutral, PublicKeyToken=5966291b8955e4bb' System.ComponentModel.LicenseException: PowerSNMP for .NET does not have a license installed. Please register your license by running the Registration utility found in the PowerSNMP Program Menu Group." dir="" name="licenses.licx" pos="(1, 0)" />
Arjun

From: Rome, NY, USA
Posts: 137
Member Since: 09/17/07
posted March 13, 2008 11:35 AM

Hello Andrew,

My best guess here is that the licenses.licx file is not being included in the project when the application is build using MSBuild. The reason being is that the MSBuild uses a different user (which is different from the user who installed the product and registered it).
Therefore you may log in on the machine with the user that MSBuild uses to build the application and register the product.

Regards,
Arjun
AndrewSmith

From: Lakewood, CO USA
Posts: 7
Member Since: 12/20/07
posted March 13, 2008 2:34 PM

Great, thank you hadn't thought that the CruiseControl which kicks off msbuild was running as another user. I switched that and all is working now.

Thank you!
Arjun

From: Rome, NY, USA
Posts: 137
Member Since: 09/17/07
posted March 13, 2008 5:00 PM

Thanks for updating.

~Arjun
rniedzwiecki

From: USA
Posts: 1
Member Since: 11/01/16
posted November 1, 2016 2:18 PM

I have a similar situation using Jenkins for automated builds. On the build box I installed and registered Dart.PowerTcp.Ftp using my login credentials. I can successfully build my solution in VS2015. I can also successfully build my solution in a command prompt using msbuild (both directly or in a batch file). But when a Jenkins job tries the same msbuild command or batch file, I get the LicenseException mentioned in earlier post. I checked and found the job is executed with NT AUTHORITY\SYSTEM (built-in account used by most services; higher access than admin).

I reduced the build effort of the solution to a single command in a batch that only executes the LicenseCompiler (LC.exe). The command executes successfully into a .license file when I login with my credentials, but the external job executing the same batch results in the exception (doesn't see the installed license).

Since the built-in account (w/o access to password) is automatically used, I can't login with that account to re-register the product, as suggested in earlier post.

Any thoughts?

Can I login as myself and generate the .license resource file once, and then have the daily build job simply link the resource file in the DLL project where it is directly referenced/used (instead of .licx files on the build box)?
Does it also have to be linked in the top-level EXE project that uses the above DLL (with product reference)?

Regards,
Rich
Reply | PowerSNMP for .NET Topics | Forums   
This site is powered by PowerTCP WebServer Tool PowerTCP WebServer for ActiveX