Checking library development time

I have a library that I would like to license and distribute.

I know how to license a class / library to execute. In fact, I have done this several times. I know how to license a user control. I have also done this several times.

What alerted me was how to license the library (which does not have a control or drag and drop component) for development. How do you license a library for development time?

Any thoughts / hints?

+4
source share
2 answers

I finally found the answer. This is not as obvious as I thought it would be.

Instead of looking for DesignTime or RunTime attributes, you need to see if a debugger is connected.

Drop it in the constructor (with the appropriate attributes in your class) and you're off and running!

 if (System.Diagnostics.Debugger.IsAttached) { License L = LicenseManager.Validate(typeof(MyControl), this); } 

code>

I hope this helps someone else with the same problem!

- Jerry

+6
source

You can use LibraryManager.UsageMode to determine if you are working during development. I assume that you want to check the debugging execution also from the answer you posted.

-one
source

All Articles