Here's an answer from Dino on my team:
Thanks,
-John
He needs to define SIGNED when building (Microsoft.Scripting) and update the public key in ScriptEnvironmentSetup.cs which currently looks like:
#if SIGNED
new LanguageProviderSetup("IronPython.Hosting.PythonLanguageProvider", "IronPython, Version=2.0.0.400, Culture=neutral, PublicKeyToken=31bf3856ad364e35", ".py", "py", "python", "ironpython"),
new LanguageProviderSetup("Microsoft.JScript.Compiler.Hosting.LanguageProvider", "Microsoft.JScript.Compiler, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35", ".jsx", ".js", "managedjscript", "js", "jscript"),
new LanguageProviderSetup("Ruby.Hosting.RubyLanguageProvider", "Ruby, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35", ".rb", "rb", "ruby", "ironruby"),
new LanguageProviderSetup("Microsoft.VisualBasic.Scripting.Hosting.VisualBasicLanguageProvider", "Microsoft.VisualBasic.Scripting, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35", ".vbx", "vbx"),
#else
new LanguageProviderSetup("IronPython.Hosting.PythonLanguageProvider", "IronPython", ".py", "py", "python", "ironpython"),
new LanguageProviderSetup("Microsoft.JScript.Compiler.Hosting.LanguageProvider", "Microsoft.JScript.Compiler", ".jsx", ".js", "managedjscript", "js", "jscript"),
new LanguageProviderSetup("Microsoft.VisualBasic.Scripting.Hosting.VisualBasicLanguageProvider", "Microsoft.VisualBasic.Scripting", ".vbx", "vbx"),
new LanguageProviderSetup("Ruby.Hosting.RubyLanguageProvider", "Ruby", ".rb", "rb", "ruby", "ironruby")
#endif
From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Stefan Hüttenrauch
Sent: Wednesday, September 26, 2007 9:29 AM
To: ironruby-core at rubyforge.org
Subject: [Ironruby-core] problems with strongly named assemblies
Hi together,
I tried to assign a strong name to the IronRuby DLLs to be used with Sharepoint.
Therefore I opened the IronRuby.sln in VS2005 and changed the properties of every reference project to use src/microsoft.scripting/DebugKey.snk as a keyfile to sign the assembly, b/c it was the only key file I found.
Doing so I got an error message building the solution (Referenced Assembly Ruby does not have a strong name). So it seems that signing the Ruby project/assembly doesn't work.
My second attempt was to generate a new keypair with sn.exe referencing it in the ruby project properties and treating it isolated from the IronRuby solution. No success.
I then tried ildasm followed by ilasm using a self-generated keypair file for the Microsoft.Scripting.dll first and after another build the Ruby.dll. It worked, at least I could copy the dlls to my global assembly cache. But!! Referencing both dlls in a VS2005 project threw the following exception right after starting the application:
Could not load file or assembly 'Microsoft.Scripting, Version=1.0.0.400, Culture=neutral, PublicKeyToken=null' or one of its dependencies. A strongly-named assembly is required.
Now I am wondering why something is still asking for an assembly with PublicKeyToken=null, since both Ruby.dll and Microsoft.Scripting.dll are signed with a strong name.
Do you have any advice?
Did I take the wrong way somewhere?
Looking forward to an answer...
Stefan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/ironruby-core/attachments/20070926/f6fc22c4/attachment-0001.html