<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <TargetFramework>net472</TargetFramework>
    <PlatformTarget>x64</PlatformTarget>
    <RootNamespace>CncWebApi</RootNamespace>
    <AssemblyName>CncWebApi</AssemblyName>
    <GenerateDocumentationFile>true</GenerateDocumentationFile>
    <GenerateAssemblyInfo>false</GenerateAssemblyInfo>
    <!-- Web API 项目输出到 bin 目录 -->
    <OutputType>Library</OutputType>
    <!-- 直接输出到 bin\，IIS 从 bin\ 加载 DLL（去掉默认的 Debug\net472 嵌套） -->
    <OutputPath>bin\</OutputPath>
    <AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
    <AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath>
  </PropertyGroup>

  <ItemGroup>
    <PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies.net472" Version="1.0.3" PrivateAssets="all" />
    <!-- ASP.NET Web API 2 核心包 -->
    <PackageReference Include="Microsoft.AspNet.WebApi.Core" Version="5.3.0" />
    <PackageReference Include="Microsoft.AspNet.WebApi.WebHost" Version="5.3.0" />
    <PackageReference Include="Microsoft.AspNet.WebApi.Owin" Version="5.3.0" />
    <PackageReference Include="Microsoft.AspNet.WebApi.Cors" Version="5.3.0" />
    <PackageReference Include="Microsoft.Owin.Host.SystemWeb" Version="4.2.2" />
    <PackageReference Include="Owin" Version="1.0" />
    <!-- JWT认证 -->
    <PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="6.35.0" />
    <PackageReference Include="Microsoft.IdentityModel.Tokens" Version="6.35.0" />
    <!-- JSON序列化（锁定12.0.3，VS2017兼容） -->
    <PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
    <!-- 日志 -->
    <PackageReference Include="log4net" Version="3.3.1" />
  </ItemGroup>

  <ItemGroup>
    <ProjectReference Include="..\CncModels\CncModels.csproj" />
    <ProjectReference Include="..\CncRepository\CncRepository.csproj" />
    <ProjectReference Include="..\CncService\CncService.csproj" />
  </ItemGroup>

  <!-- 将 Web.config、Global.asax 等复制到输出目录 -->
  <ItemGroup>
    <Content Include="Web.config" CopyToOutputDirectory="PreserveNewest" />
    <Content Include="Global.asax" CopyToOutputDirectory="PreserveNewest" />
    <Content Include="log4net.config" CopyToOutputDirectory="PreserveNewest" />
  </ItemGroup>

</Project>
