Skip to content
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

DNX support #14

Closed
wants to merge 3 commits into from
Closed

DNX support #14

wants to merge 3 commits into from

Conversation

russcam
Copy link

@russcam russcam commented Apr 12, 2016

Added Core CLR support targeting net45 and dotnet TFMs i.e. .NET 4.5 onwards and Core CLR.

Converted

  • WebDiffer to ASP.NET Core project (kept the project in WebDiffer.old)
  • Test project to use dnx runner for xunit tests

Addresses #12

An alternative way to support CoreCLR would be to convert the existing PCL library to target .NET Core using Oren Novotny's ReferenceGenerator, although this PR is probably more progressive in the direction the tooling is headed 😄

May need to make .csproj and project.json play nicely together (search for This is actually slightly problematic).

We have been using a MyGet hosted version of this for NEST/Elasticsearch.Net since January without issues.

@mmanela
Copy link
Owner

mmanela commented Apr 12, 2016

Should the project.lock.json be checked in?

@mmanela
Copy link
Owner

mmanela commented Apr 12, 2016

Also, I am a bit new to working with the new DNX projects. Can you shared the simple steps for building the solution command line and running tests?

@russcam
Copy link
Author

russcam commented Apr 13, 2016

building from the command line for dnx is a little bit tricky as a user can install different versions of the tooling, build against different versions, etc. in addition to running different runtimes e.g. CLR, Core CLR. We use F# FAKE in our project to smooth over a lot of this to

  1. check to update dnx tooling on start of build (to run with latest)
  2. build the solution for both CLR and Core CLR (in our case net45, net46 and dotnet5.1 currently, at least until RC2 has landed)
  3. run tests against CLR and Core CLR
  4. package nuget packages (which will get packaged using the project.jsons file by the dnx tooling).

Maybe it'd be worth putting something similar in for this? If not, the dnx tooling command line wiki has some details on the commands available.

Oh, with project.lock.json, it's debatable about whether it should be checked in or not; looks like the team is advocating to not check it in 😄

@mmanela
Copy link
Owner

mmanela commented Apr 13, 2016

Ok, so please remove the lock files :)

I tried to use "dotnet build" but it needs a project.json, how can I use that to build all project.json files?

@russcam
Copy link
Author

russcam commented Apr 14, 2016

dotnet is the newer .NET CLI, this PR uses the dnx toolchain i.e. dnvm/dnu/dnx. Last I looked at dotnet CLI, it was still very rough around the edges and part of the reason we haven't moved to it yet (waiting for RC2).

Unfortunately I don't believe it is possible to build all projects with one command; each project (and project.json) needs to be built separately

@mmanela
Copy link
Owner

mmanela commented Apr 18, 2016

So with this code would I build each solution separately and generate two different nuget packages?

@russcam
Copy link
Author

russcam commented Apr 21, 2016

With this solution, when you execute

dnu pack

in the directory of the project that you wish to build nuget packages for, it will build each framework version specified in the project.json and package them all into one nuget package.

Would you prefer a PR using the newer dotnet CLI?

@mmanela
Copy link
Owner

mmanela commented Apr 23, 2016

Yes please. Lets use the newer dotnet CLI.

@russcam russcam mentioned this pull request Nov 20, 2016
@russcam
Copy link
Author

russcam commented Nov 20, 2016

Closing in favour of #17.

Updated to .NET Core 1.0 (can update this to .NET Core 1.1 if need be).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants