InfoPath 背后的代码不会在 x64 中构建

发布于 2024-08-19 10:20:45 字数 364 浏览 15 评论 0原文

我刚刚迁移到基于 x64 Server 2008 R2 的开发计算机来进行 SharePoint 工作。我发现,在调用 SharePoint 对象模型 SPSite 构造函数时,我得到了 FileNotFoundException,但没有更多详细信息说明到底是什么导致了它。经过一番尝试后,我发现其他代码中的调用可以在服务器上工作。使用简单的控制台应用程序,当构建为“任何 CPU”(基本上是 x64)时,调用可以工作,但当我明确将目标设置为 x86 时,则不能。此 InfoPath 代码背后的问题是它编译为 x86。在 csproj 内部,它实际上设置为“AnyCPU”。我尝试将其强制为 x64 并重新加载项目,但随后它就无法构建。有没有办法让项目背后的代码构建为 x64 或者我发现自己有 VSTA 限制?

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 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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文