[Ironruby-core] problems with strongly named assemblies

Stefan Hüttenrauch stefan.huettenrauch at hpi.uni-potsdam.de
Thu Sep 27 10:14:09 EDT 2007

Hi again,

I moved forward on my way to include IronRuby within a WebPart for SharePoint
I included some code that calls IronRuby (like re.ExecuteCommand("something");)
but wasn't able to prove if it is working.
Trying to create a file or displaying a messageBox on rendering the WebPart did
nothing visible. The MessageBox didn't appear neither did the file.

Do you have any ideas on what I can use in order to produce a visible output
from within a WebPart for SharePoint.




From: ironruby-core-bounces at rubyforge.org
[mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of John Lam (DLR)
Sent: Mittwoch, 26. September 2007 18:41
To: ironruby-core at rubyforge.org
Subject: Re: [Ironruby-core] problems with strongly named assemblies


Here’s an answer from Dino on my team:






He needs to define SIGNED when building (Microsoft.Scripting) and update the
public key in ScriptEnvironmentSetup.cs which currently looks like:



LanguageProviderSetup("IronPython.Hosting.PythonLanguageProvider", "IronPython,
Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35", ".py",
"py", "python", "ironpython"),

"Microsoft.JScript.Compiler, Version=, Culture=neutral,
PublicKeyToken=31bf3856ad364e35", ".jsx", ".js", "managedjscript", "js",

LanguageProviderSetup("Ruby.Hosting.RubyLanguageProvider", "Ruby,
Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35", ".rb",
"rb", "ruby", "ironruby"),

ageProvider", "Microsoft.VisualBasic.Scripting, Version=,
Culture=neutral, PublicKeyToken=31bf3856ad364e35", ".vbx", "vbx"),


"IronPython", ".py", "py", "python", "ironpython"),

"Microsoft.JScript.Compiler", ".jsx", ".js", "managedjscript", "js",

ageProvider", "Microsoft.VisualBasic.Scripting", ".vbx", "vbx"),

LanguageProviderSetup("Ruby.Hosting.RubyLanguageProvider", "Ruby", ".rb", "rb",
"ruby", "ironruby")






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
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=,
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...


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/ironruby-core/attachments/20070927/a442ce05/attachment.html 

More information about the Ironruby-core mailing list