Skip to content

Commit

Permalink
Modify Directory.Build.props and SlnGen.props to pull in the global.j…
Browse files Browse the repository at this point in the history
…son and Directory.Build.* files when generating a solution.
  • Loading branch information
dgmjr committed Oct 9, 2023
1 parent 5b4acf9 commit 2f75cd3
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 18 deletions.
8 changes: 8 additions & 0 deletions src/Build/SlnGen.props
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
<IncludeInSolutionFile>$('$(MSBuildProjectExtension)' != '.csproj')</IncludeInSolutionFile>
<SlnGenLaunchVisualStudio>false</SlnGenLaunchVisualStudio>
<SlnGenProjectName>$(MSbuildProjectName)</SlnGenProjectName>
<DirectoryBuildProps>$([MSBuild]::EnsureTrailingSlash($([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), "Directory.Build.props"))))Directory.Build.props</DirectoryBuildProps>
<DirectoryBuildTargets>$([MSBuild]::EnsureTrailingSlash($([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), "Directory.Build.targets"))))Directory.Build.targets</DirectoryBuildTargets>
<GlobalJson>$([MSBuild]::EnsureTrailingSlash($([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), "global.json"))))global.json</GlobalJson>
</PropertyGroup>
<ItemGroup>
<SlnGenCustomProjectTypeGuid Include=".aproj" ProjectTypeGuid="4cd4fd5b-0f23-4623-ba3f-b31cc4ab93ef" />
Expand Down Expand Up @@ -46,6 +49,11 @@
<SlnGenCustomProjectTypeGuid Include=".xcodeproj" ProjectTypeGuid="98925c4f-9b71-41de-bc6a-267f44ff1f4a" />
<SlnGenCustomProjectTypeGuid Include=".xsproj" ProjectTypeGuid="60ca03d9-d475-4da7-85b4-dbe70d7f5ae1" />
</ItemGroup>
<ItemGroup>
<SlnGenSolutionItem Include="$(DirectoryBuildProps)" />
<SlnGenSolutionItem Include="$(DirectoryBuildTargets)" />
<SlnGenSolutionItem Include="$(GlobalJson)" />
</ItemGroup>
<PropertyGroup>
<SlnGenFolders>true</SlnGenFolders>
<SlnGenSolutionFolder Condition="'$(IsTestProject)' == 'true'">tests</SlnGenSolutionFolder>
Expand Down
17 changes: 0 additions & 17 deletions src/Build/SourceCodeReference.props

This file was deleted.

1 change: 0 additions & 1 deletion src/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
<Import Project="./Build/ProjectMetadata.props" />
<Import Project="./Build/ProjectTypeInfo.props" />
<Import Project="./Build/SlnGen.props" />
<Import Project="./Build/SourceCodeReference.props" />
<Import Project="./Build/SourceLinkPatch.props" />
<Import Project="./Build/TargetFrameworks.props" />
<Import Project="./Build/Testing.props" />
Expand Down

0 comments on commit 2f75cd3

Please sign in to comment.