Skip to content

Commit f8f115b

Browse files
committed
Add comments
1 parent 37f3f7f commit f8f115b

File tree

3 files changed

+22
-7
lines changed

3 files changed

+22
-7
lines changed

src/AppInstallerCLI.sln

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
Microsoft Visual Studio Solution File, Format Version 12.00
33
# Visual Studio Version 18
4-
VisualStudioVersion = 18.0.11205.157 d18.0
4+
VisualStudioVersion = 18.0.11205.157
55
MinimumVisualStudioVersion = 10.0.40219.1
66
Project("{C7167F0D-BC9F-4E6E-AFE1-012C56B48DB5}") = "AppInstallerCLIPackage", "AppInstallerCLIPackage\AppInstallerCLIPackage.wapproj", "{6AA3791A-0713-4548-A357-87A323E7AC3A}"
77
ProjectSection(ProjectDependencies) = postProject
@@ -37,7 +37,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Project", "Project", "{8D53
3737
..\azure-pipelines.nuget.yml = ..\azure-pipelines.nuget.yml
3838
..\azure-pipelines.yml = ..\azure-pipelines.yml
3939
..\cgmanifest.json = ..\cgmanifest.json
40-
Directory.Build.props = Directory.Build.props
4140
Get-VcxprojNugetPackageVersions.ps1 = Get-VcxprojNugetPackageVersions.ps1
4241
..\README.md = ..\README.md
4342
..\doc\ReleaseNotes.md = ..\doc\ReleaseNotes.md
@@ -97,7 +96,9 @@ EndProject
9796
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{1A5D7A7D-5CB2-47D5-B40D-4E61CAEDC798}"
9897
ProjectSection(SolutionItems) = preProject
9998
CodeAnalysis.ruleset = CodeAnalysis.ruleset
99+
Directory.Build.props = Directory.Build.props
100100
Directory.Packages.props = Directory.Packages.props
101+
Directory.Solution.props = Directory.Solution.props
101102
nuget.config = nuget.config
102103
stylecop.json = stylecop.json
103104
vcpkg.json = vcpkg.json

src/Directory.Solution.props

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
<!-- This file is automatically included in the (autogenerated) project file for the solution. -->
12
<Project>
2-
<Import Project="$(MSBuildProjectDirectory)\vcpkg.props" />
3+
<Import Project="$(MSBuildProjectDirectory)\vcpkg.props" />
34
</Project>

src/vcpkg.props

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,23 +49,36 @@
4949
<VcpkgConfiguration>Release</VcpkgConfiguration>
5050
</PropertyGroup>
5151

52+
<!-- vcpkg can only install ports for one triplet at a time, so we need to ensure that every project using vcpkg uses the same triplet.
53+
If there is a triplet mismatch, the ports for one of the triplets will be deleted when installing a second one.
54+
In parallel builds, this can lead to projects that use the first triplet not being able to find the headers or binaries, and cause an error. -->
55+
5256
<PropertyGroup>
53-
<_TripletFile>$(VcpkgInstalledDir)\.selectedtriplet</_TripletFile>
57+
<!-- The MSBuild process starts with the solution file, and each individual project is built recursively from there.
58+
When building the .sln, we will write a file to indicate which triplet should be used in all projects.
59+
Each project will later read this file to verify that it is using the same triplet. -->
5460
<_IsBuildingSln>$(MSBuildProjectName.EndsWith('.sln'))</_IsBuildingSln>
61+
<_TripletFile>$(VcpkgInstalledDir)\.solutiontriplet</_TripletFile>
5562
</PropertyGroup>
5663

57-
<Target Name="WriteSolutionTripletToFile" BeforeTargets="Build" Condition="'$(_IsBuildingSln)' == 'true'">
64+
<Target Name="WriteSolutionTripletToFile"
65+
BeforeTargets="Build"
66+
Condition="'$(_IsBuildingSln)' == 'true'">
5867
<WriteLinesToFile File="$(_TripletFile)" Lines="$(VcpkgTriplet)" Overwrite="true" />
5968
</Target>
6069

61-
<Target Name="EnsureNoTripletMismatch" BeforeTargets="PrepareForBuild" Condition="'$(_IsBuildingSln)' != 'true'">
70+
<Target Name="EnsureNoTripletMismatch"
71+
BeforeTargets="PrepareForBuild"
72+
Condition="'$(_IsBuildingSln)' != 'true'" >
6273
<ReadLinesFromFile File="$(_TripletFile)">
6374
<Output TaskParameter="Lines" ItemName="_TripletFileLines" />
6475
</ReadLinesFromFile>
6576

6677
<PropertyGroup>
6778
<_SolutionTriplet>@(_TripletFileLines)</_SolutionTriplet>
6879
</PropertyGroup>
69-
<Error Condition=" '$(_SolutionTriplet)' != '$(VcpkgTriplet)' " Text="The vcpkg triplet $(VcpkgTriplet) selected for this project does not match the solution triplet $(_SolutionTriplet)" />
80+
81+
<Error Condition=" '$(_SolutionTriplet)' != '$(VcpkgTriplet)' "
82+
Text="The vcpkg triplet $(VcpkgTriplet) selected for this project does not match the solution triplet $(_SolutionTriplet)" />
7083
</Target>
7184
</Project>

0 commit comments

Comments
 (0)