{"id":4269,"date":"2014-03-30T09:35:00","date_gmt":"2014-03-30T09:35:00","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/referencing-external-assemblies-from-powershell-snap-in-collection-of-common-programming-errors\/"},"modified":"2014-03-30T09:35:00","modified_gmt":"2014-03-30T09:35:00","slug":"referencing-external-assemblies-from-powershell-snap-in-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/referencing-external-assemblies-from-powershell-snap-in-collection-of-common-programming-errors\/","title":{"rendered":"Referencing external assemblies from PowerShell snap-in-Collection of common programming errors"},"content":{"rendered":"<p><strong>SOLUTION (Posting it here as suggested by one of the comments to my question)<\/strong><\/p>\n<p>My problem was rather specific, as I&#8217;m developing on a 64 bits server machine, but I&#8217;m posting the solution in case it could help someone else as well.<\/p>\n<p>Using <code>fuslogvw<\/code> as suggested, I saw that the dependent assembly was being searched using the <code>machine.config<\/code> file under <code>C:\\Windows\\Microsoft.NET\\Framework64<\/code> and then the binding failed; launching the project with &#8220;start without debugging&#8221;, instead, the <code>machine.config<\/code> file under <code>C:\\Windows\\Microsoft.NET\\Framework<\/code> was taken (notice the missing <code>64<\/code> at the end).<\/p>\n<p>I thought that the problem could be due to the image format, and infact the dependent assembly was being compiled with x86 as CPU target; I changed it to &#8220;Any CPU&#8221; and now the assembly is loaded correctly.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>SOLUTION (Posting it here as suggested by one of the comments to my question) My problem was rather specific, as I&#8217;m developing on a 64 bits server machine, but I&#8217;m posting the solution in case it could help someone else as well. Using fuslogvw as suggested, I saw that the dependent assembly was being searched [&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-4269","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/4269","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=4269"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/4269\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=4269"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=4269"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=4269"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}