Skip to content
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 run requires framework to be specified when multiple are present #358

Closed
NTaylorMullen opened this issue Nov 4, 2016 · 2 comments
Assignees
Labels
Milestone

Comments

@NTaylorMullen
Copy link
Contributor

Given a project with multiple Target Frameworks, i.e. net451;netcoreapp1.1 dotnet run should behave like it used to in project.json land. At a glance it looks like the old world prioritizes the netcoreapp tfm.

This is how it behaves today:

dotnet run
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'.
@dsplaisted
Copy link
Member

dsplaisted commented Nov 11, 2016

The dotnet run command evaluates the MSBuild project and gets the value of the RunCommand property. For a cross-targeting project, this property will only be set in the inner build, not the outer build. I don't think there's a good way for us to have the run properties set to reasonable values at evaluation time in the .NET SDK.

Could the dotnet run command instead read the value of the TargetFrameworks property if RunCommand is not set and the framework wasn't specified on the command line? Then it could choose from the available target frameworks and re-query the value of the RunCommand property when TargetFramework is set to the one it chooses.

@piotrpMSFT @livarcocc

@TheRealPiotrP
Copy link
Contributor

Moved to CLI repo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants