34 lines
1.9 KiB
XML
34 lines
1.9 KiB
XML
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
<PropertyGroup>
|
|
<ErrorIfBuildToolsRestoredFromIndividualProject Condition="!Exists('$(ToolsDir)')">true</ErrorIfBuildToolsRestoredFromIndividualProject>
|
|
</PropertyGroup>
|
|
|
|
<Import Project="..\dir.targets" />
|
|
|
|
<!-- Returns the assembly version of the project for consumption
|
|
by the NuGet package generation -->
|
|
<Target Name="GetAssemblyVersion"
|
|
Returns="$(AssemblyVersion)"/>
|
|
|
|
<!-- Returns the generated documentation file for consumption
|
|
by the NuGet package generation -->
|
|
<Target Name="GetDocumentationFile"
|
|
Returns="$(DocumentationFile)"/>
|
|
|
|
<Target Name="DumpTargets" BeforeTargets="ResolveProjectReferences">
|
|
<Message Text="DumpTargets> $(OutputPath), C=[$(Configuration)], CG=[$(ConfigurationGroup)], OG=[$(OSGroup)], TG=[$(TargetGroup)]" Importance="Low" />
|
|
</Target>
|
|
|
|
<!-- This target will be moved into buildtools. Checked in here for now to add validationand in order not to block buildtools ingestion. -->
|
|
<Target Name="ValidateExcludeCompileDesktop" AfterTargets="GetPackageDependencies" Inputs="%(Dependency.Identity);%(Dependency.TargetFramework)" Outputs="unused">
|
|
<PropertyGroup>
|
|
<_excludeCompile Condition="@(Dependency->WithMetadataValue('Exclude', 'Compile')->Count()) == @(Dependency->Count())">true</_excludeCompile>
|
|
</PropertyGroup>
|
|
<Error Text="Cannot have Exclude=Compile dependencies when targeting a desktop TFM. @(Dependency). You can exclude the reference asset in the package by setting the ExcludeReferenceAssets property to true in your project."
|
|
Condition="$([System.String]::Copy('%(Dependency.TargetFramework)').StartsWith('net4')) AND
|
|
'$(_excludeCompile)' == 'true' AND
|
|
'%(Dependency.Identity)' != '_._'" />
|
|
</Target>
|
|
|
|
</Project>
|