sdk: Tools built with imports fail

I have a tool (dotnet-ef) that depends on Ix-Async (a portable-windows8+net45+wp8 library). Its project.json looks like this.

{
  "compilationOptions": {
    "emitEntryPoint": true
  },
  "dependencies": {
    "Ix-Async": "1.2.5",
    "NETStandard.Library": "1.0.0-*"
  },
  "frameworks": {
    "dnxcore50": {
      "imports": "portable-net452+win81"
    }
  }
}

I’m trying to use that tool in a project with the following.

{
  "tools": {
    "dotnet-ef": "1.0.0-*"
  },
  "dependencies": {
    "NETStandard.Library": "1.0.0-*"
  },
  "frameworks": {
    "dotnet54": { }
  }
}

However running dotnet restore fails because the imports information used when building the tool is lost.

Restoring Tool 'dotnet-ef' for 'MyApp\obj\cb47a3d7-fd7d-48de-bda3-f29662e98d51\bin\project.json' in 'MyApp\obj\cb47a3d7-fd7d-48de-bda3-f29662e98d51\bin'
info : Restoring packages for MyApp\obj\cb47a3d7-fd7d-48de-bda3-f29662e98d51\bin\project.json...
error: Ix-Async 1.2.5 is not compatible with DNXCore,Version=v5.0.
error: Some packages are not compatible with DNXCore,Version=v5.0.
error: Ix-Async 1.2.5 is not compatible with DNXCore,Version=v5.0 (win7-x64).
error: Some packages are not compatible with DNXCore,Version=v5.0 (win7-x64).
error: Ix-Async 1.2.5 is not compatible with DNXCore,Version=v5.0 (win7-x86).
error: Some packages are not compatible with DNXCore,Version=v5.0 (win7-x86).
info : Committing restore...
info : Restore failed in 9329ms.

Note, this is also happening for Remotion.Linq (a portable-net45+win+wpa81+wp80 library).

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 18 (13 by maintainers)

Most upvoted comments

In case anybody needs it, I bodged a console app to use the latest sources to generate migrations anyway. Details here:

http://overengineer.net/generating-new-entity-framework-migrations-when-dotnet-ef-is-broken