C# – VS 2015 Toolset may be unknown or missing

asp.netcmsbuildvisual-studio-2015

I try to publish project to my file directory.

I take a this message. But do not shown any error. Error list is empyty.

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 ==========

Best Answer

VS 2015 Toolset may be unknown or missing

According to the error message "Project file contains ToolsVersion="12.0". ", it shows that your project was upgraded from Visual Studio 2013. So when you publish it with Visual Studio 2015, you may get this error "This toolset may be unknown or missing..."

To resolve this issue, you can try to update your project file: Right your project->Unload project->Edit Yourprojectname.csproj->change the ToolsVersion="12.0" to ToolsVersion="14.0" in the second line.

<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

If you are using MSBuild command line build your project, you can can override the ToolsVersion Settings of Projects and Solutions by using command prompt:

msbuild.exe someproj.proj /tv:14.0
Related Topic