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

dotnet {build,run} should fail gracefully with bad target framework #6927

Closed
jskeet opened this Issue Jun 19, 2017 · 4 comments

Comments

Projects
None yet
4 participants
@jskeet

jskeet commented Jun 19, 2017

Steps to reproduce

  • In a new directory, run dotnet new console
  • Look at the generated project file to see what framework version it targets, e.g. netcoreapp1.1
  • Run dotnet restore
  • Run dotnet build -f netcoreapp1.0 - or any other wrong framework

Expected behavior

A single, easily-understood error message saying that the project file doesn't support the specified framework.

Actual behavior

An error message for every type referenced anywhere. Out of the box for a console app, 29 errors. For Noda Time, 10,000+ errors.

Environment data

dotnet --info output:

.NET Command Line Tools (1.0.4)

Product Information:
 Version:            1.0.4
 Commit SHA-1 hash:  af1e6684fd

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.15063
 OS Platform: Windows
 RID:         win10-x64
 Base Path:   C:\Program Files\dotnet\sdk\1.0.4

(Now trying in 2.0 preview 1 to see if it's better)

@jskeet

This comment has been minimized.

Show comment
Hide comment
@jskeet

jskeet Jun 19, 2017

Just tried with 2.0 preview 1 and it fails in the same way

.NET Command Line Tools (2.0.0-preview1-005977)

Product Information:
 Version:            2.0.0-preview1-005977
 Commit SHA-1 hash:  414cab8a0b

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

Microsoft .NET Core Shared Framework Host

  Version  : 2.0.0-preview1-002111-00
  Build    : 1ff021936263d492539399688f46fd3827169983

jskeet commented Jun 19, 2017

Just tried with 2.0 preview 1 and it fails in the same way

.NET Command Line Tools (2.0.0-preview1-005977)

Product Information:
 Version:            2.0.0-preview1-005977
 Commit SHA-1 hash:  414cab8a0b

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

Microsoft .NET Core Shared Framework Host

  Version  : 2.0.0-preview1-002111-00
  Build    : 1ff021936263d492539399688f46fd3827169983
@dsplaisted

This comment has been minimized.

Show comment
Hide comment
@dsplaisted

dsplaisted Jun 19, 2017

Member
Member

dsplaisted commented Jun 19, 2017

@wli3

This comment has been minimized.

Show comment
Hide comment
@wli3

wli3 Jun 19, 2017

Collaborator

image

@dsplaisted looks so.

Collaborator

wli3 commented Jun 19, 2017

image

@dsplaisted looks so.

@livarcocc

This comment has been minimized.

Show comment
Hide comment
@livarcocc

livarcocc Jun 20, 2017

Member

Yep. Closing this. @jskeet if there is anything else going on with this issue, please, re-activate.

Member

livarcocc commented Jun 20, 2017

Yep. Closing this. @jskeet if there is anything else going on with this issue, please, re-activate.

@livarcocc livarcocc closed this Jun 20, 2017

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