Compartilhar via


Cannot use Visual Studio Unit Tests to test against a live SharePoint 2007 site if on a 64-bit machine

I scoured Bing (and Google) to find out why my Visual Studio unit tests will not allow me to test my SharePoint code failing with the message:

Initialization method Contoso.Test.BreakingNewsTest threw exception.System.IO.FileNotFoundException: System.IO.FileNotFoundException:The Web application at https://intranet.contoso.com/ could not be found. Verify that you have typed the URL correctly. If the URL should be serving existing content, the system administrator may need to add a new request URL mapping to the intended application.

I finally asked a colleague of mine (Jeremy Jameson) how he resolved it. Thankfully, he's already created an excellent post on it here: https://blogs.msdn.com/jjameson/archive/2009/10/08/web-application-at-could-not-be-found-error-on-moss-2007-x64.aspx