<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://bloggingabout.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>Search results matching tags 'Object Model' and 'Visual Studio'</title><link>http://bloggingabout.net/search/SearchResults.aspx?a=1&amp;o=DateDescending&amp;tag=Object+Model,Visual+Studio&amp;orTags=0</link><description>Search results matching tags 'Object Model' and 'Visual Studio'</description><dc:language>en-US</dc:language><generator>CommunityServer 2008.5 SP2 (Build: 40407.4157)</generator><item><title>Console application new SPSite throws a FileNotFoundException</title><link>http://bloggingabout.net/blogs/bas/archive/2010/12/24/console-application-new-spsite-throws-a-filenotfoundexception.aspx</link><pubDate>Fri, 24 Dec 2010 09:09:00 GMT</pubDate><guid isPermaLink="false">813b6dfd-644e-4573-a816-eebab56ba0d0:484465</guid><dc:creator>Bas</dc:creator><description>&lt;p&gt;A collegue of mine had the following problem: he wanted to write a console application to test some SharePoint code, but whenever he opened a new SPSite, the following File Not Found Exception was thrown:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://bloggingabout.net/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/bas/6866.FileNotFoundException.png"&gt;&lt;img height="244" width="669" src="http://bloggingabout.net/resized-image.ashx/__size/550x0/__key/CommunityServer.Blogs.Components.WeblogFiles/bas/6866.FileNotFoundException.png" border="0" alt="" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;after being triggered about a possible problem with&amp;nbsp; the wrong Target Framework, as Visual Studio defaults to .Net 4.0 as target framework, I remembered some wise words that were spoken during the Dutch SharePoint Connections 2010:&lt;/p&gt;
&lt;p&gt;&amp;quot;When you are building a console app to work with SharePoint 2010, &lt;em&gt;never&lt;/em&gt; forget to change your Platform target from x86 to x64! And I can tell you: You &lt;em&gt;will &lt;/em&gt;forget it&amp;quot;&lt;/p&gt;
&lt;p&gt;Changing this platform target to x64 was (of course) &amp;nbsp;the solution to the problem:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://bloggingabout.net/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/bas/8156.changeplatform.png"&gt;&lt;img src="http://bloggingabout.net/resized-image.ashx/__size/550x0/__key/CommunityServer.Blogs.Components.WeblogFiles/bas/8156.changeplatform.png" border="0" alt="" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;My suggestion to him: buy a lot in the lottery, as he can forsee the future ;)&lt;/p&gt;</description></item></channel></rss>