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

May I know if you have got any chance to check my answer? I am glad to help if you have any other questions. Jingmiao Xu-MSFT Dec 1, 2022 at 3:11

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.

But when i Create console in .Net frame work with 4.8 and 4.8.1 framework, still i can see csproj file ToolVersion as "15.0", please tell me the steps were i can get version of 17 in .NetFramewoek Srikant suryawanshi Nov 8, 2022 at 6:29 <?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="15.0" xmlns=" schemas.microsoft.com/developer/msbuild/2003 "> <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <ProjectGuid>{7DD7A021-42B1-4951-9C71-7961F39E2409}</ProjectGuid> <OutputType>Exe</OutputType> Srikant suryawanshi Nov 8, 2022 at 6:31 The project template is still using 15. And you can leave it as that or edit the .csproj file to change the ToolsVersion. The actual version of MSBuild that comes with VS2022 is 17.0. Jonathan Dodds Nov 8, 2022 at 13: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 .