Make _TargetFrameworkVersionWithoutV public
See original GitHub issueBuilding logic on top of the target framework version is super helpful, but it would be easier if _TargetFrameworkVersionWithoutV was public. current logic only duplicates it. It is super small (.TrimStart('vV')
) and should be exposed publicly.
Mabe we can find a better name but that’s irrelevant. Having something to compare against is helpful in custom build targets.
Is this reasonable to do?
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:9 (9 by maintainers)
Top Results From Across the Web
Target specific version of .NET with MSBuild
1 Answer 1 ... /tv (or /toolsversion) Indicates which version of the MSBuild tools you want to use, and the property TargetFrameworkVersion ......
Read more >MSBuild reference for .NET SDK projects
Use the TargetFrameworks property when you want your app to target multiple ... However, without the TFM in the output path, multiple build...
Read more >How to make the default class type 'public' instead of ' ...
How to make the default class type 'public' instead of 'internal' in Visual Studio ; if$ ($targetframeworkversion$ > ; if$ ($ ...
Read more >How to change your C# class template in Visual Studio ...
Thankfully, changing this is not hard. First you need to navigate to: C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\ ...
Read more >How do I change the targeted .NET 4.0 Framework to ...
Visual C# 2010 Express: Project -> Project Properties -> Application -> Target Framework. VB.NET 2010 Express: (thanks Jakub).
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
We’ve been talking (https://github.com/Microsoft/msbuild/issues/3212#issuecomment-413956874) about introducing a new MSBuild version-comparison function that would ignore leading
[vV]
. Would that be enough for your needs?I’m not sure there’s much value in cleaning up existing code in the .NET SDK. I don’t feel very strongly about it.
The MSBuild target framework parsing functions are in the .NET 5 SDK. They aren’t in the .NET Core 3.1 SDK. You can use the .NET 5 SDK to build projects targeting .NET Core 3.1, and we normally recommend using the latest .NET SDK (though I understand that in Docker it’s not so simple).
Are you getting the MSB4184 error in Visual Studio or in a command-line build? If it’s from the command line, a binlog would help investigate, probably as a separate issue.