Skip to content

Add instructions for building for .NET Core 3.0, and make them work. - #1032

Merged
eerhardt merged 4 commits into
dotnet:masterfrom
eerhardt:NetCore30Instructions
Oct 2, 2018
Merged

eerhardt merged 4 commits into
dotnet:masterfrom
eerhardt:NetCore30Instructions

Conversation

@eerhardt

Copy link
Copy Markdown
Member

Fix #1011

There are a couple manual steps necessary to build for .NET Core 3.0. Adding instructions on how to do it, and changing the build infrastructure so the build actually works.

<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.0'">
<Compile Remove="CpuMathUtils.netstandard.cs" />
<!-- This is only needed until https://github.com/dotnet/corefx/issues/31064 is addressed. -->
<PackageReference Include="System.Runtime.Intrinsics.Experimental" Version="4.6.0-preview1-26708-04" />

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I guess you're deleting this because this is now inbox in 3.0? Or am I missing something.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Correct. https://github.com/dotnet/corefx/issues/31064 has been fixed for some time.

@@ -0,0 +1,13 @@
In order to build ML.NET for .NET Core 3.0, you need to do a few manual steps.

1. Pick a version of the .NET Core 3.0 SDK you want to use. As of this writing, I'm using `3.0.100-alpha1-009622`. You can get the latest available version from the [dotnet/core-sdk README](https://github.com/dotnet/core-sdk#installers-and-binaries) page.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pick [](start = 3, length = 4)

Thanks for adding this @eerhardt -- I found this impossibly confusing myself without asking you, I'm not sure how someone who didn't know the right person to ask would manage. :)

@TomFinley TomFinley left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks @eerhardt

@adamsitnik

Copy link
Copy Markdown
Member

I have a question regarding: Release-Intrinsics build configuration.

What tells MSBuild to use <Optimize>true</Optimize> for Release-Intrinsics?

Should we also have something like this?

<Optimize Condition="'$(Configuration)'=='Release-Intrinsics'">true</Optimize>

2. Change the [DotnetCLIVersion.txt](https://github.com/dotnet/machinelearning/blob/master/DotnetCLIVersion.txt) file to use that version number.
3. Delete the local `.\Tools\` folder from the root of the repo, to ensure you download the new version.
4. Run `.\build.cmd -- /p:Configuration=Release-Intrinsics` from the root of the repo.
5. If you want to build the NuGet packages, `.\build.cmd -buildPackages` after step 4.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The VS studio option is working for testing. But it will be nice to add the appropriate command to run all the tests from the command line

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Fixed with the latest.

Now you can run tests just like normal:

Run .\build.cmd -- /p:Configuration=Release-Intrinsics from the root of the repo.
Run .\build.cmd -runTests -- /p:Configuration=Release-Intrinsics from the root of the repo.

@danmoseley

Copy link
Copy Markdown

Is there any reason we could not pick an arbitrary (today's) build of 3.0 and install it on the CI machines so we could at least get "official" coverage of this build and it does not break? We need not ask contributors to install it until eg., 3.0 preview 1 release.

@Anipik

Anipik commented Oct 1, 2018

Copy link
Copy Markdown
Contributor

@danmosemsft we may need to fix the tests first before making the tests run on ci for netcoreapp3.0
around 20 tests are failing on netcoreapp3.0
#1096

@eerhardt

eerhardt commented Oct 1, 2018

Copy link
Copy Markdown
Member Author

Is there any reason we could not pick an arbitrary (today's) build of 3.0 and install it on the CI machines so we could at least get "official" coverage of this build and it does not break? We need not ask contributors to install it until eg., 3.0 preview 1 release.

  1. The "CI machines" are hosted Azure DevOps machines. I don't believe we can install software on them. But that doesn't stop us because we use a downloaded version of the .NET Core SDK. We would just need to use the 3.0-* version.
  2. Someone would need to do the work to add a new leg to CI to do this. (And fix the tests, like @Anipik mentions)

@eerhardt

eerhardt commented Oct 1, 2018

Copy link
Copy Markdown
Member Author

@adamsitnik - I've updated the PR to address your issue. Thanks for the catch.

@eerhardt
eerhardt merged commit fcea146 into dotnet:master Oct 2, 2018
@eerhardt
eerhardt deleted the NetCore30Instructions branch October 2, 2018 18:52
@ghost ghost locked as resolved and limited conversation to collaborators Mar 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants