{"id":5160,"date":"2014-03-30T19:17:47","date_gmt":"2014-03-30T19:17:47","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/programmatically-specify-which-version-of-net-to-load-collection-of-common-programming-errors\/"},"modified":"2014-03-30T19:17:47","modified_gmt":"2014-03-30T19:17:47","slug":"programmatically-specify-which-version-of-net-to-load-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/programmatically-specify-which-version-of-net-to-load-collection-of-common-programming-errors\/","title":{"rendered":"Programmatically specify which version of .NET to load-Collection of common programming errors"},"content":{"rendered":"<p>My application is a native, non-.NET application. However, at times it may need to invoke some .NET services through COM. Sometimes it needs to load a specific version of .NET to accomplish what it needs to do. (My app uses a COM interface to <code>System.EnterpriseServices<\/code> in order to programmatically register assemblies and install them in the GAC).<\/p>\n<p>Normally, I could use <code>MyApp.exe.config<\/code> (as explained here) if this information was known ahead of time and didn&#8217;t change between runs.<\/p>\n<p>Unfortunately, the specific version of .NET to load will not be known until runtime (and in fact, may change between runs on the same system). Therefore using <code>MyApp.exe.config<\/code> will not work.<\/p>\n<p>Is there a way for a native application to supply this information to Windows programmatically before it loads .NET?<\/p>\n<p>(Though my application is written in Delphi, this is more of a general Windows question and answers in any language would be welcome)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>My application is a native, non-.NET application. However, at times it may need to invoke some .NET services through COM. Sometimes it needs to load a specific version of .NET to accomplish what it needs to do. (My app uses a COM interface to System.EnterpriseServices in order to programmatically register assemblies and install them in [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-5160","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/5160","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=5160"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/5160\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=5160"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=5160"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=5160"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}