Visual Studio 2012 failing to detect Visual Studio

2019-01-23 02:59发布

I am trying to use Visual Studio 2012 to build a C++ CLI application targeting .NET 3.5.

I've already gotten this working on one machine, by installing Visual Studio 2008, and specifying the v90 platform toolset.

Now I am attempting this on a new machine, and I've installed Visual Studio 2008, then Visual Studio 2012.

Now I get this incredibly frustrating error:

Error 81 error MSB8020: The builds tools for Visual Studio 2008 (Platform Toolset = 'v90') cannot be found. To build using the v90 build tools, either click the Project menu or right-click the solution, and then select "Update VC++ Projects...". Install Visual Studio 2008 to build using the Visual Studio 2008 build tools. C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.Cpp.Platform.targets 43 5 WinApiWrapper (Visual Studio 2008)

Why WOULDN'T Visual Studio 2012 be able to find Visual Studio 2008. Is there any way I can help it?

3条回答
做自己的国王
2楼-- · 2019-01-23 03:13

Before downloading anything try going to project properties -> configuration properties -> general then change the platform Toolset for the project to Visual Studio 2012 (v110)

查看更多
你好瞎i
3楼-- · 2019-01-23 03:22

It turns out that you ALSO have to install Visual Studio 2010.

Once I installed Visual Studio 2010, Visual Studio 2012 was able to detect the Visual Studio 2008 build tools.

It seems absolutely crazy, but there you go.

查看更多
做自己的国王
4楼-- · 2019-01-23 03:30

I ran into the exact same problem but I Installed Windows SDK 7.1 instead (or the web installer version) and that made it work also.

I remember I've installed it also to the original computer.

Remember you should uninstall first any version of Visual C++ 2010 redistributable, otherwise Windows SDK setup will fail.

I know it's not the perfect solution because Windows SDK is huge, but it's another option.

查看更多
登录 后发表回答