首先让我为出现的错误添加一些背景信息,我已经安装了.NET 4.5.1预览版,而我在VS 2012中注意到的第一件事是,可用框架中未列出.NET 4.5.1。我不确定这是否正确,因为这只是对4.5的升级,因此我想VS 2012应该列出它。
此外,当我安装VS 2013 Preview,将项目升级到.NET 4.5.1并在VS 2012中打开解决方案时,新的.NET版本又出现了,所以我不确定这是否是VS 2012中的错误吗?好的,现在我在VS 2012中拥有.NET 4.5.1,当我尝试构建项目时,出现以下错误
Error 3 The task factory "CodeTaskFactory" could not be loaded from the assembly "C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Build.Tasks.v4.0.dll". Could not load file or assembly 'file:///C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Build.Tasks.v4.0.dll' or one of its dependencies. The system cannot find the file specified. D:\Projects\MyProject\Master\Source\.nuget\nuget.targets 71 9 MyProject.Core.Modules
NuGet.targets报告行
<SetEnvironmentVariable EnvKey="VisualStudioVersion"
EnvValue="$(VisualStudioVersion)" Condition=" '$(VisualStudioVersion)'
!= '' AND '$(OS)' == 'Windows_NT' " />
在我看来,由于某些原因,VS 2012无法解析路径或程序集,因此我不确定是否应该修复NuGet.targets中的某些内容,或者是Visual Studio,是否有任何想法?
谢谢
Visual Studio 2012支持构建.NET Framework 4.5.1应用程序。您需要安装Visual Studio 2013预览版或Windows 8.1预览版的Windows SDK才能在与Visual Studio相同的计算机上获取.NET Framework 4.5.1预览版定位包2012年使用.NET Framework 4.5.1预览版构建应用程序。
谢谢
Nithya [MSFT]
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句