Collectives™ on Stack Overflow
Find centralized, trusted content and collaborate around the technologies you use most.
Learn more about Collectives
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Learn more about Teams
What is current Toolversion for MS Build ToolVerions for VS2022 and what would be Framework version for .NetFramework. what is the version i can see in CsProj in project
Visual Studio 2022 ToolVersion in Csproj for .NetFrameWork
–
For Visual Studio 2022 and .Net Framework projects use
ToolsVersion="Current"
or
ToolsVersion="17.0"
. (The version of MSBuild that comes with VS2022 is 17.0.)
See more detail at
MSBuild Toolset (ToolsVersion)
.
When a new project is created Visual Studio uses a template. From the comments it appears that the template has not been updated since VS2017 and has
ToolsVersion="15.0"
. MSBuild 15 was provided with VS2017. You can simply edit the project file and update the
ToolsVersion
. If you only have VS2022 or MSBuild v17 installed, that version of MSBuild will be used even when the
ToolsVersion
is set to 15.
–
–
–
Here is the Description of
ToolsVersion
:
The version of the Toolset MSBuild uses to determine the values for $(MSBuildBinPath) and $(MSBuildToolsPath).
MSBuild is installed in the \Current folder under each version of Visual Studio. You just need to change ToolsVersion="15.0" to ToolsVersion="Current" if you want to use MSBuild 17.0 in your project in Visual Studio 2022.
You can find the current folder from here
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current
We can also see this from the detailed build output window:
Project file contains ToolsVersion="15.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="Current". For more information,
please see
http://go.microsoft.com/fwlink/?LinkId=293424
.
The build may have been forced to ToolsVersion="Current" because the toolset for 15.0 could not be found. So it is not necessary to modify ToolsVersion.
Thanks for contributing an answer to Stack Overflow!
-
Please be sure to
answer the question
. Provide details and share your research!
But
avoid
…
-
Asking for help, clarification, or responding to other answers.
-
Making statements based on opinion; back them up with references or personal experience.
To learn more, see our
tips on writing great answers
.