<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.artinsoft.net/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Mauricio Rojas Blog : VB.NET, VisualStudio</title><link>http://blogs.artinsoft.net/mrojas/archive/tags/VB.NET/VisualStudio/default.aspx</link><description>Tags: VB.NET, VisualStudio</description><dc:language>en</dc:language><generator>CommunityServer 2007.1 (Build: 20917.1142)</generator><item><title>Code compiles but System.IO.FileNotFound Exception is thrown</title><link>http://blogs.artinsoft.net/mrojas/archive/2009/10/02/code-compiles-but-system-io-filenotfound-exception-is-thrown.aspx</link><pubDate>Fri, 02 Oct 2009 22:04:37 GMT</pubDate><guid isPermaLink="false">871fd81c-a111-489f-851d-e9637b8e2ce4:1999</guid><dc:creator>Mrojas</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.artinsoft.net/mrojas/rsscomments.aspx?PostID=1999</wfw:commentRss><comments>http://blogs.artinsoft.net/mrojas/archive/2009/10/02/code-compiles-but-system-io-filenotfound-exception-is-thrown.aspx#comments</comments><description>&lt;p&gt;We have seen a situation that can be a little annoying.    &lt;br /&gt;I usually find that situation in ASP.NET projects, but it can also happen in Winforms.    &lt;br /&gt;&lt;/p&gt;  &lt;p&gt;The issue is like this:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;You have a VStudio Solution&lt;/li&gt;    &lt;li&gt;You have added all the needed references&lt;/li&gt;    &lt;li&gt;All your code compiles&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;font size="5"&gt;BUT&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;When you run the application it terminates at a certain point with a    &lt;br /&gt;FileNotFound exception indicating that the assembly &lt;em&gt;blablabla&lt;/em&gt;&amp;#160; or one of its    &lt;br /&gt;dependencies could not be loaded.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;font color="#800000" size="5"&gt;&lt;strong&gt;Whats hapenning!!!&lt;/strong&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;Do this:&lt;/p&gt;  &lt;p&gt;1) Look at the bin\debug or bin\release and make sure that the assembly is in those directories.&lt;/p&gt;  &lt;p&gt;2) If the assembly is not there, then go to the project references in the solution explorer, right click and select properties and set the Copy Local Setting&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.artinsoft.net/public_img/Codecompil.FileNotFoundExceptionisthrown_D401/image.png"&gt;&lt;img title="image" style="border-right:0px;border-top:0px;display:inline;border-left:0px;border-bottom:0px;" height="302" alt="image" src="http://blogs.artinsoft.net/public_img/Codecompil.FileNotFoundExceptionisthrown_D401/image_thumb.png" width="322" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://blogs.artinsoft.net/aggbug.aspx?PostID=1999" width="1" height="1"&gt;</description><category domain="http://blogs.artinsoft.net/mrojas/archive/tags/VIsual+Basic+.NET/default.aspx">VIsual Basic .NET</category><category domain="http://blogs.artinsoft.net/mrojas/archive/tags/VB6+Migration/default.aspx">VB6 Migration</category><category domain="http://blogs.artinsoft.net/mrojas/archive/tags/C_2300_/default.aspx">C#</category><category domain="http://blogs.artinsoft.net/mrojas/archive/tags/Visual+Studio/default.aspx">Visual Studio</category><category domain="http://blogs.artinsoft.net/mrojas/archive/tags/BUGS/default.aspx">BUGS</category><category domain="http://blogs.artinsoft.net/mrojas/archive/tags/VB.NET/default.aspx">VB.NET</category><category domain="http://blogs.artinsoft.net/mrojas/archive/tags/References/default.aspx">References</category><category domain="http://blogs.artinsoft.net/mrojas/archive/tags/VisualStudio/default.aspx">VisualStudio</category></item></channel></rss>