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

Need external dependencies to support .NET Standard in order to remove the requirement for imports in project.json #5176

Closed
divega opened this Issue Apr 26, 2016 · 23 comments

Comments

Projects
None yet
8 participants
@divega
Member

divega commented Apr 26, 2016

Two of EF Core's dependencies, Remotion.Linq and Ix-Async currently use pre-existing portable targets to support multiple platforms. Until these packages add support for .NET Standard, libraries or applications using EF Core will need to specify additional import attributes in project.json.

    Package Ix-Async 1.2.5 is not compatible with netcoreapp1.0 (.NETCoreApp,Version=v1.0). 
    Package Ix-Async 1.2.5 supports:
      - net40 (.NETFramework,Version=v4.0)
      - net45 (.NETFramework,Version=v4.5)
      - portable-net45+win8+wp8 (.NETPortable,Version=v0.0,Profile=Profile78)
    Package Remotion.Linq 2.0.2 is not compatible with netcoreapp1.0 (.NETCoreApp,Version=v1.0). 
    Package Remotion.Linq 2.0.2 supports:
      - net35 (.NETFramework,Version=v3.5)
      - net40 (.NETFramework,Version=v4.0)
      - net45 (.NETFramework,Version=v4.5)
      - portable-net45+win8+wp8+wpa81 (.NETPortable,Version=v0.0,Profile=Profile259)

These two issues track the necessary changes in our dependencies:

dotnet/reactive#174
https://www.re-motion.org/jira/browse/RMLNQ-98

Cc: @natemcmaster @rowanmiller

@divega divega changed the title from Need external dependencies to support .NET Standard in order to remove the need for imports to Need external dependencies to support .NET Standard in order to remove the requirement for imports in project.json Apr 26, 2016

@rowanmiller rowanmiller added this to the 1.0.0 milestone Apr 26, 2016

@stannynuytkens

This comment has been minimized.

Show comment
Hide comment
@stannynuytkens

stannynuytkens May 3, 2016

Hi what is the supposed workaround?

stannynuytkens commented May 3, 2016

Hi what is the supposed workaround?

@natemcmaster

This comment has been minimized.

Show comment
Hide comment
@natemcmaster

natemcmaster May 4, 2016

Member

Use "imports" in project.json.

"frameworks": {
    "netcoreapp1.0": {
       "imports": "portable-net451+win8"
    }
}
Member

natemcmaster commented May 4, 2016

Use "imports" in project.json.

"frameworks": {
    "netcoreapp1.0": {
       "imports": "portable-net451+win8"
    }
}
@stannynuytkens

This comment has been minimized.

Show comment
Hide comment
@stannynuytkens

stannynuytkens May 4, 2016

Hi, still getting EntityFramework.Core 7.0.0-rc1-final is not compatible with .NETPlatform,Version=v5.0.

stannynuytkens commented May 4, 2016

Hi, still getting EntityFramework.Core 7.0.0-rc1-final is not compatible with .NETPlatform,Version=v5.0.

@davidfowl

This comment has been minimized.

Show comment
Hide comment
@davidfowl

davidfowl May 4, 2016

Member

@stannynuytkens can you provide more details? That looks you have a bad project.json

Member

davidfowl commented May 4, 2016

@stannynuytkens can you provide more details? That looks you have a bad project.json

@stannynuytkens

This comment has been minimized.

Show comment
Hide comment
@stannynuytkens

stannynuytkens May 4, 2016

{
"supports": {
"net46.app": {},
"dnxcore50.app": {}
},
"dependencies": {
"Microsoft.NETCore": "5.0.0",
"Microsoft.NETCore.Portable.Compatibility": "1.0.0"
},
"frameworks": {
"dotnet": {
"imports": "portable-net451+win8"
}
}
}

stannynuytkens commented May 4, 2016

{
"supports": {
"net46.app": {},
"dnxcore50.app": {}
},
"dependencies": {
"Microsoft.NETCore": "5.0.0",
"Microsoft.NETCore.Portable.Compatibility": "1.0.0"
},
"frameworks": {
"dotnet": {
"imports": "portable-net451+win8"
}
}
}

@stannynuytkens

This comment has been minimized.

Show comment
Hide comment
@stannynuytkens

stannynuytkens May 4, 2016

Just trying to add EntityFramework.Core to a 4.6.1 Portable class library for use in a .net core app.

stannynuytkens commented May 4, 2016

Just trying to add EntityFramework.Core to a 4.6.1 Portable class library for use in a .net core app.

@stannynuytkens

This comment has been minimized.

Show comment
Hide comment
@stannynuytkens

stannynuytkens May 4, 2016

Full output:

Restoring packages for 'BitBite.Data'.
Restoring packages for C:\Users\nuytk\Documents\Visual Studio 2015\Projects\BitBite\BitBite.Data\project.json...
Detected package downgrade: System.Reflection from 4.1.0-beta-23225 to 4.0.10
BitBite.Data (>= 1.0.0) -> EntityFramework.Core (>= 7.0.0-rc1-final) -> Microsoft.Extensions.DependencyInjection.Abstractions (>= 1.0.0-rc1-final) -> System.Reflection (>= 4.1.0-beta-23225)
BitBite.Data (>= 1.0.0) -> EntityFramework.Core (>= 7.0.0-rc1-final) -> System.Reflection (>= 4.0.10)
Detected package downgrade: System.Reflection from 4.1.0-beta-23225 to 4.0.10
BitBite.Data (>= 1.0.0) -> EntityFramework.Core (>= 7.0.0-rc1-final) -> Microsoft.Extensions.Logging.Abstractions (>= 1.0.0-rc1-final) -> System.Reflection (>= 4.1.0-beta-23225)
BitBite.Data (>= 1.0.0) -> EntityFramework.Core (>= 7.0.0-rc1-final) -> System.Reflection (>= 4.0.10)
Version conflict detected for System.Collections.
BitBite.Data (>= 1.0.0) -> EntityFramework.Core (>= 7.0.0-rc1-final) -> System.Collections (>= 4.0.11-beta-23516)
BitBite.Data (>= 1.0.0) -> Microsoft.NETCore.Portable.Compatibility (>= 1.0.0) -> Microsoft.NETCore.Runtime (>= 1.0.0) -> Microsoft.NETCore.Runtime.CoreCLR-x86 (>= 1.0.0) -> System.Collections (= 4.0.10).
EntityFramework.Core 7.0.0-rc1-final is not compatible with .NETPlatform,Version=v5.0.
Some packages are not compatible with .NETPlatform,Version=v5.0.
Ix-Async 1.2.5 is not compatible with DNXCore,Version=v5.0.
Remotion.Linq 2.0.1 is not compatible with DNXCore,Version=v5.0.
Some packages are not compatible with DNXCore,Version=v5.0.
Ix-Async 1.2.5 is not compatible with DNXCore,Version=v5.0 (win7-x86).
Remotion.Linq 2.0.1 is not compatible with DNXCore,Version=v5.0 (win7-x86).
Some packages are not compatible with DNXCore,Version=v5.0 (win7-x86).
Ix-Async 1.2.5 is not compatible with DNXCore,Version=v5.0 (win7-x64).
Remotion.Linq 2.0.1 is not compatible with DNXCore,Version=v5.0 (win7-x64).
Some packages are not compatible with DNXCore,Version=v5.0 (win7-x64).
Package restore failed for 'BitBite.Data'.
Package restore failed. Rolling back package changes for 'BitBite.Data'.
========== Finished ==========

stannynuytkens commented May 4, 2016

Full output:

Restoring packages for 'BitBite.Data'.
Restoring packages for C:\Users\nuytk\Documents\Visual Studio 2015\Projects\BitBite\BitBite.Data\project.json...
Detected package downgrade: System.Reflection from 4.1.0-beta-23225 to 4.0.10
BitBite.Data (>= 1.0.0) -> EntityFramework.Core (>= 7.0.0-rc1-final) -> Microsoft.Extensions.DependencyInjection.Abstractions (>= 1.0.0-rc1-final) -> System.Reflection (>= 4.1.0-beta-23225)
BitBite.Data (>= 1.0.0) -> EntityFramework.Core (>= 7.0.0-rc1-final) -> System.Reflection (>= 4.0.10)
Detected package downgrade: System.Reflection from 4.1.0-beta-23225 to 4.0.10
BitBite.Data (>= 1.0.0) -> EntityFramework.Core (>= 7.0.0-rc1-final) -> Microsoft.Extensions.Logging.Abstractions (>= 1.0.0-rc1-final) -> System.Reflection (>= 4.1.0-beta-23225)
BitBite.Data (>= 1.0.0) -> EntityFramework.Core (>= 7.0.0-rc1-final) -> System.Reflection (>= 4.0.10)
Version conflict detected for System.Collections.
BitBite.Data (>= 1.0.0) -> EntityFramework.Core (>= 7.0.0-rc1-final) -> System.Collections (>= 4.0.11-beta-23516)
BitBite.Data (>= 1.0.0) -> Microsoft.NETCore.Portable.Compatibility (>= 1.0.0) -> Microsoft.NETCore.Runtime (>= 1.0.0) -> Microsoft.NETCore.Runtime.CoreCLR-x86 (>= 1.0.0) -> System.Collections (= 4.0.10).
EntityFramework.Core 7.0.0-rc1-final is not compatible with .NETPlatform,Version=v5.0.
Some packages are not compatible with .NETPlatform,Version=v5.0.
Ix-Async 1.2.5 is not compatible with DNXCore,Version=v5.0.
Remotion.Linq 2.0.1 is not compatible with DNXCore,Version=v5.0.
Some packages are not compatible with DNXCore,Version=v5.0.
Ix-Async 1.2.5 is not compatible with DNXCore,Version=v5.0 (win7-x86).
Remotion.Linq 2.0.1 is not compatible with DNXCore,Version=v5.0 (win7-x86).
Some packages are not compatible with DNXCore,Version=v5.0 (win7-x86).
Ix-Async 1.2.5 is not compatible with DNXCore,Version=v5.0 (win7-x64).
Remotion.Linq 2.0.1 is not compatible with DNXCore,Version=v5.0 (win7-x64).
Some packages are not compatible with DNXCore,Version=v5.0 (win7-x64).
Package restore failed for 'BitBite.Data'.
Package restore failed. Rolling back package changes for 'BitBite.Data'.
========== Finished ==========

@davidfowl

This comment has been minimized.

Show comment
Hide comment
@davidfowl

davidfowl May 4, 2016

Member

Yea, the project.json isn't right. You can't use the dotnet TFM (it's pretty much deprecated at this point). What are you trying to do? Write a portable class library that uses EF Core?

Member

davidfowl commented May 4, 2016

Yea, the project.json isn't right. You can't use the dotnet TFM (it's pretty much deprecated at this point). What are you trying to do? Write a portable class library that uses EF Core?

@stannynuytkens

This comment has been minimized.

Show comment
Hide comment
@stannynuytkens

stannynuytkens May 4, 2016

Hi David, yeah that's about exactly what I'm trying to do. =)

stannynuytkens commented May 4, 2016

Hi David, yeah that's about exactly what I'm trying to do. =)

@davidfowl

This comment has been minimized.

Show comment
Hide comment
@davidfowl

davidfowl May 4, 2016

Member

First thing you need to do is install update 2 and change the portable class library to a .NET Standard class library by right clicking and using the project properties. Also make sure you have the latest version of the NuGet client

Member

davidfowl commented May 4, 2016

First thing you need to do is install update 2 and change the portable class library to a .NET Standard class library by right clicking and using the project properties. Also make sure you have the latest version of the NuGet client

@stannynuytkens

This comment has been minimized.

Show comment
Hide comment
@stannynuytkens

stannynuytkens May 4, 2016

Thank you David, will do.

EDIT: that works but I can't add a reference to my data library from the dotnetcore project.
The error states https://onedrive.live.com/redir?resid=B23C8D8FE481E2C3!27913&authkey=!AAc_d6GmlZ6Y8q4&v=3&ithint=photo%2cPNG

stannynuytkens commented May 4, 2016

Thank you David, will do.

EDIT: that works but I can't add a reference to my data library from the dotnetcore project.
The error states https://onedrive.live.com/redir?resid=B23C8D8FE481E2C3!27913&authkey=!AAc_d6GmlZ6Y8q4&v=3&ithint=photo%2cPNG

@natemcmaster

This comment has been minimized.

Show comment
Hide comment
@natemcmaster

natemcmaster May 4, 2016

Member

@stannynuytkens this conversation has deviated from the original issue. Can you open a new issue on http://github.com/aspnet/home?

Member

natemcmaster commented May 4, 2016

@stannynuytkens this conversation has deviated from the original issue. Can you open a new issue on http://github.com/aspnet/home?

@onovotny

This comment has been minimized.

Show comment
Hide comment
@onovotny

onovotny May 17, 2016

We have an unofficial build of Ix-Async here that has netstandard support. Work is in progress to make it official.

dotnet/reactive#148 (comment)

http://myget.org/gallery/rxnet

onovotny commented May 17, 2016

We have an unofficial build of Ix-Async here that has netstandard support. Work is in progress to make it official.

dotnet/reactive#148 (comment)

http://myget.org/gallery/rxnet

@natemcmaster

This comment has been minimized.

Show comment
Hide comment
@natemcmaster

natemcmaster May 17, 2016

Member

@onovotny good news.

Work is in progress to make it official.

I assume this is why the assemblies aren't strong-named yet?

Member

natemcmaster commented May 17, 2016

@onovotny good news.

Work is in progress to make it official.

I assume this is why the assemblies aren't strong-named yet?

@onovotny

This comment has been minimized.

Show comment
Hide comment
@onovotny

onovotny May 17, 2016

Bingo. We could do an OSS sign but the Rx.NET repo only has the public keys checked in. There are two things we need -- the full SNK and Authenticode. The Authenticode signing will be moving to the .NET Foundation, not sure how this affects the strong name, or are those separate?

onovotny commented May 17, 2016

Bingo. We could do an OSS sign but the Rx.NET repo only has the public keys checked in. There are two things we need -- the full SNK and Authenticode. The Authenticode signing will be moving to the .NET Foundation, not sure how this affects the strong name, or are those separate?

@natemcmaster

This comment has been minimized.

Show comment
Hide comment
@natemcmaster

natemcmaster May 17, 2016

Member

@onovotny IIUC strong name and authenticode are separate. e.g. EF nightly builds on myget.org/gallery/aspnetcidev have been built with strong-named signing but haven't been code-signed yet.

Side note: I'm testing the builds on http://myget.org/gallery/rxnet. Where should I file issues? Do you have a fork?

Member

natemcmaster commented May 17, 2016

@onovotny IIUC strong name and authenticode are separate. e.g. EF nightly builds on myget.org/gallery/aspnetcidev have been built with strong-named signing but haven't been code-signed yet.

Side note: I'm testing the builds on http://myget.org/gallery/rxnet. Where should I file issues? Do you have a fork?

@bricelam bricelam added the area-tools label May 25, 2016

@divega divega added the task label May 28, 2016

natemcmaster added a commit to natemcmaster/EntityFrameworkCore that referenced this issue May 31, 2016

natemcmaster added a commit to natemcmaster/EntityFrameworkCore that referenced this issue Jun 7, 2016

natemcmaster added a commit to natemcmaster/EntityFrameworkCore that referenced this issue Jun 7, 2016

natemcmaster added a commit to natemcmaster/EntityFrameworkCore that referenced this issue Jun 7, 2016

natemcmaster added a commit to natemcmaster/EntityFrameworkCore that referenced this issue Jun 8, 2016

@natemcmaster natemcmaster removed the blocked label Jun 8, 2016

@natemcmaster

This comment has been minimized.

Show comment
Hide comment
@natemcmaster

natemcmaster Jun 8, 2016

Member

Merged #5689, which means using EF Core 1.0 won't require "imports" in .NET Core apps.

Thanks to @MichaelKetting @shiftkey @onovotny @bartdesmet for their work to update Ix-Async and Re-linq to support .NET Standard.

Member

natemcmaster commented Jun 8, 2016

Merged #5689, which means using EF Core 1.0 won't require "imports" in .NET Core apps.

Thanks to @MichaelKetting @shiftkey @onovotny @bartdesmet for their work to update Ix-Async and Re-linq to support .NET Standard.

@natemcmaster natemcmaster added 2 - Done and removed area-tools labels Jun 8, 2016

@onovotny

This comment has been minimized.

Show comment
Hide comment
@onovotny

onovotny Jun 8, 2016

Quick question -- where are you currently pulling the Ix bits from? FWIW, the latest version on the myget feed is OSS signed with the SNK and has the granular dependencies applied.

onovotny commented Jun 8, 2016

Quick question -- where are you currently pulling the Ix bits from? FWIW, the latest version on the myget feed is OSS signed with the SNK and has the granular dependencies applied.

@natemcmaster

This comment has been minimized.

Show comment
Hide comment
@natemcmaster

natemcmaster Jun 8, 2016

Member

@onovotny we mirrored System.Interactive.Async to our CI build feeds for now. http://myget.org/feed/aspnetcidev/package/nuget/System.Interactive.Async. When the updated version lands on NuGet.org, we will use that instead.

Member

natemcmaster commented Jun 8, 2016

@onovotny we mirrored System.Interactive.Async to our CI build feeds for now. http://myget.org/feed/aspnetcidev/package/nuget/System.Interactive.Async. When the updated version lands on NuGet.org, we will use that instead.

@wpostma

This comment has been minimized.

Show comment
Hide comment
@wpostma

wpostma Oct 21, 2016

So this is closed, but a project.json containing only dnxcore are still not compatible with EntityFrameworkCore.MicrosoftSqlServer? I still need this workaround:

"frameworks": {    "netstandard1.6": {
      "imports": [ "dnxcore50", "portable-net451+win8" ]
    }

When will this workaround go away?

wpostma commented Oct 21, 2016

So this is closed, but a project.json containing only dnxcore are still not compatible with EntityFrameworkCore.MicrosoftSqlServer? I still need this workaround:

"frameworks": {    "netstandard1.6": {
      "imports": [ "dnxcore50", "portable-net451+win8" ]
    }

When will this workaround go away?

@divega

This comment has been minimized.

Show comment
Hide comment
@divega

divega Oct 21, 2016

Member

@wpostma EntityFrameworkCore.MicrosoftSqlServer is an old package from when this issue existed. If you are using 1.0.0 RTM or greater you should use Microsoft.EntityFrameworkCore.SqlServer instead.

Member

divega commented Oct 21, 2016

@wpostma EntityFrameworkCore.MicrosoftSqlServer is an old package from when this issue existed. If you are using 1.0.0 RTM or greater you should use Microsoft.EntityFrameworkCore.SqlServer instead.

@wpostma

This comment has been minimized.

Show comment
Hide comment
@wpostma

wpostma Oct 21, 2016

What's odd then is that the VS IDE still picks up and suggests adding "EntityFrameworkCore.MicrosoftSqlServer" to my project.json when it can't find references to things like DbContext.
It's like intellisense doesn't notice that my project.json already is at .net core 1.0.1 (or 1.0.0) and suggests old junk?

wpostma commented Oct 21, 2016

What's odd then is that the VS IDE still picks up and suggests adding "EntityFrameworkCore.MicrosoftSqlServer" to my project.json when it can't find references to things like DbContext.
It's like intellisense doesn't notice that my project.json already is at .net core 1.0.1 (or 1.0.0) and suggests old junk?

@divega

This comment has been minimized.

Show comment
Hide comment
@divega

divega Oct 21, 2016

Member

@wpostma I am not sure how the suggestion mechanism works internally but I ran an experiment in my machine and it seems to remember packages that you have used in previous VS sessions. So I think this may be a good time to remove pre-RTM packages from other projects, local NuGet cache, etc.

Member

divega commented Oct 21, 2016

@wpostma I am not sure how the suggestion mechanism works internally but I ran an experiment in my machine and it seems to remember packages that you have used in previous VS sessions. So I think this may be a good time to remove pre-RTM packages from other projects, local NuGet cache, etc.

@divega divega added the closed-fixed label Oct 21, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment