Skip to content
This repository was archived by the owner on Feb 14, 2025. It is now read-only.

Commit 19e7823

Browse files
kfertittarobmen
authored andcommitted
Don't attempt to support IVsDebuggableProjectCfg in IVsProjectFlavorCfg.get_CfgType.
This results in an InvalidCastException and seems to have done so for a long time. Prior to VS2022 Preview 4, VS would swallow this exception and there seemed to be no observable detrimental effects. However, starting with VS2022 Preview 4, VS changed their handling of these calls and no longer swallow the exception. The exceptions bubbles up the stack and prevents the .wixproj from opening.
1 parent e192aac commit 19e7823

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/votive.shared/ProjectBase/ProjectConfig.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -900,9 +900,7 @@ int IVsProjectFlavorCfg.get_CfgType(ref Guid iidCfg, out IntPtr ppCfg)
900900
ppCfg = IntPtr.Zero;
901901

902902
// See if this is an interface we support
903-
if (iidCfg == typeof(IVsDebuggableProjectCfg).GUID)
904-
ppCfg = Marshal.GetComInterfaceForObject(this, typeof(IVsDebuggableProjectCfg));
905-
else if (iidCfg == typeof(IVsBuildableProjectCfg).GUID)
903+
if (iidCfg == typeof(IVsBuildableProjectCfg).GUID)
906904
{
907905
IVsBuildableProjectCfg buildableConfig;
908906
this.get_BuildableProjectCfg(out buildableConfig);

0 commit comments

Comments
 (0)