-
Notifications
You must be signed in to change notification settings - Fork 199
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
Add dotnet core support #72
Conversation
nice! for appveyor, change appveyor.yml, see https://github.com/NLog/NLog/blob/0f332debd618962bd97f9c31c4d4d3274cfef5f5/appveyor.yml and https://github.com/NLog/NLog/blob/0f332debd618962bd97f9c31c4d4d3274cfef5f5/build-simple.bat |
} | ||
} | ||
} | ||
} |
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'm missing "strong naming"?
@304NotModified I could, but we still need to run the tests which currently use NUnit. And I believe xunit is the only dotnet test compatible test runner. |
@@ -22,6 +24,8 @@ | |||
// The following GUID is for the ID of the typelib if this project is exposed to COM | |||
[assembly: Guid("16af04e9-e712-417e-b749-c8d10148dda9")] | |||
|
|||
#endif | |||
|
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.
[assembly: AssemblyVersion("1.0.0.0")]
(and maybe others) can be removed isn't it?
Adds project.json and necessary #if regions to build for netstandard 1.3
Thanks a lot for the PR. I've pulled your changes to the
Still to do:
Things that are not clear to me yet:
Thoughts? |
No, it even not used ;)
AFAIK the versions should be at least in project.json and assembly patching won't work.
Unclear as most of the .NET Core stuff. We know it's gonna break, but not when, how and sometimes why. PS if you're waiting on NUnit, why not moving to xUnit? I think the move is really easy in this case |
|
Its possible to grab AppVeyor's version from an environment variable, but I don't think you can use them in project.json. You might have to use a script to modify it after checkout. I am not sure what other .NET core repositories do.
No idea, Microsoft keep changing their mind about everything every month. It says in that article that they will convert the project.json for you in DEV15 RTM. |
Anyway, automatic versions are bad anyway. Very difficult to change them semver compatible.
Indeed, I'm also how many breaking changes there are between RC and RTM. IMO there should be none, but MS doesn't really understand the terms RC and RTM IMO. |
I think it's mostly all working now: https://ci.appveyor.com/project/mganss/htmlsanitizer/build/3.3.118 One thing I still don't get are the .xproj files. The test project doesn't have one, only a project.json file, and still everything seems to work. I know .xproj files are only needed for VS but the .sln still references the .csproj files. Do you know how this is supposed to work? @304NotModified The version number in your screenshot is obviously broken, it's from an intermediate build. But AFAICT it should be a valid version. Both versioning and strong naming work now. |
@mganss xproj files are just more less a wrapper around the project.json files. You don't need both a .csproj and a .xproj, just an .xproj. |
OK, I think I have figured it out now. I've added a separate .NET Core .sln that references the .xproj files. You can now either open the "regular" .sln (referencing the .csprojs) and build only for net45/net451 or the .dotnet.sln which builds both net45/1 and netstandard1.3/netcoreapp1.0. I've also added back OpenCover support using I'm considering merging to master and releasing a beta NuGet package. What do you think? |
That would be good, its the last package I need upgraded to be able to migrate my application to dotnet core. |
Done |
@mganss just letting you know that I am now using the dotnet core package from NuGet and it appears to working fine in my asp.net core rc2 app! |
Adds project.json and necessary #if regions to build for netstandard 1.3.
I am not sure how you want to configure AppVeyor to build this. The new way to create the nuget package that targets both .NET 4.5 and .NET CORE is to do the following:
Other repositories that do dotnet core: