Update framework symbol on dotnet new template #1512#1630
Merged
adamsitnik merged 3 commits intodotnet:masterfrom Jan 7, 2021
ExceptionCaught:target_framework
Merged
Update framework symbol on dotnet new template #1512#1630adamsitnik merged 3 commits intodotnet:masterfrom ExceptionCaught:target_framework
adamsitnik merged 3 commits intodotnet:masterfrom
ExceptionCaught:target_framework
Conversation
adamsitnik
approved these changes
Jan 7, 2021
Member
adamsitnik
left a comment
There was a problem hiding this comment.
LGTM, thank you very much @ExceptionCaught !
This was referenced Jan 7, 2021
am11
reviewed
Jan 7, 2021
| <Project Sdk="Microsoft.NET.Sdk"> | ||
| <PropertyGroup Condition="'$(consoleApp)' == 'true'"> | ||
| <TargetFramework>netcoreapp3.0</TargetFramework> | ||
| <OutputType>Exe</OutputType> |
Member
There was a problem hiding this comment.
Without OutputType, we get the following error when consoleApp was selected during the project creation:
Unable to run your project.
Ensure you have a runnable project type and ensure 'dotnet run' supports this project.
A runnable project should target a runnable TFM (for instance, net5.0) and have OutputType 'Exe'.
The current OutputType is 'Library'.
Member
There was a problem hiding this comment.
Without OutputType
@am11 great catch, thank you! @ExceptionCaught could you please address that in a separate PR?
Contributor
Author
There was a problem hiding this comment.
hi @am11 , what was the dotnet version that you run new on? I did a few dry run on my local. with or without the consoleapp, could not see the error you mentioned.


Member
There was a problem hiding this comment.
The command which gives the error is 'dotnet run'.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is to address the issue #1512.
.template.json file as follow.
frameworksDefaultsto calculate the default values when--console-appistrueorfalseframeworksto take its value if its not empty.