-
-
Notifications
You must be signed in to change notification settings - Fork 192
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
Adding .net Core compatible PCL #8
Conversation
Made required changes in existing projects to allow everything in new PCL to build using references to the same source files. .net Core compatible test project only exercises branches of new PCL which veer off from behaviour of main and older Portable projects.
Steve this is great. I have an internal tool that I have built to increment versions, perform builds using MSBuild and create NuGet packages on the fly using the NuGet API. It does a great many other things too like run unit tests and upload to NuGet. The build process would need to change for the .NET Core. Some questions:
Thanks, |
Hey, 1. What is the folder distribution for .NET Core for NuGet packages? Manually tweaking the latest CompareNetObjects package using NuGetPackageExplorer and adding this folder with a copy of the new PCL binaries results in a package which works on Linux with .net Core. For background, it seems that with NuGet v3.3 we use "dotnet54" and this becomes "netstandard14" with NuGet v3.4 (from here: https://docs.nuget.org/create/targetframeworks). 2. What is the folder distribution for PCL Profile 111? 3. What MSBuild parameters would I use to build .NET Core? To build the NuGet package (from root of solution)
Points to note:
To run tests using CoreCLR runtime (from root of solution)
People do talk about using MSBuild to compile an xproj but it sounds like they advise using the DNU commands directly e.g. I can see TeamCity is offering a plugin which also goes in this direction. What do you think about incorporating use of the DNX CLI tools? Cheers, |
Thanks for all the great information. It will be a while until I can get to this. We just started a Hackathon at work at night, plus I have my normal day job, my side business, and three kids. |
Hey Greg, thanks for the update. |
@steviehailey , @GregFinzer , I'm trying to get this to work in a new .net core 1.0.0 class library and I'm getting the error "The type 'List<>' is defined in an assembly that is not referenced. You must add a reference to assembly 'mscorlib, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e, Retargetable=Yes'" @steviehailey , you said you got this working with .netcore somehow. What's the secret? I tried even just importing the whole project into my solution and messing around with different options int he project.json but I can't get it to properly recognize dependencies. |
Ah wait, no, this was user error. I was still actually targeting the nuget version instead of the local version. Of note though, you'll need to update your project.json for the changes in the RTM version. |
@steviehailey or @bestekov how do I update the project.json to the RTM version? |
I used these two guides: I ran into a bunch of compatibility issues with the main Compare-NET-Objects library when I tried to target netstandard1.6 (the current class library target for core), so I ended up just using net451 for the framework (I'm using this for a one-off utility on windows so being cross-platform wasn't vital to me). Here's the project.json I ended up with for the NewPcl project: Honestly, I'm pretty new to c# and programming in general, so my understanding of how all the new pieces fit together is a bit murky, but by doing this I was able to reference the project from a .net core class library. |
This PR adds a new Portable Class Library project targetting net451 and portable5.4 which, for example, works with .net Core projects running on CoreCLR on Linux. Here is a summary of the changes I had to make to implement this followed by a few questions around stylistic preferences and how the existing test and packaging setup works.
Changes
Questions