-
Notifications
You must be signed in to change notification settings - Fork 896
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
.NET Standard support for new VS2017 project format #499
Conversation
@cdrnet Is there anything else you would like incorporated into this pull request? Ryan and I are on the same team and we can work together to make some progress while we're motivated. |
<Reference Include="System.Data.DataSetExtensions" /> | ||
<Reference Include="System.Data" /> | ||
<Reference Include="System.Xml" /> | ||
</ItemGroup> |
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.
aren't these only required for .net35?
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Numerics" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Runtime.Serialization" />
<Reference Include="System.Xml" />
</ItemGroup>
So you may want to add some condition <>
<ItemGroup Condition=" '$(TargetFramework)' == 'net35' ">
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Numerics" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Runtime.Serialization" />
<Reference Include="System.Xml" />
</ItemGroup>
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.
I believe you are correct. I've made the changes and everything's still working fine. Will wait for any additional feedback from Christoph before pushing.
Just wanted to leave a word that I can load this successfully on ArchLinux with the JetBrains Rider IDE. Thanks! I also tried to build it using:
The projects build did not work, but it is highly likely to be a setup issue. I can help debugging this if someone is interested, but I do not think that this PR should be affected in any way due to my "build on Linux" issue. |
Hi Thanks |
@lennoncork @ryanblackwell Just out of curiosity, is there any reason you are aiming as high as 1.6? It has always been my assumption that one should target as low as possible with .NETStandard and given that until the 2.0 tooling is RTM 1.6 is only compatible with .NET4.7+ (and at which point it might make sense to jump straight to .NETStandard2.0 as has been suggested by Christoph) it would seem to make sense to reduce the level as much as possible. 1.0/1.1 might be unreasonable but 1.4 could be a good compromise given that it's the current level which will be compatible with the same .NET Framework as 2.0. I'm obviously not taking into account the potentially numerous frameworks pre 4.5 which aren't compatible with any .NETStandard but hopefully that's by the by. |
Since portable libraries (that exists today) is more or less the same as .NETStandard 1.0 that should be the easiest to target. My guess is that it is the native providers that will create problems but just like they are missing from the portable libraries (if I understand things correctly) those could be left for later releases. Multi-targeting different versions of .NETStandard is quite easy once the first is set up. |
Just out of interest, I have rebased @ryanblackwell's changes on the latest master and added the following:
Feel free to cherry pick any changes from https://github.com/aignas/mathnet-numerics/tree/feature/vs2017. If there is desire for me to create a separate PR and do the final tidy up before the merge, let me know. :) |
I have also completed the unit-test porting to necoreapp1.1/2.0. I was using In order to run the tests (works under Linux): dotnet run -f netcoreapp1.1 -p UnitTests-2017.csproj The output from the initial run: Summary:
|
And I got all of the tests passing on my local branch. Some notes about what I have discovered about In case you would like to run a single test instead of all the unit tests, use the following shell command(nunit docs):
I had the following classes of failing tests:
Matrix Complex64 failureIt seems that this failure is because the serialization support for I chose to define Serialization of the RandomSourcesIt seems that the tests fail because the The locale test failuresThese were failing because of missing string comparison APIs compared to .NET framework. I am not too familiar with that side of things, so I disabled the running of the tests. |
@sebandraos, @eriove and @aignas this was our first real attempt to netstandard something as it was one of the baseline dependencies. We haven't done any work since and @ryanblackwell has returned to his studies so we weren't planning on any additional work just yet. However we're very keen to see this go in, so let me know what you need and I'll see if I can find someone on the team to make it happen. |
@lennoncork, I think that the branch in which I developed is complete (or should be almost there) so if there is any desire from the maintainers to get this into master, I could open a different PR and we could review the changes I made and hopefully get it merged. |
Any progress? |
Closing this, since this has been covered by another PR in the meantime and the first alpha releases of v4 with .Net Standard 1.3/2.0 support are out. Please let me know if you have any issues. Thanks a lot for your contributions! |
Created independent solution and project files demonstrating .NET Standard support and targeting multiple frameworks in the new project format. Have not attempted to support additional targets such as .NET 35 and Portable.