0

If I hot reload after editing related to an interface in COM reference, CS7096 occurs and the hot reload fails.

// Start debugging this code.

var instance = temp as ComLib.ICom;
instance.Foo1();
// If I edit with this code and attempt to hot reload, CS7096 will occur and the hot reload will fail.

var instance = temp as ComLib.ICom;
instance.Foo2();

The only thing I found was "CS7096 - Cannot continue the edit inclusion a reference to an embedded type: 'ICom'."

Any solutions or related references?

  • Maybe this will help: https://stackoverflow.com/a/27672935/3150445 – jwdonahue Feb 26 '23 at 07:49
  • Hot relead only works for fully managed code. It patches the IL in the runtime. It can't do that with COM objects.Hit reload is a feature of the CLR and it does not exist for unmanaged code and COM as their "Runtimes" don't implement it. It's almost impossible to do that for unmanaged code anyway. – jessehouwing Feb 26 '23 at 08:53

0 Answers0