Merge pull request #11973 from Phrohdoh/csproj-afterbuild-targets

Fix AfterBuild tasks in csprojs
This commit is contained in:
Paul Chote
2016-10-11 02:51:47 +01:00
committed by GitHub
8 changed files with 152 additions and 118 deletions

View File

@@ -24,12 +24,6 @@
<PlatformTarget>x86</PlatformTarget>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
<CustomCommands>
<CustomCommands>
<Command type="AfterBuild" command="cp ${TargetFile} ../mods/common" workingdir="${ProjectDir}" />
<Command type="AfterBuild" command="cp ${TargetFile}.mdb ../mods/common" workingdir="${ProjectDir}" />
</CustomCommands>
</CustomCommands>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
<DebugSymbols>true</DebugSymbols>
@@ -41,12 +35,6 @@
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
<Optimize>true</Optimize>
<CustomCommands>
<CustomCommands>
<Command type="AfterBuild" command="cp ${TargetFile} ../mods/common" workingdir="${ProjectDir}" />
<Command type="AfterBuild" command="cp ${TargetFile}.mdb ../mods/common" workingdir="${ProjectDir}" />
</CustomCommands>
</CustomCommands>
</PropertyGroup>
<ItemGroup>
<Reference Include="FuzzyLogicLibrary">
@@ -787,16 +775,29 @@
<Compile Include="Traits\AutoCarryall.cs" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PostBuildEvent>mkdir "$(SolutionDir)mods/common/"
copy "$(TargetPath)" "$(SolutionDir)mods/common/"
cd "$(SolutionDir)"</PostBuildEvent>
</PropertyGroup>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
<MakeDir Directories="$(SolutionDir)mods/common/"/>
<Copy
SourceFiles="$(TargetPath)"
DestinationFolder="$(SolutionDir)mods/common/"/>
<!--
We need to copy OpenRA.Mods.Common.pdb (not `.dll.pdb`). This is only necessary on Windows.
Mono outputs a `.dll.mdb` so we can just append `.mdb` directly.
-->
<Copy
SourceFiles="$(TargetDir)$(TargetName).pdb"
DestinationFolder="$(SolutionDir)mods/common/"
Condition="'$(OS)' == 'Windows_NT'"/>
<Copy
SourceFiles="$(TargetPath).mdb"
DestinationFolder="$(SolutionDir)mods/common/"
Condition="'$(OS)' == 'Unix'"/>
<!-- Uncomment these lines when debugging or adding to this target
<Message Text="DEBUG OS: $(OS)"/>
<Message Text="DEBUG SolutionDir: $(SolutionDir)"/>
<Message Text="DEBUG TargetPath: $(TargetPath)"/>
<Message Text="DEBUG TargetDir: $(TargetDir)"/>
<Message Text="DEBUG TargetName: $(TargetName)"/>
-->
</Target>
-->
</Project>
</Project>