-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Enable RuntimeInformation intrinsic functions on all platforms #1926
Conversation
This basically fixes #539 right? You can detect which OS you are on with this. |
@@ -1,4 +1,7 @@ | |||
{ | |||
"dependencies": { | |||
"System.Runtime.InteropServices.RuntimeInformation": "4.0.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Be sure to add the assembly to our custom copy logic here: https://github.com/cdmihai/msbuild/blob/fa2c0f8541ed96a303927131abe268952bf37706/src/Build/Microsoft.Build.csproj#L798
You might need to also add it to the build definition so that it ends up in our VSIX.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch ... I'll also update the swr and microbuild if needed
@dotnet-bot test Windows_NT Build for Desktop please |
@dotnet-bot test Windows_NT Build for CoreCLR please |
@cdmihai Thanks! One item off my list ;) |
The Reference items produced by ResolveNugetPackages target during project builds are either reference assemblies or real assemblies. Therefore they are not a good source for copying into the output directory, as copied reference assemblies would crash at runtime. Move the copying in the DeployDependencies project file because the DeployRuntime target in there uses the real assemblies. This should all be removed whenever we move to dotnet publish
@@ -19,12 +19,14 @@ | |||
<dependency id="Microsoft.Build.Framework" version="[$version$]" /> | |||
<dependency id="Microsoft.Build.Tasks.Core" version="[$version$]" /> | |||
<dependency id="Microsoft.Build.Utilities.Core" version="[$version$]" /> | |||
<dependency id="System.Runtime.InteropServices.RuntimeInformation" version="4.0.0" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You shouldn't need to add this to our runtime package because the dependency on Microsoft.Build transitively depends on System.Runtime.InteropServices.RuntimeInformation
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
MSBuild.exe depends on RuntimeInformation via the MSBuildEnvironmentHelper, which is compiled into MSBuild.exe. Because of that, I thought it might be better to make the dependency explicit.
On the other hand, everything else used by msbuild.exe package flows from the other packages. so I'll remove it for consistency's sake :)
dotnet#1926)" This reverts commit dba03f2.
…platforms (dotnet#1926)" (dotnet#1951)" This reverts commit 852c2da.
No description provided.