@@ -137,7 +137,7 @@ public async Task TestDesignerAttributes()
137
137
// Ensure remote workspace is in sync with normal workspace.
138
138
var assetProvider = await GetAssetProviderAsync ( workspace , remoteWorkspace , solution ) ;
139
139
var solutionChecksum = await solution . CompilationState . GetChecksumAsync ( CancellationToken . None ) ;
140
- await remoteWorkspace . UpdatePrimaryBranchSolutionAsync ( assetProvider , solutionChecksum , CancellationToken . None ) ;
140
+ await remoteWorkspace . UpdatePrimaryBranchSolutionAsync ( assetProvider , solutionChecksum , solution . WorkspaceVersion , CancellationToken . None ) ;
141
141
142
142
var callback = new DesignerAttributeComputerCallback ( ) ;
143
143
@@ -188,7 +188,7 @@ public async Task TestDesignerAttributesUnsupportedLanguage()
188
188
// Ensure remote workspace is in sync with normal workspace.
189
189
var assetProvider = await GetAssetProviderAsync ( workspace , remoteWorkspace , solution ) ;
190
190
var solutionChecksum = await solution . CompilationState . GetChecksumAsync ( CancellationToken . None ) ;
191
- await remoteWorkspace . UpdatePrimaryBranchSolutionAsync ( assetProvider , solutionChecksum , CancellationToken . None ) ;
191
+ await remoteWorkspace . UpdatePrimaryBranchSolutionAsync ( assetProvider , solutionChecksum , solution . WorkspaceVersion , CancellationToken . None ) ;
192
192
193
193
var callback = new DesignerAttributeComputerCallback ( ) ;
194
194
@@ -359,8 +359,9 @@ public async Task TestRemoteWorkspaceCircularReferences()
359
359
using var remoteWorkspace = new RemoteWorkspace ( FeaturesTestCompositions . RemoteHost . GetHostServices ( ) ) ;
360
360
361
361
// this shouldn't throw exception
362
- var solution = await remoteWorkspace . GetTestAccessor ( ) . UpdateWorkspaceCurrentSolutionAsync (
363
- remoteWorkspace . GetTestAccessor ( ) . CreateSolutionFromInfo ( solutionInfo ) ) ;
362
+ var ( solution , updated ) = await remoteWorkspace . GetTestAccessor ( ) . TryUpdateWorkspaceCurrentSolutionAsync (
363
+ remoteWorkspace . GetTestAccessor ( ) . CreateSolutionFromInfo ( solutionInfo ) , workspaceVersion : 1 ) ;
364
+ Assert . True ( updated ) ;
364
365
Assert . NotNull ( solution ) ;
365
366
}
366
367
@@ -827,9 +828,10 @@ private static (Project project, ImmutableArray<Document> documents) GetProjectA
827
828
828
829
private static async Task UpdatePrimaryWorkspace ( RemoteHostClient client , Solution solution )
829
830
{
831
+ var workspaceVersion = solution . WorkspaceVersion ;
830
832
await client . TryInvokeAsync < IRemoteAssetSynchronizationService > (
831
833
solution ,
832
- async ( service , solutionInfo , cancellationToken ) => await service . SynchronizePrimaryWorkspaceAsync ( solutionInfo , cancellationToken ) ,
834
+ async ( service , solutionInfo , cancellationToken ) => await service . SynchronizePrimaryWorkspaceAsync ( solutionInfo , workspaceVersion , cancellationToken ) ,
833
835
CancellationToken . None ) ;
834
836
}
835
837
0 commit comments