# Error Executing C# Example Using IronRuby and Cucumber

**URL:** <https://www.ruby-forum.com/t/error-executing-c-example-using-ironruby-and-cucumber/175938>\
**Category:** IronRuby\
**Created:** [September 23, 2009, 12:54am UTC](https://www.ruby-forum.com/t/error-executing-c-example-using-ironruby-and-cucumber/175938 "2009-09-23T00:54:27Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![metanoize](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/9fc29f/32.png) [@metanoize](https://www.ruby-forum.com/u/metanoize)\
**Post date:** [September 23, 2009, 12:54am UTC](https://www.ruby-forum.com/t/error-executing-c-example-using-ironruby-and-cucumber/175938/1 "2009-09-23T00:54:27Z")

</div>

Here is the message:  
This is the default example which is hosted on  
[http://wiki.github.com/aslakhellesoy/cucumber/ironruby-and-net](http://wiki.github.com/aslakhellesoy/cucumber/ironruby-and-net)

C:\ruby\lib\ruby\gems\1.8\gems\cucumber-0.3.101\examples\cs\>compile.bat

C:\ruby\lib\ruby\gems\1.8\gems\cucumber-0.3.101\examples\cs\>csc  
/target:library  
/out:Calculator.dll src\demo\Calculator.cs  
fatal error CS2018: Unable to find messages file ‘cscompui.dll’

C:\ruby\lib\ruby\gems\1.8\gems\cucumber-0.3.101\examples\cs\>compile.bat

C:\ruby\lib\ruby\gems\1.8\gems\cucumber-0.3.101\examples\cs\>csc  
/target:library  
/out:Calculator.dll src\demo\Calculator.cs  
fatal error CS2018: Unable to find messages file ‘cscompui.dll’

C:\ruby\lib\ruby\gems\1.8\gems\cucumber-0.3.101\examples\cs\>icucumber  
features  
no such file to load – Calculator  
Failed to load features/step\_definitons/calculator\_steps.rb (LoadError)  
C:\DevTools\IronRuby\ironruby\Merlin\Main\Languages\Ruby\Libraries.LCA\_RESTRICTE  
D\Builtins\KernelOps.cs:1341:in `require' custom_require.rb:30:in `require’  
polyglot.rb:69:in `require' ./features/step_definitons/calculator_steps.rb:3 C:\DevTools\IronRuby\ironruby\Merlin\Main\Languages\Ruby\Libraries.LCA_RESTRICTE D\Builtins\KernelOps.cs:1341:in `require’  
c:/ruby/lib/ruby/gems/1.8/gems/cucumber-0.3.101/bin/…/lib/cucumber/rb\_support/r  
b\_language.rb:101:in `load_code_file' custom_require.rb:30:in `require’  
c:/ruby/lib/ruby/gems/1.8/gems/cucumber-0.3.101/bin/…/lib/cucumber/rb\_support/r  
b\_language.rb:46:in `step_definitions_for' polyglot.rb:69:in `require’  
c:/ruby/lib/ruby/gems/1.8/gems/cucumber-0.3.101/bin/…/lib/cucumber/step\_mother.  
rb:118:in `load_code_file' c:/ruby/lib/ruby/gems/1.8/gems/cucumber-0.3.101/bin/../lib/cucumber/step_mother. rb:110:in `load\_code\_files’  
c:/ruby/lib/ruby/gems/1.8/gems/cucumber-0.3.101/bin/…/lib/cucumber/step\_mother.  
rb:109:in `load_code_files' c:/ruby/lib/ruby/gems/1.8/gems/cucumber-0.3.101/bin/../lib/cucumber/cli/main.rb: 48:in `execute!’  
c:/ruby/lib/ruby/gems/1.8/gems/cucumber-0.3.101/bin/…/lib/cucumber/cli/main.rb:  
23:in `execute' C:\DevTools\IronRuby\ironruby\Merlin\Main\Languages\Ruby\Libraries.LCA_RESTRICTE D\Extensions\IListOps.cs:810:in `each’  
c:/ruby/lib/ruby/gems/1.8/gems/cucumber-0.3.101/bin/cucumber:9  
c:/ruby/bin/cucumber:19  
C:\DevTools\IronRuby\ironruby\Merlin\Main\Languages\Ruby\Libraries.LCA\_RESTRICTE  
D\Builtins\KernelOps.cs:1326:in `load’

C:\ruby\lib\ruby\gems\1.8\gems\cucumber-0.3.101\examples\cs\>

Thanks,  
Azam

---

<div class="post-metadata">

**Author:** ![metanoize](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/9fc29f/32.png) [@metanoize](https://www.ruby-forum.com/u/metanoize)\
**Post date:** [September 23, 2009, 12:54am UTC](https://www.ruby-forum.com/t/error-executing-c-example-using-ironruby-and-cucumber/175938/2 "2009-09-23T00:54:27Z")

</div>

csc.exe is failing. Doing a web search,  
[http://support.liquid-technologies.com/KB/a42/application-fails-to-run.aspx](http://support.liquid-technologies.com/KB/a42/application-fails-to-run.aspx)  
mentions that your .NET installation may be corrupt. You need to figure  
out how to get the csc command to work on your machine. The failure is  
not related to IronRuby. Subsequent commands in the Cucumber example  
will fail only because Calculator.dll was not compiled successfully.

From: removed\_email\_address@domain.invalid  
[[mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)] On Behalf Of Mohammad A.  
Sent: Tuesday, September 22, 2009 12:08 PM  
To: removed\_email\_address@domain.invalid  
Subject: [Ironruby-core] Error Executing C# Example Using IronRuby and  
Cucumber

Here is the message:

This is the default example which is hosted on  
[http://wiki.github.com/aslakhellesoy/cucumber/ironruby-and-net](http://wiki.github.com/aslakhellesoy/cucumber/ironruby-and-net)

C:\ruby\lib\ruby\gems\1.8\gems\cucumber-0.3.101\examples\cs\>compile.bat

C:\ruby\lib\ruby\gems\1.8\gems\cucumber-0.3.101\examples\cs\>csc  
/target:library  
/out:Calculator.dll src\demo\Calculator.cs  
fatal error CS2018: Unable to find messages file ‘cscompui.dll’

C:\ruby\lib\ruby\gems\1.8\gems\cucumber-0.3.101\examples\cs\>compile.bat

C:\ruby\lib\ruby\gems\1.8\gems\cucumber-0.3.101\examples\cs\>csc  
/target:library  
/out:Calculator.dll src\demo\Calculator.cs  
fatal error CS2018: Unable to find messages file ‘cscompui.dll’

C:\ruby\lib\ruby\gems\1.8\gems\cucumber-0.3.101\examples\cs\>icucumber  
features  
no such file to load – Calculator  
Failed to load features/step\_definitons/calculator\_steps.rb (LoadError)  
C:\DevTools\IronRuby\ironruby\Merlin\Main\Languages\Ruby\Libraries.LCA\_RESTRICTE  
D\Builtins\KernelOps.cs:1341:in `require' custom_require.rb:30:in `require’  
polyglot.rb:69:in `require' ./features/step_definitons/calculator_steps.rb:3 C:\DevTools\IronRuby\ironruby\Merlin\Main\Languages\Ruby\Libraries.LCA_RESTRICTE D\Builtins\KernelOps.cs:1341:in `require’  
c:/ruby/lib/ruby/gems/1.8/gems/cucumber-0.3.101/bin/…/lib/cucumber/rb\_support/r  
b\_language.rb:101:in `load_code_file' custom_require.rb:30:in `require’  
c:/ruby/lib/ruby/gems/1.8/gems/cucumber-0.3.101/bin/…/lib/cucumber/rb\_support/r  
b\_language.rb:46:in `step_definitions_for' polyglot.rb:69:in `require’  
c:/ruby/lib/ruby/gems/1.8/gems/cucumber-0.3.101/bin/…/lib/cucumber/step\_mother.  
rb:118:in `load_code_file' c:/ruby/lib/ruby/gems/1.8/gems/cucumber-0.3.101/bin/../lib/cucumber/step_mother. rb:110:in `load\_code\_files’  
c:/ruby/lib/ruby/gems/1.8/gems/cucumber-0.3.101/bin/…/lib/cucumber/step\_mother.  
rb:109:in `load_code_files' c:/ruby/lib/ruby/gems/1.8/gems/cucumber-0.3.101/bin/../lib/cucumber/cli/main.rb: 48:in `execute!’  
c:/ruby/lib/ruby/gems/1.8/gems/cucumber-0.3.101/bin/…/lib/cucumber/cli/main.rb:  
23:in `execute' C:\DevTools\IronRuby\ironruby\Merlin\Main\Languages\Ruby\Libraries.LCA_RESTRICTE D\Extensions\IListOps.cs:810:in `each’  
c:/ruby/lib/ruby/gems/1.8/gems/cucumber-0.3.101/bin/cucumber:9  
c:/ruby/bin/cucumber:19  
C:\DevTools\IronRuby\ironruby\Merlin\Main\Languages\Ruby\Libraries.LCA\_RESTRICTE  
D\Builtins\KernelOps.cs:1326:in `load’

C:\ruby\lib\ruby\gems\1.8\gems\cucumber-0.3.101\examples\cs\>

Thanks,  
Azam

–  
Mohammad A.  
MVP (Microsoft Valuable Professional)  
[www.highoncoding.com](http://www.highoncoding.com)[http://www.highoncoding.com](http://www.highoncoding.com)  
[www.azamsharp.com](http://www.azamsharp.com)[http://www.azamsharp.com](http://www.azamsharp.com)

---

<div class="post-metadata">

**Author:** ![metanoize](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/9fc29f/32.png) [@metanoize](https://www.ruby-forum.com/u/metanoize)\
**Post date:** [September 23, 2009, 2:28am UTC](https://www.ruby-forum.com/t/error-executing-c-example-using-ironruby-and-cucumber/175938/3 "2009-09-23T02:28:14Z")

</div>

I got it to work by manually running csc.exe. It solved the problem.

---

<div class="post-metadata">

**Author:** ![metanoize](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/9fc29f/32.png) [@metanoize](https://www.ruby-forum.com/u/metanoize)\
**Post date:** [September 23, 2009, 2:28am UTC](https://www.ruby-forum.com/t/error-executing-c-example-using-ironruby-and-cucumber/175938/4 "2009-09-23T02:28:14Z")

</div>

Looks like the compile isn’t even working. This is a bit strange…Could  
you  
try getting cucumber from the git repo and try to compile from the  
examples  
dir there first?  
[http://github.com/aslakhellesoy/cucumber](http://github.com/aslakhellesoy/cucumber)

[http://github.com/aslakhellesoy/cucumber](http://github.com/aslakhellesoy/cucumber)Best Regards,  
Kevin R.

---

<div class="post-metadata">

**Author:** ![metanoize](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/9fc29f/32.png) [@metanoize](https://www.ruby-forum.com/u/metanoize)\
**Post date:** [September 23, 2009, 6:40am UTC](https://www.ruby-forum.com/t/error-executing-c-example-using-ironruby-and-cucumber/175938/5 "2009-09-23T06:40:04Z")

</div>

Actually I got it to work by manually firing the csc.exe compiler to  
compile  
the Calculator.cs into an assembly. It works fine now!

On Tue, Sep 22, 2009 at 2:22 PM, Kevin R.
