mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-02-15 03:30:53 +01:00
* Fixed transitive project dependencies in content triggering "no direct project reference" detection. * Add chicken property
18 lines
845 B
XML
18 lines
845 B
XML
<Project>
|
|
<!--
|
|
Disallow content from using direct references to Robust project files.
|
|
Content should use the .props files in Imports/ instead.
|
|
-->
|
|
|
|
<PropertyGroup>
|
|
<AllowDirectRobustReferences Condition="'$(AllowDirectRobustReferences)' != ''">false</AllowDirectRobustReferences>
|
|
</PropertyGroup>
|
|
|
|
<Target Name="_RTCheckForDirectReferences" BeforeTargets="BeforeResolveReferences"
|
|
Condition="'$(AllowDirectRobustReferences)' != 'true'">
|
|
<Error File="%(ProjectReference.DefiningProjectFullPath)"
|
|
Text="Content may not reference %(Filename) directly"
|
|
Condition="$([System.Text.RegularExpressions.Regex]::IsMatch('%(Identity)', 'RobustToolbox')) and !$([System.Text.RegularExpressions.Regex]::IsMatch('%(DefiningProjectFullPath)', '([Mm]icrosoft|RobustToolbox)'))" />
|
|
</Target>
|
|
</Project>
|