Skip to content

"dotnet run" failed for webapi and mvc "Can not find compilation library location for package 'Microsoft.NETCore.App" after installing .NET CORE CLI tools #8113

@MiaomiaoHuangfu

Description

@MiaomiaoHuangfu

Steps to reproduce

  • Go to CLI from https://github.com/dotnet/cli, download .NET Core Tools for windows 10 X64 and install it;
  • md webapiTest
  • cd webapiTest
  • dotnet new webapi --> succeeded;
  • dotnet restore --> succeeded;
  • dotnet build --> succeeded;
  • dotnet run

Expected behavior

dotnet run passed with no errors or warnings

Actual behavior

dotnet run failed with info "Unhandled Exception: System.InvalidOperationException: Can not find compilation library location for package 'Microsoft.NETCore.App'"
dotnetrunfailedwheninstallnetcorclitools

Environment data

dotnet --info output:
.NET Command Line Tools (2.0.0-preview1-005791)

Product Information:
Version: 2.0.0-preview1-005791
Commit SHA-1 hash: 2b4992c

Runtime Environment:
OS Name: Windows
OS Version: 10.0.14393
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\2.0.0-preview1-005791\

Microsoft .NET Core Shared Framework Host

Version : 2.0.0-preview1-001978-00
Build : d197c00dc0f5ca41ac61b6321ebb37d39b63cf80

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions