scientistproject/Scientist.net

dnxcore50 not supported

Closed this issue · 13 comments

According to @jpsingleton in #35 (this comment), dnxcore50 is not supported. He gets an error saying:

NU1002 The dependency Scientist 1.0.0-alpha5 in project ... does not support framework DNXCore,Version=v5.0.

I think this has to do with confusion regarding the target frameworks, and nuget, and things constantly switching in the dotnet project.

We're targeting dotnet5.2, which in theory should allow this to run on .NET 4.5 and dnxcore50 among others. Nuget is showing dependencies on dnx451 and .NETPlatform 5.2, which isn't 100% correct (dotnet5.2 is actually .NETPlatform 5.1).

I haven't had a chance to test things fully, but we might have to change this to specifically target the different frameworks (i.e. target dnxcore50, net451, etc) on their own instead of using the dotnet5.2 monikor.

Yeah, it is a bit of a moving target. RC2 should be out fairly soon and things will hopefully settle down.

In RC2 I now get a different error.

Cycle detected: 
  Scientist (>= 1.0.0) -> Scientist (>= 1.0.0-alpha5) -> Scientist (>= 1.0.0-alpha5).

and

MSB4006 There is a circular dependency in the target dependency graph involving target "GetCopyToOutputDirectoryItems".

Anyone know how to fix this?

FYI the above was for ASP.NET Core. With a console app I can't even restore the package.

Package Scientist 1.0.0-alpha5 is not compatible with netcoreapp1.0 (.NETCoreApp,Version=v1.0). Package Scientist 1.0.0-alpha5 supports:
  - dnx451 (DNX,Version=v4.5.1)
  - dotnet5.2 (.NETPlatform,Version=v5.2)
One or more packages are incompatible with .NETCoreApp,Version=v1.0.

I think the PR targeting netstandard1.5 is the way to go. Although Dapper targets 1.3.
project.json may change, but I wouldn't worry about that just yet.

It looks like it should be able to rollback to target netstandard1.3 without any issues. The examples for what the monikers support indicates that there are a couple of pieces that this framework is not using. It may be possible to target a lower framework. I tried restoring/building with netstandard1.1 and everything seemed to work fine, however i'm just shooting in the dark here.

As far as I understand things, these new targets allow you to balance functionality with platform support. Higher numbers support everything from the lower ones but add new APIs, as they are ported. So if you don't need those APIs you can target a lower version and support more platforms.

It probably doesn't matter for now, as you're only looking to add support for .NET Core. If it all works on netstandard1.3 then I'd just go with that. If you want to support more platforms in the future then sticking to the 1.1 APIs could be useful, but it's probably too early to say. The examples don't show what's new in 1.5.

Thanks, I'll check alpha6 when I find some time.

OK, I can install and build this for a .NET Core console app but for an ASP.NET Core web app I still get this error:

error: Cycle detected: 
error:   Scientist (>= 1.0.0) -> Scientist (>= 1.0.0-alpha6) -> Scientist (>= 1.0.0-alpha6).

It might just be in a weird state so I'll try with a fresh web app.

Yeah, works fine with a new template. All good.

I might have some old files lurking around somewhere.

I just gave this a double check, and I was successfully able to test alpha6 against a .NET Core RC2 Web API.

Thanks for testing it! ✨