Common.Tests.sln not building
I am having trouble building the Common.Tests solution file and I'm getting 2 errors about not being compatible with DNXCore (see screenshot)
cc: @ericstj
I looked at this before. It is a descrepency between the NuGet codebase and DNX. In DNX they have a hack to treat portable-net45+win8 as compatible with DNXCore50. That hack doesn't exist in NuGet. VS is using NuGetto try to restore the project.json and that is why it is failing. Let me file an issue on NuGet. Another fix would be for XUnit to either support DNXCore50 explicitly or with a dotnet folder. /cc @bradwilson.
Given the comment here, I'm guessing aspnet doesn't want to port this to NuGet: https://github.com/aspnet/dnx/blob/8ddcfe9661188784fad37ea8d3b2965d3b4e756f/src/Microsoft.Dnx.Runtime/NuGet/Utility/VersionUtility.cs#L881-L895 /cc @davidfowl
Thanks for the response.. What would you suggest be the best way for me to get it working?
It still works using DNX. If you build first from the commandline (which is using DNX) it should work in VS. NuGet should see that the project.lock.json is up to date and not try to re-restore.
This is a UWP tooling bug. My understanding is that it will eventually be fixed. The workaround is to uncheck DNXCore5.0 support in the PCL dialog. You will still actually be DNXCore5.0 compatible, and this bug goes away.
Thanks Brad but how do I do that?.. I'm new to this ;-)
Actually this is a little different. Brad, these are project.jsons that only target DNXCore50 but associated with CSProjs not xproj's it's a bit of an artificial scenario that existing customers don't hit with inbox templates. Today in XProj/DNX this specific package is only working because of the hack in DNX that I pointed out.
Given the comment in the DNX codebase you probably need to update XUnit if you want it to keep working in XProj/DNXCore50. @DavidFowl can correct me, but I bet they'll act on that TODO during RC2. Looking at the content of Xunit.Abstractions you could simply add a dotnet folder and put the same thing in there as the one in portable-net45+win8+wp8+...
Thanks @ericstj but I'm still a little unsure with exactly what I need to do.. What directory would I need to add the sorbet folder to?
Sorry I meant dotnet folder!
@craigahanson if you just want to get corefx building, according to Eric's comment above it should work in VS if you build first from the commandline via build.cmd.
Well @davidfowl and I have had rows on this before, but I believe that you are making a HUGE mistake if you don't automatically assume any System.Runtime-based PCL isn't already compatible with dnxcore50. This isn't just an xUnit.net problem, this is a general software ecosystem problem.
@craigahanson can you try modifying the project.json to the following:
"frameworks": {
"dnxcore50": {
"imports": "portable-net45+win8"
}
}
This should force NuGet to treat DNXCore50 as compatible with portable-net45+win8.
/cc @dagood
Ping. If I don't hear back I will close this issue.
I tested this and it worked for me. Closing this for now. Reopen if it doesn't work for you.
/cc @dagood who will be making similar changes across the repo as we switch to using nuget.exe instead of DNU.