SharePoint – System.IO.FileNotFound Error in Console Application
Monday, February 28th, 2011I was working on a console app that would use the SharePoint API to manage/validate some site settings. After writing out the “skeleton” of the application I tried to debug it with Visual Studio to make sure everything was working so far.When the application hit the first call that referenced the SharePoint API it would throw a System.IO.FileNotFound exception.
I searched around as I couldn’t understand what could be causing this. My executing account had full Rights in SharePoint, the local system and access to the database. I checked to ensure the url I was using was correct and that everything worked when viewing the site using a browser. Then I realized that Visual Studio by default sets Console applications to target x86 by default!!
