Hi, After building IronRuby with the ''rake compile config=release'' option (according to http://ironruby.rubyforge.org/wiki/wiki.pl?BuildingIronRuby), I am having problems with >>> require ''System.Windows.Forms''...this is what I get from the interpreter: Ruby.Runtime.LoadError: Could not load file or assembly ''System.Windows.Forms'' o r one of its dependencies. The system cannot find the file specified. ---> Syste m.IO.FileNotFoundException: Could not load file or assembly ''System.Windows.Form s'' or one of its dependencies. The system cannot find the file specified. File name: ''System.Windows.Forms'' at System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, E vidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Bool ean throwOnFileNotFound, Boolean forIntrospection) at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) at System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence as semblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) at System.Reflection.Assembly.Load(String assemblyString) at Microsoft.Scripting.Hosting.PlatformAdaptationLayer.LoadAssembly(String na me) at Ruby.Runtime.Loader.InternalLoadModule(String path, LoadFlags loadFlags, F ileKind& kind, SourceUnit& sourceUnit, Assembly& assembly) at Ruby.Runtime.Loader.LoadModule(CodeContext context, Object self, String pa th, LoadFlags flags) I ran IronRubyTestHost.exe without problems but when I run ''rake test'', I get the following: ** Invoke test (first_time) ** Invoke happy (first_time) ** Execute happy ** Invoke test_libs (first_time) ** Execute test_libs "C:\NETPrj\IronRuby\build\debug\rbx.exe" "test_dir.rb" rake aborted! undefined method `exitstatus'' for nil:NilClass c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:730:in `sh'' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:737:in `call'' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:737:in `sh'' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:816:in `sh'' C:/NETPrj/IronRuby/rakefile:195:in `exec'' C:/NETPrj/IronRuby/rakefile:201:in `exec_net'' C:/NETPrj/IronRuby/rakefile:556 C:/NETPrj/IronRuby/rakefile:556:in `each'' C:/NETPrj/IronRuby/rakefile:556 C:/NETPrj/IronRuby/rakefile:554:in `chdir'' C:/NETPrj/IronRuby/rakefile:554 C:/NETPrj/IronRuby/rakefile:553:in `each'' C:/NETPrj/IronRuby/rakefile:553 c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:399:in `call'' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:399:in `execute'' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:399:in `each'' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:399:in `execute'' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:369:in `invoke'' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:362:in `synchronize'' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:362:in `invoke'' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:376:in `invoke_prerequisit es'' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:1021:in `each'' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:1021:in `send'' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:1021:in `each'' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:375:in `invoke_prerequisit es'' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:368:in `invoke'' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:362:in `synchronize'' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:362:in `invoke'' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:1935:in `run'' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:1935:in `each'' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:1935:in `run'' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.2/bin/rake:7 c:/ruby/bin/rake.bat:20:in `load'' c:/ruby/bin/rake.bat:20 Sorry for the long email...but can someone help? Thanks! nfe -- Posted via http://www.ruby-forum.com/.
Try using the strong name: C:\lang\IronRuby\Build\Release>rbx IronRuby Pre-Alpha (1.0.0.0) on .NET 2.0.50727.1378 Copyright (c) Microsoft Corporation. All rights reserved.>>> require ''System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089''=> true>>>I got that info from C:\Windows\Assembly (if you don''t already have it memorized. ;)) Cory -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of N. F. Sent: Friday, November 23, 2007 7:42 PM To: ironruby-core at rubyforge.org Subject: [Ironruby-core] unable to load ''System.Windows.Forms'' Hi, After building IronRuby with the ''rake compile config=release'' option (according to http://ironruby.rubyforge.org/wiki/wiki.pl?BuildingIronRuby), I am having problems with >>> require ''System.Windows.Forms''...this is what I get from the interpreter: Ruby.Runtime.LoadError: Could not load file or assembly ''System.Windows.Forms'' o r one of its dependencies. The system cannot find the file specified. ---> Syste m.IO.FileNotFoundException: Could not load file or assembly ''System.Windows.Form s'' or one of its dependencies. The system cannot find the file specified. File name: ''System.Windows.Forms'' at System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, E vidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Bool ean throwOnFileNotFound, Boolean forIntrospection) at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) at System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence as semblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) at System.Reflection.Assembly.Load(String assemblyString) at Microsoft.Scripting.Hosting.PlatformAdaptationLayer.LoadAssembly(String na me) at Ruby.Runtime.Loader.InternalLoadModule(String path, LoadFlags loadFlags, F ileKind& kind, SourceUnit& sourceUnit, Assembly& assembly) at Ruby.Runtime.Loader.LoadModule(CodeContext context, Object self, String pa th, LoadFlags flags) I ran IronRubyTestHost.exe without problems but when I run ''rake test'', I get the following: ** Invoke test (first_time) ** Invoke happy (first_time) ** Execute happy ** Invoke test_libs (first_time) ** Execute test_libs "C:\NETPrj\IronRuby\build\debug\rbx.exe" "test_dir.rb" rake aborted! undefined method `exitstatus'' for nil:NilClass c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:730:in `sh'' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:737:in `call'' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:737:in `sh'' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:816:in `sh'' C:/NETPrj/IronRuby/rakefile:195:in `exec'' C:/NETPrj/IronRuby/rakefile:201:in `exec_net'' C:/NETPrj/IronRuby/rakefile:556 C:/NETPrj/IronRuby/rakefile:556:in `each'' C:/NETPrj/IronRuby/rakefile:556 C:/NETPrj/IronRuby/rakefile:554:in `chdir'' C:/NETPrj/IronRuby/rakefile:554 C:/NETPrj/IronRuby/rakefile:553:in `each'' C:/NETPrj/IronRuby/rakefile:553 c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:399:in `call'' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:399:in `execute'' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:399:in `each'' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:399:in `execute'' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:369:in `invoke'' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:362:in `synchronize'' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:362:in `invoke'' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:376:in `invoke_prerequisit es'' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:1021:in `each'' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:1021:in `send'' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:1021:in `each'' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:375:in `invoke_prerequisit es'' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:368:in `invoke'' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:362:in `synchronize'' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:362:in `invoke'' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:1935:in `run'' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:1935:in `each'' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:1935:in `run'' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.2/bin/rake:7 c:/ruby/bin/rake.bat:20:in `load'' c:/ruby/bin/rake.bat:20 Sorry for the long email...but can someone help? Thanks! nfe -- Posted via http://www.ruby-forum.com/. _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core
Cory Foy wrote:> Try using the strong name: > > C:\lang\IronRuby\Build\Release>rbx > IronRuby Pre-Alpha (1.0.0.0) on .NET 2.0.50727.1378 > Copyright (c) Microsoft Corporation. All rights reserved. >>>> require ''System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'' > => true >>>> > > I got that info from C:\Windows\Assembly (if you don''t already have it > memorized. ;)) > > CoryThanks Cory! That did the trick...now to memorize or resort to the good ole cut and paste when using the interactive console... -- Posted via http://www.ruby-forum.com/.
Dino Viehland
2007-Nov-28 03:39 UTC
[Ironruby-core] unable to load ''System.Windows.Forms''
In IronPython we''ll fall back to LoadWithPartialName which allows clr.AddReference(''System.Windows.Forms'') to work. Maybe IronRuby should consider doing the same thing? ________________________________________ From: ironruby-core-bounces at rubyforge.org [ironruby-core-bounces at rubyforge.org] On Behalf Of N. F. [lists at ruby-forum.com] Sent: Tuesday, November 27, 2007 7:37 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] unable to load ''System.Windows.Forms'' Cory Foy wrote:> Try using the strong name: > > C:\lang\IronRuby\Build\Release>rbx > IronRuby Pre-Alpha (1.0.0.0) on .NET 2.0.50727.1378 > Copyright (c) Microsoft Corporation. All rights reserved. >>>> require ''System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'' > => true >>>> > > I got that info from C:\Windows\Assembly (if you don''t already have it > memorized. ;)) > > CoryThanks Cory! That did the trick...now to memorize or resort to the good ole cut and paste when using the interactive console... -- Posted via http://www.ruby-forum.com/. _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core