我尝试将项目发布到我的文件目录。
我收到了这条消息。但是没有显示任何错误。错误列表为空。
2> Building with tools version "14.0".
2> Project file contains ToolsVersion="12.0". This toolset may be unknown or missing, in which case you may be able to resolve this by installing the appropriate version of MSBuild, or the build may have been forced to a particular ToolsVersion for policy reasons. Treating the project as if it had ToolsVersion="14.0". For more information, please see http://go.microsoft.com/fwlink/?LinkId=293424. 2> Target "ValidateMSBuildToolsVersion" skipped. Previously built unsuccessfully. 2>Done building project "project_name.csproj" – FAILED. 2> ========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ========== ========== Publish: 0 succeeded, 1 failed, 0 skipped ==========
最佳答案
VS 2015 Toolset may be unknown or missing
根据错误信息“Project file contains ToolsVersion="12.0".”,说明你的项目是从Visual Studio 2013升级过来的,所以当你用Visual Studio 2015发布的时候,你可能会收到此错误“此工具集可能未知或丢失...”
要解决这个问题,您可以尝试更新您的项目文件:右键您的项目->卸载项目->编辑您的项目名称.csproj->将ToolsVersion="12.0"
更改为第二行的 ToolsVersion="14.0"
。
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
如果您使用 MSBuild 命令行构建您的项目,您可以使用命令提示符覆盖项目和解决方案的 ToolsVersion 设置:
msbuild.exe someproj.proj /tv:14.0
关于c# - VS 2015 工具集可能未知或缺失,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48296874/