
Support for signed assembly
Posted Sunday, 30 November, 2008 - 10:19 by xaudio2| Project: | The Open Toolkit library |
| Version: | 0.9.9-2b |
| Component: | Code |
| Category: | task |
| Priority: | critical |
| Assigned: | the Fiddler |
| Status: | closed |
Jump to:
Description
At present it isn't possible to use the library in signed programs (openTK is not signed, unfortunately).
My attempts to generate such a version of openTK from the source code are ending or with errors during the compilation, or with errors in the runtime process.


Comments
#1
What kind of errors did you encounter? How did you try to sign the assembly?
If you are using Visual Studio, simply generate the OpenTK solution (
Build/Build.exe vs) and use the VS GUI to sign the assembly (Project Properties -> Signing).We are looking into signing future OpenTK releases.
As a sidenote, Microsoft does not recommend signing exe assemblies to avoid the issues you have encountered:
" In general, you should avoid strong-naming application EXE assemblies. A strongly named application or component cannot reference a weak-named component. Therefore, strong-naming an EXE prevents the EXE from referencing weak-named DLLs that are deployed with the application.
For this reason, the Visual Studio project system does not strong-name application EXEs. Instead, it strong-names the Application manifest, which internally points to the weak-named application EXE. "
#2
Today I solve a problem and sign the library.
My application works correctly with signed openTK 0.9.1!
In relation to exe files I will agree. But OpenTK is a library and should cooperate correctly with any application.
It is only possible when library is signed (All libraries of the mentioned above company are signed :) )
#3
I agree that OpenTK should ship signed assemblies. The only thing holding this back is lacking msbuild support on Mono (xbuild cannot currently build OpenTK).
#4
#5
Bumping priority.
#6
#7
I have added strong names to my working copy of OpenTK trunk. Still need to update Build.exe to generate temporary key-pairs on fresh SVN checkouts.
Does anyone know whether it is possible to generate key-pairs programmatically? In the worst case, this can be done by invoking Sn.exe but it would be slightly nicer to do this through code, if possible.
#8
Fixed in rev. 2217. All official releases starting from 0.9.9-2 will be signed.
If you wish to sign a modified version of OpenTK, add a file named 'OpenTK.snk' to the root directory of OpenTK and recreate OpenTK.sln using Build.exe. Rebuild OpenTK - it will now be signed with your custom key.
If 'OpenTK.snk' is not found, OpenTK binaries will not be signed.
If you are distributing a modified version of OpenTK, you are encouraged to sign it with your personal key (use the same key for OpenTK and your application).
You can create a new keyfile using the sn utility that comes with the .Net framework:
#9
Closing issues fixed in 0.9.9-2.