Xamarin Public Jenkins (auto-signing) e79aa3c0ed Imported Upstream version 4.6.0.125
Former-commit-id: a2155e9bd80020e49e72e86c44da02a8ac0e57a4
2016-08-03 10:59:49 +00:00

47 lines
2.1 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition="'$(TargetFrameworkIdentifier)' != '.NETFramework'">
<!-- hardcoding win7-x64 for now, this should eventually be built as runtime agnostic,
packaged as a DLL and be consumed by a deployment step that resolves that package
and its dependencies for a specific runtime -->
<PlatformTarget>x64</PlatformTarget>
<BaseNuGetRuntimeIdentifier>win7</BaseNuGetRuntimeIdentifier>
</PropertyGroup>
<Target Name="PublishFilesToRuntime" AfterTargets="CopyFilesToOutputDirectory"
Condition="'$(OutputType)' == 'Exe' ">
<ItemGroup>
<PublishedRuntimeItems Include="@(ReferenceCopyLocalPaths)">
<DestinationRelativePath>%(FileName)%(Extension)</DestinationRelativePath>
</PublishedRuntimeItems>
<PublishedRuntimeItems Include="@(Content)">
<DestinationRelativePath>%(FileName)%(Extension)</DestinationRelativePath>
</PublishedRuntimeItems>
<PublishedRuntimeItems Include="@(None)">
<DestinationRelativePath>%(Filename)%(Extension)</DestinationRelativePath>
</PublishedRuntimeItems>
</ItemGroup>
<Copy SourceFiles="%(PublishedRuntimeItems.Identity)" DestinationFiles="$(Outdir)%(DestinationRelativePath)" SkipUnchangedFiles="true" />
<CallTarget Targets="FixUpCoreConsoleNames" Condition="Exists('$(Outdir)CoreConsole.exe')" />
<Message Text="Published $(AssemblyName) executable to $(Outdir) [@(PublishedRuntimeItems->Count()) items]" Importance="high" />
</Target>
<!-- If CoreConsole.exe is being used, rename it and the actual project's exe to their correct names -->
<Target Name="FixUpCoreConsoleNames">
<Move SourceFiles="$(Outdir)$(AssemblyName).exe" DestinationFiles="$(Outdir)$(AssemblyName).dll" />
<Move SourceFiles="$(Outdir)CoreConsole.exe" DestinationFiles="$(Outdir)$(AssemblyName).exe" />
<!-- update TargetPath with the renamed file -->
<PropertyGroup>
<TargetPath>$(Outdir)$(AssemblyName).dll</TargetPath>
</PropertyGroup>
</Target>
</Project>