Open
Description
Is your feature request related to a problem? Please describe.
I am developing an app that can be deployed both in dotnet 9 and 10.
The build & publish template gets as a parameter the dotnet version, but different steps use different syntax to set the target runtime.
dotnet restore -p:TargetFramework=net9.0 "path/to/app.csproj"
dotnet build --framework "path/to/app.csproj"
dotnet publish --framework net9.0
Why can't I use --framework
for all of them?
Also, If I try to use the dotnet 9 sdk image to build the project, the restore fails even with the -p:TargetFramework=net9.0
flag set.
Describe the solution you'd like
dotnet restore will respect the --framework
flag, and will not fail when the flag is provided and other unsupported target frameworks exist.
Additional context
For someone who is learning how to publish dotnet artifacts this makes it just a bit more difficult to learn.