Skip to content

Infer PlatformTarget from RuntimeIdentifier #326

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

Merged
merged 2 commits into from
Oct 27, 2016

Conversation

nguerrera
Copy link
Contributor

Also, require RID for .NETFramework exes

@srivatsn @eerhardt Working on a test, but given urgency, would be good to get review started in parallel.

Finally, I ran into test issues with redirecting the build output path to have the RID so I reverted that for now. I'm thinking that can wait.

@@ -0,0 +1,45 @@
<!--
***********************************************************************************************
Microsoft.NET.TargetFrameworkInference.targets
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wrong name, cut and paste

return selfContained ?
Path.Combine("Debug", targetFramework, RuntimeEnvironment.GetRuntimeIdentifier(), PublishSubfolderName) :
Path.Combine("Debug", targetFramework, PublishSubfolderName);
if (runtimeIdentifier.Length == 0 && selfContained)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

whitespace

@dsplaisted
Copy link
Member

Finally, I ran into test issues with redirecting the build output path to have the RID so I reverted that for now. I'm thinking that can wait.

In what timeframe would you expect to switch to a RID-specific output path?

@nguerrera
Copy link
Contributor Author

In what timeframe would you expect to switch to a RID-specific output path?

Tomorrow if urgent, is it?

@nguerrera
Copy link
Contributor Author

Late tonight if even more urgent. I have an appointment from 5-6 PM.

@nguerrera nguerrera force-pushed the infer-platform-target branch from e50f91e to 1025317 Compare October 26, 2016 22:20
@nguerrera
Copy link
Contributor Author

My appointment was canceled. Still working on tests.

@nguerrera nguerrera closed this Oct 26, 2016
@nguerrera
Copy link
Contributor Author

Found bugs, don't merge. Will reopen when fixed.

@nguerrera
Copy link
Contributor Author

nguerrera commented Oct 27, 2016

@srivatsn @eerhardt @dsplaisted @dotnet/project-system Tests added, bugs fixed. Please review.

Require RID for .NETFramework exes
@nguerrera nguerrera changed the title Infer PlatformTarget from TargetFramework Infer PlatformTarget from RuntimeIdentifier Oct 27, 2016
@nguerrera nguerrera merged commit 33ffdf1 into dotnet:master Oct 27, 2016
@nguerrera nguerrera deleted the infer-platform-target branch October 27, 2016 00:48

var buildCommand = new BuildCommand(Stage0MSBuild, testAsset.TestRoot);
buildCommand
.Execute($"/p:RuntimeIdentifier=win7-x86", "/p:PlatformTarget=x64")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there ever a case where it would be correct to do this (ie have RuntimeIdentifier be for x86 but PlatformTarget be x64)?


<When Condition="$(RuntimeIdentifier.EndsWith('-arm')) or $(RuntimeIdentifier.Contains('-arm-'))">
<PropertyGroup>
<PlatformTarget>arm</PlatformTarget>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gkhanna79 did some work to enable arm32. Does that have a different RID/architecture than arm64?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Its RID is win8-arm.

</Otherwise>
</Choose>

<Target Name="CheckRuntimeIdentifier">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we put in an "escape hatch" for this Target? Like a property that will shut it off completely if the users really, really knows what they are doing and wants to skip this check.

mmitche pushed a commit to mmitche/sdk that referenced this pull request Jun 5, 2020
…hesFor21

Apply source build patches for 2.1
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

Successfully merging this pull request may close these issues.

6 participants