The IVsAppCompat interface is typically used to break compatibility of projects with previous versions of the application. This interface is available via the SVsSolution service.
For more information, see How to: Modify a Project System So That Projects Load in Multiple Versions of Visual Studio.
Assembly: Microsoft.VisualStudio.Shell.Interop.11.0 (in Microsoft.VisualStudio.Shell.Interop.11.0.dll)
Thetype exposes the following members.
|AskForUserConsentToBreakAssetCompat||Shows a dialog box that asks for user consent to break the compatibility of projects in a list. If the user does not agree to continue, this method throws a COMException with an ErrorCode of OLE_E_PROMPTSAVECANCELLED.|
|GetCurrentDesignTimeCompatVersion||Gets the current design time-compatibility version for this version of Visual Studio.|
The following call sequence is typical:
Call the AskForUserConsentToBreakAssetCompat method to show a dialog box that asks for user consent. If the user does not agree to continue, this method throws a COMException with an ErrorCode of OLE_E_PROMPTSAVECANCELLED.
If a COMException is not thrown, make the changes that break the compatibility.
To finalize the compatibility break, call the BreakAssetCompatibility method.
The BreakAssetCompatibility method calls the GetCurrentDesignTimeCompatVersion method to obtain a string that represents the current version of Visual Studio.
The BreakAssetCompatibility method then calls the SetProperty method to set the project VSHPROPID_MinimumDesignTimeCompatVersion property to the value of the version string that was obtained in the previous step.