Skip to content

dotnet run not working for netstandard1.6 console app #1972

Closed
@livarcocc

Description

@livarcocc

From @VanCoding on April 20, 2017 10:7

Steps to reproduce

Create a hello world application, like described here in the section Deploying a self-contained deployment with a smaller footprint. Which results in a csproj file like this:

<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <OutputType>Exe</OutputType>
    <TargetFramework>netstandard1.6</TargetFramework>
    <RuntimeIdentifiers>win7-x64</RuntimeIdentifiers>
  </PropertyGroup>
  <ItemGroup>
    <PackageReference Include="Microsoft.NETCore.Runtime.CoreCLR" Version="1.0.2" />
    <PackageReference Include="Microsoft.NETCore.DotNetHostPolicy" Version="1.0.1" />
  </ItemGroup>
</Project>

Then run dotnet run

Expected behavior

The projects gets compiled and then started

Actual behavior

It prints out:

Unable to run your project.
Please ensure you have a runnable project type and ensure 'dotnet run' supports    this project.
The current OutputType is 'Exe'.

Environment data

.NET Command Line Tools (1.0.3)

Product Information:
Version: 1.0.3
Commit SHA-1 hash: 37224c9917

Runtime Environment:
OS Name: Windows
OS Version: 6.1.7601
OS Platform: Windows
RID: win7-x64
Base Path: C:\Program Files\dotnet\sdk\1.0.3

Notes

When I use netcoreapp1.1 instead, it works. But with netstandard1.6 it does not.

Copied from original issue: dotnet/cli#6364

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions