这种方式能解决版本不一致的问题,但是丢失了编译时间
智能大石头 authored at 2022-03-20 01:26:22
1.55 KiB
X
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="Current">
  <PropertyGroup>
    <OutputType>Exe</OutputType>
    <TargetFrameworks>net5.0;net6.0</TargetFrameworks>
    <OutputPath>..\..\Test\</OutputPath>
    <LangVersion>latest</LangVersion>
    <Version>1.0.0.1130</Version>
    <FileVersion>1.0.0.1130</FileVersion>
    <AssemblyVersion>1.0.*</AssemblyVersion>
    <Deterministic>false</Deterministic>
    <DebugType>pdbonly</DebugType>
    <Optimize>true</Optimize>
    <DefineConstants>TRACE</DefineConstants>
    <ApplicationManifest>app.manifest</ApplicationManifest>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)'=='Debug'">
    <DefineConstants>$(DefineConstants);DEBUG</DefineConstants>
    <DebugType>full</DebugType>
    <Optimize>false</Optimize>
  </PropertyGroup>
  <ItemGroup>
    <Compile Remove="Model\**" />
    <EmbeddedResource Remove="Model\**" />
    <None Remove="Model\**" />
  </ItemGroup>
  <ItemGroup>
    <ProjectReference Include="..\NewLife.Core\NewLife.Core.csproj" />
  </ItemGroup>
  <ItemGroup>
    <None Update="appsettings.Development.json">
      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
    </None>
    <None Update="appsettings.json">
      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
    </None>
    <None Update="form.html">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </None>
  </ItemGroup>
  <Target Name="PostBuild" AfterTargets="PostBuildEvent">
    <Exec Command="del &quot;$(TargetDir)*.xml&quot; /q" />
  </Target>
</Project>