Click or drag to resize

WorkspaceTryApplyChanges Method



Apply changes made to a solution back to the workspace. The specified solution must be one that originated from this workspace. If it is not, or the workspace has been updated since the solution was obtained from the workspace, then this method returns false. This method will still throw if the solution contains changes that are not supported according to the CanApplyChange(ApplyChangesKind) method.

Namespace:  Microsoft.CodeAnalysis
Assembly:  Microsoft.CodeAnalysis.Workspaces (in Microsoft.CodeAnalysis.Workspaces.dll) Version: 2.3.0-dev-56735-00. Commit Hash: <developer build>
Syntax
public virtual bool TryApplyChanges(
	Solution newSolution
)

Parameters

newSolution
Type: Microsoft.CodeAnalysisSolution

Return Value

Type: Boolean
Exceptions
ExceptionCondition
NotSupportedExceptionThrown if the solution contains changes not supported according to the CanApplyChange(ApplyChangesKind) method.
See Also