将 Visual Studio 解决方案从 x86 迁移到 x64 开发环境
我环顾四周并尝试了很多建议,但没有一个有效。我最近将在 32 位计算机上使用 Visual Web Developer Express 2010 开发的基于 Web 的应用程序迁移到较新的 64 位计算机。按照我的方式重新配置所有内容后,我尝试重新编译我的代码,但我不断收到这个愚蠢的错误,这对我来说毫无意义:
Error 4: Task could not find "AxImp.exe" using the SdkToolsPath
"C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\bin\NETFX 4.0 Tools\" or the
registry key "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.0A".
Make sure the SdkToolsPath is set and the tool exists in the correct processor
specific location under the SdkToolsPath and that the Microsoft Windows SDK is
installed.
此外,当我查看项目属性时,参考、资源和设置选项卡全部显示以下错误。我这辈子都不知道该怎么办。我只想编译这个该死的项目。
Could not resolve mscorlib for target framework '.NETFramework,Version=v4.0'.
This can happen if the target framework is not installed or if the framework
moniker is incorrectly formatted.
这到底意味着什么?这和CLR有什么关系吗?我现在只是在黑暗中拍摄。非常感谢您的帮助:)
更新 - 仍然无法工作
我确信这不是我的 .NET 4 安装因为我的应用程序正在工作好吧,我只是无法编译我的开发版本。 自上一台计算机以来,除了 CPU 架构之外,没有任何变化。我还卸载了 &自这篇文章以来,我重新安装了 Visual Web Developer 三次,每次尝试查看上面列出的选项卡时都会收到相同的错误消息。
我使用了“Visual Studio 2010 卸载实用程序”并且来自 MSDN 博客,适用于客户端和完整版(即扩展版)每次进行配置文件以执行完整的全新安装。没什么…
因为我能够在我创建的 HelloWorld 测试应用程序上查看这些选项卡,这表明我的解决方案没有正确“转换”(你有什么)到 x64 架构。我可以创建一个新的解决方案,它可能会起作用,但这会非常耗时。 必须有一种方法来编辑属性文件(如果我只知道哪个是)来修复路径、字符串或导致这些选项卡无法正确显示并且我的解决方案无法编译的任何内容。谢谢 ;)
I've looked around and tried many suggestions but none have worked. I recently migrated a web-based application I developed in Visual Web Developer Express 2010 on a 32-bit machine to a newer 64-bit machine. After re-configuring everything the way I had it, I'm trying to re-compile my code but I keep getting this stupid error which makes no sense to me:
Error 4: Task could not find "AxImp.exe" using the SdkToolsPath
"C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\bin\NETFX 4.0 Tools\" or the
registry key "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.0A".
Make sure the SdkToolsPath is set and the tool exists in the correct processor
specific location under the SdkToolsPath and that the Microsoft Windows SDK is
installed.
Also when I view the Project Properties the References, Resources, and Settings tabs all display the following error. I can't for the life of me figure out what to do. All I want to do it compile the bloody project.
Could not resolve mscorlib for target framework '.NETFramework,Version=v4.0'.
This can happen if the target framework is not installed or if the framework
moniker is incorrectly formatted.
What in tarnation is that supposed to mean? Does this have anything to do with the CLR? I'm just taking shots in the dark at this point. Help would be sorely appreciated :)
UPDATE - Still Not Working
I'm certain it's not my .NET 4 installation because my application is working just fine, I just can't compile my dev version. Nothing has changed since the last computer other than the CPU architecture. I've also uninstalled & re-installed Visual Web Developer thrice since this post and get the same error message each time when trying to view the tabs I listed above.
I used the "Visual Studio 2010 Uninstall Utility" and "Unattended Uninstall" commands from the MSDN Blog for both Client and Full (i.e. Extended) Profiles each time to do a complete clean install. Nothing...
Since I was able to view these tabs on the HelloWorld test app I created, that indicates to me that my solution did not "convert" (what-have-you) properly to the x64 architecture. I could create a new solution and it would probably work but this would be very time consuming. There must be a way to edit the properties file (if I only knew which is was) to fix the path, string, or whatever is causing those tabs not to properly display and my solution not to compile. Thanks ;)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
为了解决我的第一个问题,我必须将“AxImp.exe”文件从驱动器上的另一个位置复制到 VS 正在寻找它的路径。此文件是 Windows SDK 的一部分,可以下载 此处。您还可以重新映射 VS 以使用新版本&架构如此处所述。
为了(真正)解决我的第二个问题,我必须从头开始重新创建我的解决方案,方法是制作一个全新的解决方案并重新添加所有代码和引用。我认为更新中发生了一些事情,损坏了我的解决方案属性文件(*.vbproj)或其他内容。
最后,我强烈建议在 64 位计算机上安装 64 位版本的 SQL Server 以避免 WoW64 就像我遇到的错误。您可能不会,但安全总比后悔好>。<我从此处安装了“SQLEXPRWT_x64_ENU.exe”版本。
还有一篇很有见地的 MSDN 文章,名为“将 32 位托管代码迁移到 64-位”(2005 年,相当老了)。
我希望这可以帮助任何可能偶然发现这个问题并遇到同样问题的人:)
To fix my first issue I had to copy the "AxImp.exe" file from another place on my drive to the path where VS was looking for it. This file is part of the Windows SDK which can be downloaded here. You can also remap VS to use the new version & architecture as described here.
To (really) solve my second issue I had to re-create my Solution from scratch by making a fresh new one and re-adding all my code and references. I think something happened in the update that corrupted my solution properties file (*.vbproj) or something.
Lastly, I'd highly recommend installing the 64-bit version of SQL server on a 64-bit machine to avoid WoW64 errors like I got. You may not, but better safe than sorry >.< I installed the "SQLEXPRWT_x64_ENU.exe" version from here.
There's also a somewhat insightful article MSDN article called "Migrating 32-bit Managed Code to 64-bit" (2005, pretty old).
I hope this helps whoever may stumble across this question and is having the same issues :)
仅当我将 Microsoft.Office.Core 添加到 COM 的引用时,我才开始遇到此问题。
然后,我没有从 COM 中进行选择,而是浏览并从 C:\Windows\Assembly\GAC 位置中选择了一个,这解决了这个问题,在我的情况下,没有其他问题导致 AxImp.exe 丢失问题。
I started getting this problem only when i added Microsoft.Office.Core to References from COM.
Then instead of selecting from COM, i did browse and selected one from C:\Windows\Assembly\GAC location, which solved this problem, there was no other issue to cause this AxImp.exe missing issue in my case.
添加来自 GAC 的 MS Office Word 和 Excel 互操作文件解决了我的问题。
adding ms office word and excel interop files from GAC solved my problem.