Licensing and MS Team Build/Building on server
dwilliams
Posts: 6
I am not certain this issue falls within the domain of what you can support, but any help you can give will help. I have a problem (I believe) with the licesnse files while performing a build via Team Foundation Server. I have an application that uses/references the RedGate Toolkit dlls, and uses the license.licx as described in other posts. I am able to build and run locally, however building via Team Foundation Server on the server generates the following error. I should note RedGate Dlls are referenced via the GAC, and have been added to the build machine.
licenses.licx(1,0): error LC0004: Exception occurred creating type 'RedGate.SQLCompare.Engine.Database, RedGate.SQLCompare.Engine, Version=5.2.0.32, Culture=neutral, PublicKeyToken=7f465a1c156d4d57' System.InvalidOperationException: Showing a modal dialog box or form when the application is not running in UserInteractive mode is not a valid operation. Specify the ServiceNotification or DefaultDesktopOnly style to display a notification from a service application.
licenses.licx(1,0): error LC0004: Exception occurred creating type 'RedGate.SQLCompare.Engine.Database, RedGate.SQLCompare.Engine, Version=5.2.0.32, Culture=neutral, PublicKeyToken=7f465a1c156d4d57' System.InvalidOperationException: Showing a modal dialog box or form when the application is not running in UserInteractive mode is not a valid operation. Specify the ServiceNotification or DefaultDesktopOnly style to display a notification from a service application.
Comments
To get around this I built the solution manually. I used a command window and the MSBuild command to build the solution contiaining the Red Gate .dll references. The license verification dialog came up, and I was able to verify my License. After validating the license once, TFS was able to perform builds without an issue.
Genius! I would have suggested the website workaround, because putting toolkit functionality in a website will result in the same 'modal dialogue' error. What you can do to circumvent this is compile a console application (say, one of those in Toolkit Sample Files). This will create a SQL Toolkit_v5.lic file, which you can put in the output folder for the project and continue re-using this file for all Toolkit projects built on the same machine. If the .lic file is present, you will not be prompted to enter a serial number and therefore not get the 'modal dialogue'.