<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <OutputType>Exe</OutputType>
	<TargetFrameworks>net6.0-windows;net7.0-windows</TargetFrameworks>
	<ApplicationIcon>Resources\as.ico</ApplicationIcon>
	<Version>0.90.10</Version>
	<AssemblyVersion>0.90.10</AssemblyVersion>
	<FileVersion>0.90.10</FileVersion>
	<Copyright>Copyright © Razmoth 2022; Copyright © Perfare 2018-2022</Copyright>
	<BaseOutputPath>..\AssetStudioGUI\bin</BaseOutputPath>
  </PropertyGroup>

  <ItemGroup>
    <PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
    <PackageReference Include="System.CommandLine" Version="2.0.0-beta4.22272.1" />
    <PackageReference Include="System.Configuration.ConfigurationManager" Version="8.0.0-preview.5.23280.8" />
  </ItemGroup>

  <ItemGroup>
	<ProjectReference Include="..\AssetStudioUtility\AssetStudioUtility.csproj" />
    <ProjectReference Include="..\AssetStudio\AssetStudio.csproj" />
  </ItemGroup>

  <ItemGroup>
    <Compile Update="Settings.cs">
      <DesignTimeSharedInput>True</DesignTimeSharedInput>
      <AutoGen>True</AutoGen>
    </Compile>
  </ItemGroup>

  <Target Name="CopyExtraFiles" AfterTargets="AfterBuild">
  	<Copy SourceFiles="$(SolutionDir)AssetStudioFBXNative\bin\Win32\$(Configuration)\AssetStudioFBXNative.dll" DestinationFolder="$(TargetDir)x86" ContinueOnError="true" />
  	<Copy SourceFiles="$(SolutionDir)AssetStudioFBXNative\bin\x64\$(Configuration)\AssetStudioFBXNative.dll" DestinationFolder="$(TargetDir)x64" ContinueOnError="true" />
  </Target>
  
  <Target Name="PublishExtraFiles" AfterTargets="Publish">
  	<Copy SourceFiles="$(TargetDir)x86\AssetStudioFBXNative.dll" DestinationFolder="$(PublishDir)x86" ContinueOnError="true" />
  	<Copy SourceFiles="$(TargetDir)x64\AssetStudioFBXNative.dll" DestinationFolder="$(PublishDir)x64" ContinueOnError="true" />
  </Target>

</Project>
