|
3 | 3 | <SkipInferTargetOSName>true</SkipInferTargetOSName> |
4 | 4 | <DisableArcadeTestFramework>true</DisableArcadeTestFramework> |
5 | 5 |
|
| 6 | + <_projectDirName>$([System.IO.Path]::GetFileName('$(MSBuildProjectDirectory)'))</_projectDirName> |
| 7 | + <IsReferenceAssembly Condition="'$(_projectDirName)' == 'ref'">true</IsReferenceAssembly> |
| 8 | + <IsSourceProject Condition="'$(_projectDirName)' == 'src'">true</IsSourceProject> |
| 9 | + <IsGeneratorProject Condition="'$(_projectDirName)' == 'gen'">true</IsGeneratorProject> |
| 10 | + |
6 | 11 | <!-- Set OutDirName to change BaseOutputPath and BaseIntermediateOutputPath to include the ref subfolder. --> |
7 | | - <_sepChar>$([System.IO.Path]::DirectorySeparatorChar)</_sepChar> |
8 | | - <IsReferenceAssembly Condition="$(MSBuildProjectFullPath.Contains('$(_sepChar)ref$(_sepChar)'))">true</IsReferenceAssembly> |
9 | 12 | <OutDirName Condition="'$(IsReferenceAssembly)' == 'true'">$(MSBuildProjectName)$(_sepChar)ref</OutDirName> |
10 | 13 | </PropertyGroup> |
11 | 14 |
|
|
14 | 17 |
|
15 | 18 | <PropertyGroup> |
16 | 19 | <BeforeTargetFrameworkInferenceTargets>$(RepositoryEngineeringDir)BeforeTargetFrameworkInference.targets</BeforeTargetFrameworkInferenceTargets> |
17 | | - <IsSourceProject>$([System.Text.RegularExpressions.Regex]::IsMatch($(MSBuildProjectDirectory), 'src%24'))</IsSourceProject> |
18 | 20 | <RuntimeGraph>$(LibrariesProjectRoot)OSGroups.json</RuntimeGraph> |
19 | 21 | <ShouldUnsetParentConfigurationAndPlatform>false</ShouldUnsetParentConfigurationAndPlatform> |
20 | 22 | <!-- Remove once is fixed: https://github.com/dotnet/roslyn/issues/42344 --> |
|
65 | 67 | </PropertyGroup> |
66 | 68 |
|
67 | 69 | <PropertyGroup> |
68 | | - <RunApiCompatForSrc>$(IsSourceProject)</RunApiCompatForSrc> |
69 | | - <RunMatchingRefApiCompat>$(IsSourceProject)</RunMatchingRefApiCompat> |
| 70 | + <RunApiCompatForSrc>$([MSBuild]::ValueOrDefault('$(IsSourceProject)', 'false'))</RunApiCompatForSrc> |
| 71 | + <RunMatchingRefApiCompat>$([MSBuild]::ValueOrDefault('$(IsSourceProject)', 'false'))</RunMatchingRefApiCompat> |
70 | 72 | <ApiCompatEnforceOptionalRules>true</ApiCompatEnforceOptionalRules> |
71 | 73 | <ApiCompatExcludeAttributeList>$(RepositoryEngineeringDir)DefaultGenApiDocIds.txt,$(RepositoryEngineeringDir)ApiCompatExcludeAttributes.txt</ApiCompatExcludeAttributeList> |
72 | 74 | </PropertyGroup> |
|
0 commit comments