Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CheckForMismatchingPlatform should log the RuntimeIdentifier and PlatformTarget on error #1616

Closed
eerhardt opened this issue Sep 28, 2017 · 0 comments
Assignees
Milestone

Comments

@eerhardt
Copy link
Member

I've run into a situation where I get this error:

/home/eerhardt/git/source-build/src/vstest/tools/dotnet/sdk/2.0.0-preview3-006845/Sdks/Microsoft.NET.Sdk/build/Microsoft.NET.RuntimeIdentifierInference.targets(125,5): error : The RuntimeIdentifier platform and the PlatformTarget must match. [/home/eerhardt/git/source-build/src/vstest/src/testhost.x86/testhost.x86.csproj] [/home/eerhardt/git/source-build/targets/repository.proj]

This is coming from this code:

<Target Name="_CheckForMismatchingPlatform"
BeforeTargets="_CheckForInvalidConfigurationAndPlatform"
Condition="'$(RuntimeIdentifier)' != '' and '$(PlatformTarget)' != ''">
<NETSdkError Condition="'$(PlatformTarget)' != 'AnyCPU' and !$(RuntimeIdentifier.ToUpper().Contains($(PlatformTarget.ToUpper())))"
ResourceName="CannotHaveRuntimeIdentifierPlatformMismatchPlatformTarget" />
</Target>

It would be helpful if this error would log what the $(RuntimeIdentifier) and $(PlatformTarget) values where, in order to help users debug what went wrong in their builds.

@livarcocc livarcocc added this to the 2.1.3xx milestone Jan 25, 2018
@livarcocc livarcocc self-assigned this Jan 25, 2018
GangWang01 pushed a commit to GangWang01/sdk that referenced this issue Jun 7, 2022
Merge master back to stabilize
GangWang01 pushed a commit to GangWang01/sdk that referenced this issue Jul 11, 2022
Merge master back to stabilize
JL03-Yue pushed a commit that referenced this issue Mar 19, 2024
…523.1 (#1616)

[main] Update dependencies from dotnet/arcade
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants