-
Notifications
You must be signed in to change notification settings - Fork 5k
Use .Net Core MSBuild for OS X and Linux Builds #5711
Conversation
@@ -49,14 +49,14 @@ | |||
<ToolsDir Condition="'$(UseToolRuntimeForToolsDir)'=='true'">$(ToolRuntimePath)</ToolsDir> | |||
<ToolsDir Condition="'$(ToolsDir)'==''">$(ProjectDir)Tools/</ToolsDir> | |||
<DotnetCliPath Condition="'$(DotnetCliPath)'==''">$(ToolRuntimePath)dotnetcli/bin/</DotnetCliPath> | |||
<BuildToolsTaskDir Condition="'$(BuildToolsTargets45)' == 'true'">$(ToolsDir)net45/</BuildToolsTaskDir> | |||
<BuildToolsTaskDir Condition="'$(BuildToolsTargets45)' == 'true'">$(ToolsDir)/net45/</BuildToolsTaskDir> | |||
|
|||
<!-- Packaging configuration --> | |||
<PreReleaseLabel>rc3</PreReleaseLabel> | |||
<PackageDescriptionFile>$(ProjectDir)pkg/descriptions.json</PackageDescriptionFile> | |||
<RuntimeIdGraphDefinitionFile>$(ProjectDir)pkg/Microsoft.NETCore.Platforms/runtime.json</RuntimeIdGraphDefinitionFile> | |||
<!-- Add a condition for this when we are able to run on .NET Core --> |
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.
Change this comment, or do we need a condition here?
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.
We can certainly add a condition, but technically is not required. The reason is that .Net Core MSBuild can only load assemblies living in the same directory as itself, so even though this properties say that the assemblies loaded should come from different folders, it is loading the .Net Core versions that live on the same dir. I'll add the condition either way to make it more clear.
46618e0
to
e23941f
Compare
I can test this on my machine when the packages have been uploaded to buildtools and the temporary sources are removed, since the CI won't be building any of this. I'm happy to see this is finally going in, it should hopefully get us much closer to a unified build process for x-plat builds. |
@mellinoe I just pushed a change to my buildtools PR dotnet/buildtools#396 that removes the temporary sources given that I'm done pushing the packages into the buildtools feed now. That means that you should be able to sync to my branch in buildtools and build to produce a buildtools package, and use that to build xplat using the code in this PR. |
</ItemGroup> | ||
|
||
<PropertyGroup> | ||
<DnxPackageDir Condition="'$(DnxPackageDir)'==''">$(PackagesDir)/$(DnxPackageName)/</DnxPackageDir> | ||
<DnuToolPath Condition="'$(DnuToolPath)'=='' and '$(OsEnvironment)'!='Unix'">$(DnxPackageDir)\bin\dnu.cmd</DnuToolPath> | ||
<DnuToolPath Condition="'$(DnuToolPath)'=='' and '$(OsEnvironment)'=='Unix'">$(DnxPackageDir)/bin/dnu</DnuToolPath> | ||
<DnuToolPath Condition="'$(DnuToolPath)'=='' and ('$(OsEnvironment)'!='Unix' or '$(OsEnvironment)'!='OSX')">$(DnxPackageDir)/bin/dnu.cmd</DnuToolPath> |
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.
Is this still necessary with your change to set OsEnviroment to Unix?
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.
It is not anymore. I think that the ideal solution is not to change OsEnvironment to Unix, but instead handle the cases for OS X as well, but that is not super easy given that we have so many files that special-case Unix. Given that treating OS X as Unix was the way that builds in Mac used to work, I will remove this conditions for now, and log an issue so that we can move to special casing OSX as well.
276188a
to
ec57c6a
Compare
@joperezr I think there may be an issue with the Open signing key. So far most of the projects have built fine, but I'm getting this error from the projects that do use the new key:
Still running the build (haven't gotten to to tests or packaging yet), but everything seems to be running smoothly other than the above. |
@mellinoe yeah I saw that as well, that started happening this morning when I rebased. It seems to be a compiler bug, I'll log the issue and push the workaround |
Workaround looks fine to me. Like I mentioned, we are doing the same thing with the ECMA key right now. EDIT: Actually, maybe we should make the workaround the same as the ECMA Key one: https://github.com/dotnet/corefx/blob/0dd1ab7223dea82f236ec81d42f4ae0227176bf4/dir.props
In the project files we just do:
I'm fine either way, but it might be nice to have both of these properties in one place so we can remember to address them both (I'm assuming they're related) |
812179d
to
42ffafd
Compare
I kind of agree with @mellinoe that we should probably just add the explicit set to false in the same place and in the individual projects only set it to true if the property is empty. |
@weshaggard @mellinoe Sounds good, I'll do that. |
252a1b2
to
7f2c51b
Compare
LGTM please make sure to file the various tracking bugs for the comments. |
7f2c51b
to
4367ec4
Compare
@dotnet-bot test Innerloop OSX Release Build and Test |
LGTM |
Use .Net Core MSBuild for OS X and Linux Builds
@ellismg, can we have a similar upgrade in CoreCLR? Currently building CoreCLR on NetBSD is requiring Mono; which unlike FreeBSD is bit more inconvenient -- although we have installed full mono packs on our systems, but this is something we would greatly appreciate and even willing to pull off ourselves (by taking inspirations from @joperezr's work in this PR), if we get a 'go ahead'. =) |
@jasonwilliams200OK We are 99.99% of the way there, and dotnet/coreclr#3214 will remove the last mono dependency. |
Thanks @ellismg! Perfect timings I'd say.. 🎯 |
Use .Net Core MSBuild for OS X and Linux Builds Commit migrated from dotnet/corefx@ab6ec2f
Use .Net Core MSBuild for OS X and Linux Builds Commit migrated from dotnet/corefx@ab6ec2f
Use .Net Core MSBuild for OS X and Linux Builds