简体   繁体   English

Visual Studio 2012安装和.NET SDK

[英]Visual Studio 2012 install and .NET SDK

I'm trying to get MSBuild working via the Microsoft.Build library (ie. not via the command line exe). 我正在尝试通过Microsoft.Build库(即不通过命令行exe)来使MSBuild工作。 This is giving me the following error: 这给了我以下错误:

Could not locate the .NET Framework SDK. 无法找到.NET Framework SDK。 The task is looking for the path to the .NET Framework SDK at the location specified in the SDKInstallRootv2.0 value of the registry key HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft.NETFramework. 该任务在注册表项HKEY_LOCAL_MACHINE \\ SOFTWARE \\ Microsoft.NETFramework的SDKInstallRootv2.0值中指定的位置处查找.NET Framework SDK的路径。 You may be able to solve the problem by doing one of the following: 1.) Install the .NET Framework SDK. 您可以通过执行以下任一操作来解决此问题:1.)安装.NET Framework SDK。 2.) Manually set the above registry key to the correct location. 2.)手动将上面的注册表项设置到正确的位置。 Normal : No resources are out of date with respect to their source files. 正常:没有任何关于其源文件的资源过时。 Skipping resource generation. 跳过资源生成。

The app I'm writing will be used internally by a few people - all of whom will have VS2012 installed, but probably not explictly installed the SDK. 我正在编写的应用程序将由一些人在内部使用-他们所有人都将安装VS2012,但可能未明确安装SDK。 Is the .NET Framework SDK not included in the VS2012 install? VS2012安装中是否不包括.NET Framework SDK? I've had a look through the directories, but not really sure what files the msbuild libraries needs, so don't really know what I'm looking for. 我已经看过目录,但是不能确定msbuild库需要什么文件,所以真的不知道我在寻找什么。 The only directory I can see which looks similar is: 我可以看到的唯一看起来相似的目录是:

C:\Program Files (x86)\Microsoft Visual Studio 11.0\SDK

But this just contains an empty v3.5\\bin folder. 但这仅包含一个空的v3.5\\bin文件夹。

It sounds like everyone using this app will need to explicitly install the SDK aswell as Visual Studio. 听起来每个使用此应用程序的人都需要显式安装SDK和Visual Studio。 Is this correct, or are the required files installed as part of the VS install? 这是正确的吗,还是在VS安装过程中安装了必需的文件?

Looks like it was because Visual Studio put the registry key in the following location: 看起来是因为Visual Studio将注册表项放在以下位置:

HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\.NETFramework

Note the Wow6432Node . 注意Wow6432Node Changing my app from Any CPU to x86 resolved the issue. 将我的应用程序从“ Any CPU更改为“ x86解决此问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM