|
126 | 126 | <UsingTask TaskName="<#= task #>" AssemblyFile="$(UnityModStudioTasksAssembly)" /> |
127 | 127 | <# } #> |
128 | 128 |
|
| 129 | + <Target Name="PrepareForUpToDateCheck" BeforeTargets="CollectUpToDateCheckBuiltDesignTime" DependsOnTargets="ResolveGameVersions" Condition="'$(_SpecifiedGameVersionType)' == 'Multiple'"> |
| 130 | + <PropertyGroup> |
| 131 | + <SkipCopyBuildProduct>true</SkipCopyBuildProduct> |
| 132 | + <_DocumentationFileProduced>false</_DocumentationFileProduced> |
| 133 | + <_DebugSymbolsProduced>false</_DebugSymbolsProduced> |
| 134 | + </PropertyGroup> |
| 135 | + <ItemGroup> |
| 136 | + <IntermediateAssembly Remove="@(IntermediateAssembly)" /> |
| 137 | + </ItemGroup> |
| 138 | + <MSBuild Projects="$(MSBuildProjectFullPath)" Targets="_PrepareForUpToDateCheckInner" Properties="GameVersion=%(_AllGameVersions.Identity);IsSpecificGameVersionBuild=true"> |
| 139 | + <Output TaskParameter="TargetOutputs" ItemName="UpToDateCheckBuilt" /> |
| 140 | + </MSBuild> |
| 141 | + </Target> |
| 142 | + |
| 143 | + <Target Name="_PrepareForUpToDateCheckInner" Returns="@(_UpToDateCheckBuilt)" DependsOnTargets="CompileDesignTime"> |
| 144 | + <!-- Copied from https://github.com/dotnet/project-system/blob/77f6d69c2105929bcbbfe3532e851c41802ce802/src/Microsoft.VisualStudio.ProjectSystem.Managed/ProjectSystem/DesignTimeTargets/Microsoft.Managed.DesignTime.targets#L426-L443 --> |
| 145 | + <ItemGroup> |
| 146 | + <!-- Assembly output, bin and obj --> |
| 147 | + <_UpToDateCheckBuilt Condition="'$(CopyBuildOutputToOutputDirectory)' != 'false' and '$(SkipCopyBuildProduct)' != 'true'" Include="$(TargetPath)"/> |
| 148 | + <_UpToDateCheckBuilt Include="@(IntermediateAssembly)"/> |
| 149 | + |
| 150 | + <!-- Documentation file, bin and obj --> |
| 151 | + <_UpToDateCheckBuilt Condition="'$(_DocumentationFileProduced)'=='true'" Include="@(FinalDocFile)"/> |
| 152 | + <_UpToDateCheckBuilt Condition="'$(_DocumentationFileProduced)'=='true'" Include="@(DocFileItem)"/> |
| 153 | + |
| 154 | + <!-- Symbols, bin and obj --> |
| 155 | + <_UpToDateCheckBuilt Condition="'$(_DebugSymbolsProduced)'=='true'" Include="@(_DebugSymbolsIntermediatePath)"/> |
| 156 | + <_UpToDateCheckBuilt Condition="'$(_DebugSymbolsProduced)'=='true' and '$(SkipCopyingSymbolsToOutputDirectory)' != 'true' and '$(CopyOutputSymbolsToOutputDirectory)' != 'false'" Include="@(_DebugSymbolsOutputPath)"/> |
| 157 | + </ItemGroup> |
| 158 | + </Target> |
| 159 | + |
129 | 160 | <Target Name="CleanResolvedData" AfterTargets="CoreClean" Condition="'$(IsSpecificGameVersionBuild)' != 'true'"> |
130 | 161 | <PropertyGroup> |
131 | 162 | <# foreach (var property in gamePropertiesToClean) { #> |
|
241 | 272 |
|
242 | 273 | <Target Name="GamePropertiesResolved" /> |
243 | 274 |
|
244 | | - <Target Name="UpdateGamePropertiesChangeTimestamp" BeforeTargets="ResolveGameAssemblyReferences" Condition="'$(GamePath)' != '$(_PreviousGamePath)'"> |
| 275 | + <Target Name="UpdateGamePropertiesChangeTimestamp" BeforeTargets="ResolveGameAssemblyReferences" Condition="'$(_GamePathChanged)' == 'true'"> |
245 | 276 | <Touch Files="$(_GamePropertiesChangeTimestampFilePath)" AlwaysCreate="true" /> |
246 | 277 | </Target> |
247 | 278 |
|
|
0 commit comments