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

   <PropertyGroup>
      <TargetFramework>net35</TargetFramework>
      <Version>3.1.0</Version>
      <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
   </PropertyGroup>

   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
     <DocumentationFile>bin\Release\net35\XUnity.AutoTranslator.Plugin.Core.xml</DocumentationFile>
   </PropertyGroup>

   <ItemGroup>
      <Reference Include="0Harmony">
         <HintPath>..\..\libs\0Harmony.dll</HintPath>
      </Reference>
      <Reference Include="ExIni">
         <HintPath>..\..\libs\ExIni.dll</HintPath>
      </Reference>
      <Reference Include="UnityEngine">
         <HintPath>..\..\libs\UnityEngine.dll</HintPath>
      </Reference>
      <Reference Include="UnityEngine.UI">
         <HintPath>..\..\libs\UnityEngine.UI.dll</HintPath>
      </Reference>
   </ItemGroup>

   <ItemGroup>
     <ProjectReference Include="..\XUnity.AutoTranslator.Plugin.ExtProtocol\XUnity.AutoTranslator.Plugin.ExtProtocol.csproj" />
     <ProjectReference Include="..\XUnity.RuntimeHooker\XUnity.RuntimeHooker.csproj" />
   </ItemGroup>

   <ItemGroup>
      <Compile Update="Properties\Resources.Designer.cs">
         <DesignTime>True</DesignTime>
         <AutoGen>True</AutoGen>
         <DependentUpon>Resources.resx</DependentUpon>
      </Compile>
   </ItemGroup>

   <ItemGroup>
      <EmbeddedResource Update="Properties\Resources.resx">
         <Generator>ResXFileCodeGenerator</Generator>
         <LastGenOutput>Resources.Designer.cs</LastGenOutput>
      </EmbeddedResource>
   </ItemGroup>

   <Target Name="PostBuild" AfterTargets="PostBuildEvent">
      <GetAssemblyIdentity AssemblyFiles="$(TargetPath)">
         <Output TaskParameter="Assemblies" ItemName="Targets" />
      </GetAssemblyIdentity>
      <ItemGroup>
         <VersionNumber Include="$([System.Text.RegularExpressions.Regex]::Replace(&quot;%(Targets.Version)&quot;, &quot;^(.+?)(\.0+)$&quot;, &quot;$1&quot;))" />
      </ItemGroup>
     <Exec Command="if $(ConfigurationName) == Release (&#xD;&#xA;   XCOPY /Y /I &quot;$(TargetDir)XUnity.AutoTranslator.Plugin.Core.dll&quot; &quot;$(SolutionDir)dist\Developer\Developer\&quot;&#xD;&#xA;   XCOPY /Y /I &quot;$(TargetDir)XUnity.AutoTranslator.Plugin.Core.xml&quot; &quot;$(SolutionDir)dist\Developer\Developer\&quot;&#xD;&#xA;   XCOPY /Y /I &quot;$(TargetDir)XUnity.AutoTranslator.Plugin.Core.pdb&quot; &quot;$(SolutionDir)dist\Developer\Developer\&quot;&#xD;&#xA;   XCOPY /Y /I &quot;$(TargetDir)XUnity.AutoTranslator.Plugin.ExtProtocol.dll&quot; &quot;$(SolutionDir)dist\Developer\Developer\&quot;&#xD;&#xA;   XCOPY /Y /I &quot;$(TargetDir)XUnity.AutoTranslator.Plugin.ExtProtocol.xml&quot; &quot;$(SolutionDir)dist\Developer\Developer\&quot;&#xD;&#xA;   XCOPY /Y /I &quot;$(TargetDir)XUnity.AutoTranslator.Plugin.ExtProtocol.pdb&quot; &quot;$(SolutionDir)dist\Developer\Developer\&quot;&#xD;&#xA;   COPY /Y &quot;$(SolutionDir)README.md&quot; &quot;$(SolutionDir)dist\Developer\Developer\README (AutoTranslator).md&quot;&#xD;&#xA;   powershell Compress-Archive -Path '$(SolutionDir)dist\Developer\Developer' -DestinationPath '$(SolutionDir)dist\Developer\XUnity.AutoTranslator-Developer-@(VersionNumber).zip' -Force)&#xD;&#xA;)" />
   </Target>

</Project>
