InfoPath code behind won't build in x64
I've just moved to an x64 Server 2008 R2 based development machine for my SharePoint goings on. I've discovered that when calling the SharePoint object model SPSite constructer开发者_StackOverflow社区 that I get back a FileNotFoundException but no more detail on what exactly caused it. After a little playing around I then found that the call in other bits of code works on the server. Using a simple console app the call works when built as 'Any CPU' (basically x64) but not when I explicitly set the target to x86. The thing with this InfoPath code behind is that it compiles as x86. Inside the csproj it actually is set to 'AnyCPU'. I've tried forcing this to x64 and reloading the project but then it just doesn't build. Is there any way to get the code behind project to build to x64 or have I found myself a VSTA limitation?
精彩评论