question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Microsoft.DotNet.Cli.Utils 1.0.0-preview2-003121 is not compatible with netcoreapp1.0

See original GitHub issue

Steps to reproduce

In Package Manger Console, run the following:

dotnet new
dotnet restore
install-package Microsoft.EntityFrameworkCore.Tools -Pre
dotnet restore

Expected behavior

PM> dotnet restore
log  : Restoring packages for C:\Users\[...]\project.json...
info :   CACHE https://api.nuget.org/v3-flatcontainer/microsoft.netcore.dotnethostresolver/index.json
info :   CACHE https://api.nuget.org/v3-flatcontainer/microsoft.netcore.dotnethost/index.json
info : Committing restore...
log  : Writing lock file to disk. Path: C:\Users\[...]\project.lock.json
log  : C:\Users\[...]\project.json
log  : Restore completed in 1415ms.

NuGet Config files used:
    C:\Users\[...]\AppData\Roaming\NuGet\NuGet.Config
    C:\ProgramData\nuget\Config\Microsoft.VisualStudio.Offline.config

Feeds used:
    https://api.nuget.org/v3/index.json
    C:\Program Files (x86)\Microsoft SDKs\NuGetPackages\

Actual behavior

log  : Restoring packages for C:\Users\sp-install\Documents\Visual Studio 2015\Projects\dbproj\project.json...
info :   CACHE https://api.nuget.org/v3-flatcontainer/microsoft.netcore.dotnethostresolver/index.json
info :   CACHE https://api.nuget.org/v3-flatcontainer/microsoft.netcore.dotnethost/index.json
warn : Detected package downgrade: Microsoft.NETCore.App from 1.0.0 to 1.0.0-rc2-3002702 
warn :  dbproj (>= 1.0.0) -> Microsoft.EntityFrameworkCore.Tools (>= 1.0.0-preview2-final) -> Microsoft.NETCore.App (>= 1.0.0) 
warn :  dbproj (>= 1.0.0) -> Microsoft.NETCore.App (>= 1.0.0-rc2-3002702)
error: Package Microsoft.DotNet.Cli.Utils 1.0.0-preview2-003121 is not compatible with netcoreapp1.0 (.NETCoreApp,Version=v1.0). Package Microsoft.DotNet.Cli.Utils 1.0.0-preview2-003121 supports:
error:   - net451 (.NETFramework,Version=v4.5.1)
error:   - netstandard1.6 (.NETStandard,Version=v1.6)
error: Package Microsoft.DotNet.ProjectModel 1.0.0-rc3-003121 is not compatible with netcoreapp1.0 (.NETCoreApp,Version=v1.0). Package Microsoft.DotNet.ProjectModel 1.0.0-rc3-003121 supports:
error:   - net451 (.NETFramework,Version=v4.5.1)
error:   - netstandard1.6 (.NETStandard,Version=v1.6)
error: One or more packages are incompatible with .NETCoreApp,Version=v1.0.
info : Committing restore...
log  : Lock file has not changed. Skipping lock file write. Path: C:\Users\[...]\project.lock.json
log  : C:\Users\[...]\project.json
log  : Restore failed in 1629ms.
dotnet : 
At line:1 char:1
+ dotnet restore
+ ~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:String) [], RemoteException
    + FullyQualifiedErrorId : NativeCommandError

Errors in C:\Users\[...]j\project.json

    Package Microsoft.DotNet.Cli.Utils 1.0.0-preview2-003121 is not compatible with netcoreapp1.0 (.NETCoreApp,Version=v1.0). Package Microsoft.DotNet.Cli.Utils 1.0.0-preview2-003121 supports:

      - net451 (.NETFramework,Version=v4.5.1)
      - netstandard1.6 (.NETStandard,Version=v1.6)
    Package Microsoft.DotNet.ProjectModel 1.0.0-rc3-003121 is not compatible with netcoreapp1.0 (.NETCoreApp,Version=v1.0). Package Microsoft.DotNet.ProjectModel 1.0.0-rc3-003121 supports:
      - net451 (.NETFramework,Version=v4.5.1)
      - netstandard1.6 (.NETStandard,Version=v1.6)
    One or more packages are incompatible with .NETCoreApp,Version=v1.0.

Environment data

dotnet --info output:

PM> dotnet --info
.NET Command Line Tools (1.0.0-preview1-002702)

Product Information:
 Version:     1.0.0-preview1-002702
 Commit Sha:  6cde21225e

Runtime Environment:
 OS Name:     Windows
 OS Version:  6.3.9600
 OS Platform: Windows
 RID:         win81-x64

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:11
  • Comments:11 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
rbeadiecommented, Jun 30, 2016

Workaround/Correct Install

Run the following in package manager console:

dotnet new
dotnet restore
install-package Microsoft.EntityFrameworkCore.Tools -Pre
install-package Microsoft.EntityFrameworkCore.Tools.Core -Pre
install-package Microsoft.EntityFrameworkCore.Tools.Cli -Pre
dotnet restore

Then in the tools section of project.json, you will need to ensure that you import net451:

  "tools": {
    "Microsoft.EntityFrameworkCore.Tools": {
      "version": "1.0.0-preview2-final",
      "imports": "net451"
    }    
  }
0reactions
TheRealPiotrPcommented, Nov 10, 2016

This was shown to be an issue with an older CLI + Nuget combination. I’m not able to repro this today.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Microsoft.DotNet.Cli.Utils 1.0.0-preview2-003121 is not ...
0-rc3-003121 is not compatible with netcoreapp1.0 (.NETCoreApp,Version=v1.0). Package Microsoft.DotNet.ProjectModel 1.0.0-rc3-003121 supports: ...
Read more >
asp.net - Package [some package] is not compatible with ...
If the package is open source or the source is available then it is possible to recompile with dot net core instead for...
Read more >
NETSDK1079: The Microsoft.AspNetCore.All package is ...
In this article. This article applies to: ✔️ .NET Core SDK 3.1.100 and later versions. You may receive this error message when:.
Read more >
Troubleshoot .NET tool usage issues
Possible reasons for this include: * You misspelled a built-in dotnet command. * You intended to execute a .NET program, but dotnet-xyz does...
Read more >
Visual Studio giving errors about incompatible packages ...
I have an ASP.NET Blazor server-side solution that I (and other team members) have been working on for months. I just pulled the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found