-
Notifications
You must be signed in to change notification settings - Fork 687
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
Target netstandard2.0 and NH 5.1.0 #391
Conversation
Great job @vincentparrett. I will take a close look tomorrow. Thank you! |
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 think we can safely update global.json to:
{
"projects": [
"src"
],
"sdk": {
"version": "2.1.4"
}
}
And maybe update the tests and examples projects to 5.1.0 too.
Thanks in advance for your work! 👍
|
||
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'"> | ||
<PackageReference Include="NHibernate" Version="5.1.0" /> | ||
<PackageReference Include="System.Data.SqlClient" Version="4.4.3" /> |
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 need System.Data.SqlClient?
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.
Yes, it seems it is needed for the MsSqlConnectionStringBuilder
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 could create our own implementation of the builder like the MySqlConnectionStringBuilder. Because we use the connectionString only, and have no interaction with the sqlconnectionstringbuilder for the user.
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.
The use of a package that the developer does not have a interaction with it is not a good implementation. (the user only pass the connectionString as string)
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.
@danilobreda @mgoodfellow Seem right. You can take care of this in another PR when we finish this one?
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.
@jrgcubano yes i can, i will wait for this release.
Not sure why the build is failing? |
<Import Project="$(MSBuildThisFileDirectory)..\Shared.msbuild" /> | ||
|
||
<ItemGroup Condition="'$(TargetFramework)' == 'net461'"> | ||
<PackageReference Include="NHibernate" Version="5.0.3" /> |
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 think this should be 5.1.0 as well now? Because all the tests are based on 5.1.0 so we should target this entire release to that? 5.1.0 does support net461 as well
There are a bunch of other package updates available, all minor updates except for FluentAssertions, should I take those updates as part of this PR? |
Great job @vincentparrett! 👍 The error is due to a problem with AppVeyor. For now, you could comment the next line on "build.cake":
We will return to it when it works again.. Apart of this, we need a few more changes to get this done: Projects:
Build process (build.cake)
Do not worry now about the test projects packages version updates. Leave them for another PR. Let me know if you need help with this! Thanks! |
I have done all requested except for
Not really sure how to handle that.. beyond my experience with dotnet core or with cake. |
Thanks again @vincentparrett. 👍 Just one last step and we are ready. Projects:
Build process (build.cake)
|
The test projects do not work with netcoreapp2
Server stack trace: Exception rethrown at [0]: Test Run Summary An error occurred when executing task 'Test'. |
Seems like the nunit console runner doesn't work with netcoreapp2, I tried updating nunit to the latest version, that didn't help, tried updating nunit console but that made things worse. |
I have not been able to get the unit tests running for netcoreapp2.0 - perhaps someone else would have better luck, I don't have any more free time to spend on this. |
@vincentparrett I have found with NUnit + netcoreapp2.0 you also need Microsoft.NET.Test.Sdk added to the project. Depending on the environment it is running in it also needs "runners". To run from within Resharper in VS, you need NUnit3TestAdapter. There is a runners package that includes a bunch of them which might be a good idea considering it will be running on CI servers. |
@mgoodfellow The runners package is marked as deprecated, and suggests to use the console. The error I'm stuck on now is :
|
@mgoodfellow nunit/nunit-console#364 link to issue on the nunit-console |
@vincentparrett it looks as though DotNetCoreTestSettings takes an "ArgumentCustomization" that would let you specify a Platform: https://cakebuild.net/api/Cake.Common.Tools.DotNetCore.Test/DotNetCoreTestSettings/
|
@vincentparrett Great job! It seems that there are external libraries pending to upgrade to netcore2.0, so I agree with you, let's move forward and we will be adding tests for netcore2.0 on other version.
Apart of this, I'm planing a tests refactor to move all (specs and unit) to xunit on other PR. |
Hola @jrgcubano, How is this coming along? ETA? Gracias! |
We finish the release in #400 @fabriciomrtnz Thanks |
NHibernate 5.1 was released in the last 24hours, with support for netstandard2.0. This PR attempts to add that support. To get it to build I had to delete global.json so it would use the lastest non preview sdk version (2.1.101) - I didn't commit that.