其他分享
首页 > 其他分享> > dotnet new 命令笔记

dotnet new 命令笔记

作者:互联网

  1. 让dotnet new使用平台特定的目标,例如net6.0-windows10.0.19041.0
    dotnet new console --name CallWinRTConsole --framework net6.0 --target-framework-override net6.0-windows10.0.22000

    生成的 CallWinRTConsole.csproj

    <Project Sdk="Microsoft.NET.Sdk">
    
      <PropertyGroup>
        <OutputType>Exe</OutputType>
        <TargetFramework>net6.0-windows10.0.22000</TargetFramework>
        <ImplicitUsings>enable</ImplicitUsings>
        <Nullable>enable</Nullable>
      </PropertyGroup>
    
    </Project>
    
  2. 指定框架运行程序
    dotnet build D:\Repos\Maui\MauiBlazorApp2\ -t:Run -f net6.0-android

标签:enable,--,笔记,windows10.0,dotnet,new,net6.0
来源: https://www.cnblogs.com/densen2014/p/16057758.html