-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Add instructions for building for .NET Core 3.0, and make them work. #1032
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
Changes from all commits
70991f2
45cd129
ee04359
17c07d2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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. | ||
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. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 |
||
|
||
If you are using Visual Studio, you will need to do the following: | ||
|
||
1. Install the above .NET Core 3.0 SDK into %Program Files%. Or extract it to a directory and put that directory at the front of your %PATH%, so it is the first `dotnet.exe` on the PATH. | ||
2. In the Configuration Manager, switch the current configuration to `Debug-Intrinsics` or `Release-Intrinsics`. | ||
3. Build and test as usual. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<Configurations>Debug;Release;Debug-Intrinsics;Release-Intrinsics</Configurations> | ||
<TargetFramework Condition="'$(UseIntrinsics)' != 'true'">netstandard2.0</TargetFramework> | ||
<TargetFrameworks Condition="'$(UseIntrinsics)' == 'true'">netstandard2.0;netcoreapp3.0</TargetFrameworks> | ||
<IncludeInPackage>Microsoft.ML.CpuMath</IncludeInPackage> | ||
|
@@ -23,8 +22,6 @@ | |
|
||
<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" /> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. |
||
</ItemGroup> | ||
|
||
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.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.
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. :)