40 lines
1.7 KiB
XML
40 lines
1.7 KiB
XML
<Project>
|
|
|
|
<!-- For 'legacy' .csproj files, set map TargetFrameworkVersion back to TargetFramework -->
|
|
<PropertyGroup Condition=" '$(TargetFramework)' == '' AND '$(TargetFrameworks)' == '' ">
|
|
<TargetFramework>net$(TargetFrameworkVersion.Substring(1).Replace('.',''))</TargetFramework>
|
|
<TargetFrameworkIdentifier>.NETFramework</TargetFrameworkIdentifier>
|
|
</PropertyGroup>
|
|
|
|
<Target Name="GetCustomAssemblyAttributes"
|
|
BeforeTargets="GetAssemblyAttributes"
|
|
DependsOnTargets="InitializeSourceControlInformation">
|
|
|
|
<ItemGroup>
|
|
<AssemblyAttribute Include="System.Reflection.AssemblyMetadataAttribute" Condition="'$(SourceRevisionId)' != ''">
|
|
<_Parameter1>CommitHash</_Parameter1>
|
|
<_Parameter2>$(SourceRevisionId)</_Parameter2>
|
|
</AssemblyAttribute>
|
|
|
|
<AssemblyAttribute Include="System.Reflection.AssemblyMetadataAttribute" Condition="$(RepositoryUrl.StartsWith('https://github.com'))">
|
|
<_Parameter1>SourceCommitUrl</_Parameter1>
|
|
<_Parameter2>$(RepositoryUrl)/tree/$(SourceRevisionId)</_Parameter2>
|
|
</AssemblyAttribute>
|
|
|
|
<AssemblyAttribute Include="System.Reflection.AssemblyMetadataAttribute" Condition="'$(Serviceable)' == 'true'">
|
|
<_Parameter1>Serviceable</_Parameter1>
|
|
<_Parameter2>True</_Parameter2>
|
|
</AssemblyAttribute>
|
|
</ItemGroup>
|
|
</Target>
|
|
|
|
<Target Name="GetCustomFileVersion" BeforeTargets="GetAssemblyVersion">
|
|
<PropertyGroup Condition="'$(FileVerison)' == '' AND '$(FileRevisionVersion)' != ''">
|
|
<FileVersion>$(VersionPrefix).$(FileRevisionVersion)</FileVersion>
|
|
</PropertyGroup>
|
|
</Target>
|
|
|
|
<Import Project="Packaging.targets" />
|
|
<Import Project="ResolveReferences.targets" />
|
|
</Project>
|