Design/Doc issue: PlatformTarget vs Platforms vs RuntimeIdentifier handled inconsistently
See original GitHub issueFrom @davidmatson on August 28, 2017 20:11
I’ve stumbled across a number of cases where it isn’t clear if I should use PlatformTarget, Platforms or RuntimeIdentifier. The tooling seems to get confused a bit between these properties as well - sometimes one UI (project properties) will reflect one property but another UI (Configuration Manager) will reflect a different property.
Could we document when to use which property? Or, perhaps even better, could we reduce the concept count here and would that lead to fewer bugs/ambiguities/possible conflicts?
For example, what’s the right way to say the project is x64?
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
and/or
<PlatformTarget>x64</PlatformTarget>
and/or
<Platforms>x64</Platforms>
Is there any way to reduce the number of ways to say “I’m x64”?
Copied from original issue: dotnet/project-system#2748
Issue Analytics
- State:
- Created 6 years ago
- Reactions:43
- Comments:7 (2 by maintainers)
Top Results From Across the Web
Relationship between PlatformTarget and ...
To the original question, you can see that AnyCPU is a platform specifier and RIDs are runtime identifiers. The RID monikers often include...
Read more >The RuntimeIdentifier platform 'win10-x64' and ...
When I run the MAUI UWP application I am getting below error "The RuntimeIdentifier platform 'win10-x64' and the PlatformTarget 'x86' must ...
Read more >VS: Consistent handling of PlatformTarget property for ...
VS : Consistent handling of PlatformTarget property for managed .NET projects. This issue is a break out from a former merge request, see...
Read more >C# Target Platforms | x64 vs x86 vs AnyCPU
In this article we're going to look into how .NET handles x64 vs x86 systems and provide some C# examples to help out....
Read more >Platform vs. PlatformTarget In Any .NET Build - doughnuts.dev
It looks like PlatformTarget is set based on Platform when it doesn't have a value already set, but doesn't have a definition when...
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 FreeTop 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
Top GitHub Comments
I agree, we should simplify this, @dsplaisted @nguerrera Thoughts?
I ran into this problem on one of our products. Visual Studio seems uses
Platforms
to determine what the build output should be, while our build script that uses theMSBuild
task internally requiresPlatformTarget
to be set. This was very confusing and none of these properties seem to be documented anywhere.Note that our
build.csproj
is run bymsbuild.exe
included with VS2019. The reason we don’t usedotnet msbuild
is that it hangs and does not work, probably due to having a mix of old school csproj files and new Microsoft.NET.Sdk projects.