{"id":375,"date":"2011-01-05T19:24:34","date_gmt":"2011-01-05T19:24:34","guid":{"rendered":"http:\/\/poojanwagh.opalstacked.com\/techblog\/?p=375"},"modified":"2011-01-05T19:27:13","modified_gmt":"2011-01-05T19:27:13","slug":"fail-on-ironruby-1-1-hacking-the-configuration-app-config-or-exe-config-file-location","status":"publish","type":"post","link":"https:\/\/tech.poojanblog.com\/blog\/progamming\/fail-on-ironruby-1-1-hacking-the-configuration-app-config-or-exe-config-file-location\/","title":{"rendered":"Fail on IronRuby 1.1: hacking the configuration (app.config or exe.config) file location"},"content":{"rendered":"<p>Summary: I can&#8217;t get IronRuby to over-ride where it gets its <code>app.config<\/code> file.<\/p>\n<p>Because I&#8217;m glutton for punishment, I decided to try out IronRuby to do some dev work in .NET. I went with the latest IronRuby, which is in .NET 4.0&#8211;mostly because it integrates with Visual Studio 2010.<\/p>\n<p>One of my first stumbling blocks is that by default, you can&#8217;t call .NET 2.0 assemblies from .NET 4.0. To enable such cross-calling, you <a title=\"F# Scripting, .NET 4.0 and Mixed-mode assemblies, by Jomo Fisher\" href=\"http:\/\/blogs.msdn.com\/b\/jomo_fisher\/archive\/2009\/11\/17\/f-scripting-net-4-0-and-mixed-mode-assemblies.aspx\">need to have an app.config<\/a> that looks like so:<\/p>\n<p><code lang=\"xml\"><br \/>\n<configuration><br \/>\n  <startup useLegacyV2RuntimeActivationPolicy=\"true\"><br \/>\n    <supportedRuntime version=\"v4.0\"\/><br \/>\n  <\/startup><br \/>\n<\/configuration><br \/>\n<\/code><\/p>\n<p>That&#8217;s great, but where do I put this? I wouldn&#8217;t mind changing the global <code>ir.exe.config<\/code> file, but I can&#8217;t find that with IronRuby 1.1. I found a solution here: <a href=\"http:\/\/vaderpi.com\/blog\/?p=609\">IronRuby and the Configuration (app.config or exe.config) \u00ab vaderpi&#8217;s random rants<\/a>. The author warns that it is a hack and probably won&#8217;t work with newer .NET versions. That is the case. I can&#8217;t get it to work on .NET 4.0.<\/p>\n<p>If I had it to do over again, I might&#8217;ve gone with IronPython&#8211;which have latest releases for .NET 2.0SP1 and .NET 4.0. I don&#8217;t know if either (or both) of these integrate with Visual Studio 2010.<\/p>\n<div class='wp_likes' id='wp_likes_post-375'><a class='like' href=\"javascript:wp_likes.like(375);\" title='' ><img data-recalc-dims=\"1\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/tech.poojanblog.com\/blog\/wp-content\/plugins\/wp-likes\/images\/like.png\" alt='' border='0'\/><\/a><span class='text'>Be the first to like.<\/span><\/p>\n<div class='like' ><a href=\"javascript:wp_likes.like(375);\">Like<\/a><\/div>\n<div class='unlike' ><a href=\"javascript:wp_likes.unlike(375);\">Unlike<\/a><\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Summary: I can&#8217;t get IronRuby to over-ride where it gets its file. Because I&#8217;m glutton for punishment, I decided to try out IronRuby to do some dev work in .NET. I went with the latest IronRuby, which is in .NET 4.0&#8211;mostly because it integrates with Visual Studio 2010. One of my first stumbling blocks is [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[48],"tags":[],"class_list":["post-375","post","type-post","status-publish","format-standard","hentry","category-progamming"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/tech.poojanblog.com\/blog\/wp-json\/wp\/v2\/posts\/375","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tech.poojanblog.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tech.poojanblog.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tech.poojanblog.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/tech.poojanblog.com\/blog\/wp-json\/wp\/v2\/comments?post=375"}],"version-history":[{"count":19,"href":"https:\/\/tech.poojanblog.com\/blog\/wp-json\/wp\/v2\/posts\/375\/revisions"}],"predecessor-version":[{"id":394,"href":"https:\/\/tech.poojanblog.com\/blog\/wp-json\/wp\/v2\/posts\/375\/revisions\/394"}],"wp:attachment":[{"href":"https:\/\/tech.poojanblog.com\/blog\/wp-json\/wp\/v2\/media?parent=375"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tech.poojanblog.com\/blog\/wp-json\/wp\/v2\/categories?post=375"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tech.poojanblog.com\/blog\/wp-json\/wp\/v2\/tags?post=375"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}