I have a Visual Studio Add-In written in C# that uses the CallContext object.
When Visual Studio starts a build of the opened solution, I get the following error:
Unknown build error, 'Type is not resolved for member 'Codice.CM.Common.CmCallContext,commontypes, Version=220.127.116.11, Culture=neutral, PublicKeyToken=a107c9c6e34c8876'.'
The error occurs because Visual Studio launches the build process in a new AppDomain, and it needs to deserialize our CallContext (CmCallContext) object and it can't be load the commontypes.dll library because it is in other AppDomain (or dll is not registered in the GAC).
So I have found some solutions but any is good for me:
1. Register commontypes.dll assembly in the GAC
2. Ensure that CallContext is clean before Visual Studio make anything (setting it to null). We tried to implement this solution but is quite difficult for us, because it implies clean callcontext after a server call, and we have a lot of server calls scattered throughout the code. We could centralize these calls, but it is very difficult because that would have a lot of delegates, and it would be very difficult to maintain.
Somebody knows other workaround for this issue?
Thanks in advanced,
View Complete Post