Skip to content

Commit f334243

Browse files
committed
Update comment; delete file
1 parent 73341a4 commit f334243

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

src/vcpkg.props

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,10 @@
4242
<WriteLinesToFile File="$(_TripletFile)" Lines="$(VcpkgTriplet)" Overwrite="true" />
4343
</Target>
4444

45-
<!-- Note: Visual Studio does not build the .sln in the same way that MSBuild.exe does, so the above target is not executed.
46-
In that case we try to write the file on the first project we build.
47-
There is a race condition for parallel builds in doing this, but it won't happen on pipeline builds... -->
45+
<!-- Note: Visual Studio does not build the .sln in the same way that MSBuild.exe does.
46+
VS builds each project directly, instead of calling MSBuild on the .sln.
47+
This means that in VS the file is not written in the previous task, so we try to write it on the first project we build.
48+
There is a race condition for parallel builds in doing this, but it is unlikely and it cannot happen in pipeline (official) builds. -->
4849
<Target Name="WriteProjectTripletToFile"
4950
BeforeTargets="EnsureNoTripletMismatch"
5051
Condition="!Exists('$(_TripletFile)')">
@@ -63,7 +64,10 @@
6364
<_SolutionTriplet>@(_TripletFileLines)</_SolutionTriplet>
6465
</PropertyGroup>
6566

67+
<!-- For the dev inner loop using VS, this target will fail any time we build with a different configuration.
68+
We delete the file so that the next build works fine. -->
69+
<Delete Condition=" '$(_SolutionTriplet)' != '$(VcpkgTriplet)' " Files="$(_TripletFile)" />
6670
<Error Condition=" '$(_SolutionTriplet)' != '$(VcpkgTriplet)' "
67-
Text="The vcpkg triplet '$(VcpkgTriplet)' selected for project '$(MSBuildProjectName)' does not match with the solution triplet '$(_SolutionTriplet)'. If you are building from Visual Studio, try deleting the file '$(_TripletFile)'." />
71+
Text="The vcpkg triplet '$(VcpkgTriplet)' selected for project '$(MSBuildProjectName)' does not match the recorded triplet '$(_SolutionTriplet)'. This may indicate a mismatch in the triplets used for current build configuration. If you have just changed the Configuration in Visual Studio, this error may be spurious and building again should properly check for mismatch." />
6872
</Target>
6973
</Project>

0 commit comments

Comments
 (0)