question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Design/Doc issue: PlatformTarget vs Platforms vs RuntimeIdentifier handled inconsistently

See original GitHub issue

From @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:open
  • Created 6 years ago
  • Reactions:43
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

4reactions
davkeancommented, Aug 30, 2017

I agree, we should simplify this, @dsplaisted @nguerrera Thoughts?

3reactions
wldevriescommented, Jun 9, 2020

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 the MSBuild task internally requires PlatformTarget to be set. This was very confusing and none of these properties seem to be documented anywhere.

Note that our build.csproj is run by msbuild.exe included with VS2019. The reason we don’t use dotnet 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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found