Search code examples
.net-6.0dotnet-new

dotnet new target windows specific framework


Is there any way to get the dotnet new to use a platform specific target such as net6.0-windows10.0.19041.0?

This is what I'd like to be able to do:

dotnet new console --name HelloWindowsApi --framework net6.0-windows10.0.19041.0

I'm attempting to create a new console application that can uses some Windows Runtime APIs. So far the only way I've found to do it is to manually edit the project file after running dotent new.


Solution

  • Thanks to KalleOlaviNiemitalo:

    dotnet new console --name CallWinRTConsole --framework net6.0 --target-framework-override net6.0-windows10.0.22000