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
I see that some C# projects note their ToolsVersion and other do not. (e.g. ToolsVersion="15.0")
What is the best practice? Is this too a case where explicit is better than implicit?
–
The "ToolsVersion" property was most useful for distinguishing between versions of tooling installed side-by-side in a global MSBuild installation.
Since beginning with VS 2017, there no longer is a global MSBuild installation, the importance of
ToolsVersion
is lower.
In VS 2019, they introduced a
Current
version that aims to replace the need for an actual version number without breaking too much of its usage (e.g. you'll see paths containing folders named
Current
) and making sure that projects and extensions will update to newer versions more easily without breaking.
So as long as you use recent versions of VS (2017, 2019) you shouldn't need to specify
ToolsVersion
, especially if you are writing projects for .NET Core or .NET Standard.
–
–
–
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
.