如何在NuGet.targets文件中解决此错误:
?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">$(MSBuildProjectDirectory)\..\</SolutionDir>
<!-- Enable the restore command to run before builds -->
<RestorePackages Condition=" '$(RestorePackages)' == '' ">false</RestorePackages>其中RestorePackages标签具有指出msbuild/2003具有无效子元素的错误。
对于标记,我得到相同类型的错误: NuGetToolsPath、PackagesProjectConfig、NuGetExePath、MsBuild和DownloadNuGet
在这些错误之后,我得到了17个案例"unable to locate .....nuget\NuGet.exe in the 17 projects of this VS2013 solution for the MVCForum software downloaded from GitHub“。
发布于 2015-02-27 22:02:54
单击Build->Clean Solution,右键单击该解决方案,并设置为"Enable NuGet package restore“。显然,这会导致获得正确的NuGet.exe副本。这样做之后,所有的错误都消失了。
https://stackoverflow.com/questions/28734083
复制相似问题