mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 02:50:32 +00:00
added tasks to delete weaver symbols after debug builds (#523)
This commit is contained in:
parent
7da51e62ff
commit
a44fc29475
@ -17,7 +17,7 @@
|
||||
<DefineConstants>DEBUG;</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
|
||||
<LangVersion>4</LangVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
@ -26,7 +26,7 @@
|
||||
<OutputPath>bin\Release</OutputPath>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
@ -67,15 +67,31 @@
|
||||
<Compile Include="CompilationFinishedHook.cs" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
<PropertyGroup>
|
||||
<WeaverPluginDir>$(ProjectDir)..\..\Assets\Mirror\Plugins\</WeaverPluginDir>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<CecilFiles Include="$(TargetDir)Unity.Cecil.*" />
|
||||
<WeaverFiles Include="$(WeaverPluginDir)$(TargetName).pdb*;$(WeaverPluginDir)$(TargetName).mdb*" />
|
||||
</ItemGroup>
|
||||
<Target Name="AfterBuild">
|
||||
<MakeDir Directories="$(ProjectDir)..\..\Assets\Mirror\Plugins" />
|
||||
<MakeDir Directories="$(ProjectDir)..\..\Assets\Mirror\Plugins\Unity.Cecil" />
|
||||
<Copy SourceFiles="$(TargetDir)$(TargetName).dll" DestinationFiles="$(ProjectDir)..\..\Assets\Mirror\Plugins\$(TargetName).dll" />
|
||||
<Copy SourceFiles="@(CecilFiles)" DestinationFolder="$(ProjectDir)..\..\Assets\Mirror\Plugins\Unity.Cecil" />
|
||||
<Copy Condition="Exists('$(TargetDir)$(TargetName).dll.mdb')" SourceFiles="$(TargetDir)$(TargetName).dll.mdb" DestinationFiles="$(ProjectDir)..\..\Assets\Mirror\Plugins\$(TargetName).dll.mdb" />
|
||||
<Copy Condition="Exists('$(TargetDir)$(TargetName).pdb')" SourceFiles="$(TargetDir)$(TargetName).pdb" DestinationFiles="$(ProjectDir)..\..\Assets\Mirror\Plugins\$(TargetName).pdb" />
|
||||
<Message Text="AfterBuild Target running -----------------------------------" Importance="high" />
|
||||
<Message Text="Copying Cecil assemblies to Unity project" Importance="high" />
|
||||
<MakeDir Directories="$(WeaverPluginDir)" />
|
||||
<MakeDir Directories="$(WeaverPluginDir)Unity.Cecil" />
|
||||
<Copy SourceFiles="@(CecilFiles)" DestinationFolder="$(WeaverPluginDir)Unity.Cecil" />
|
||||
</Target>
|
||||
<Target Name="AfterDebugBuild" AfterTargets="AfterBuild" Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<Message Text="AfterDebugBuild Target running ------------------------------" Importance="high" />
|
||||
<Message Text="Copying Weaver assembly and symbol files to Unity project" Importance="high" />
|
||||
<Copy Condition="Exists('$(TargetDir)$(TargetName).dll.mdb')" SourceFiles="$(TargetDir)$(TargetName).dll.mdb" DestinationFiles="$(WeaverPluginDir)$(TargetName).dll.mdb" />
|
||||
<Copy Condition="Exists('$(TargetDir)$(TargetName).pdb')" SourceFiles="$(TargetDir)$(TargetName).pdb" DestinationFiles="$(WeaverPluginDir)$(TargetName).pdb" />
|
||||
<Copy SourceFiles="$(TargetDir)$(TargetName).dll" DestinationFiles="$(WeaverPluginDir)$(TargetName).dll" />
|
||||
</Target>
|
||||
<Target Name="AfterReleaseBuild" AfterTargets="AfterBuild" Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<Message Text="AfterReleaseBuild Target running ----------------------------" Importance="high" />
|
||||
<Message Text="Copying Weaver assembly and removing symbol files from Unity project" Importance="high" />
|
||||
<Delete Files="@(WeaverFiles)" />
|
||||
<Copy SourceFiles="$(TargetDir)$(TargetName).dll" DestinationFiles="$(WeaverPluginDir)$(TargetName).dll" />
|
||||
</Target>
|
||||
</Project>
|
Loading…
Reference in New Issue
Block a user