Update error message for direct project references. (#6380)

Update error message for direct project references
This commit is contained in:
Aiden
2026-01-16 07:55:51 -06:00
committed by GitHub
parent aa5cca4c7f
commit 627856e207

View File

@@ -11,7 +11,7 @@
<Target Name="_RTCheckForDirectReferences" BeforeTargets="BeforeResolveReferences"
Condition="'$(AllowDirectRobustReferences)' != 'true'">
<Error File="%(ProjectReference.DefiningProjectFullPath)"
Text="Content may not reference %(Filename) directly"
Text="Direct reference to %(Filename) is not allowed. Use RobustToolbox/Imports/*.props instead (e.g., Shared.props, Client.props, Server.props)"
Condition="$([System.Text.RegularExpressions.Regex]::IsMatch('%(Identity)', 'RobustToolbox')) and !$([System.Text.RegularExpressions.Regex]::IsMatch('%(DefiningProjectFullPath)', '([Mm]icrosoft|RobustToolbox)'))" />
</Target>
</Project>