Pregunta

When I compile and run my program in Debug mode, everything works as intended. However, when I compile and run in Release mode, things get a little... strange. I receive the following exception if I run the Release mode executable

RemotingException occurred: The async result object is null or of an unexpected type.

We do use .NET remoting in our application, however, I can confirm this is not a problem with any of my remote calls. This is happening right when I open the program, before I can even step into the Main() method. I have not really been able to find any help on the internet regarding this particular exception/message combination, other than a suggestion about the path being too long (but neither my working copy or the installed copy should have paths long enough to trigger this). Any assistance on this is greatly appreciated, as I'm not entirely sure how to proceed with this error.

¿Fue útil?

Solución

Check here: mystery RemotingException raised when changing Platform Target to Any CPU

It seems to change the paths to the DLL's you want to access. Take a look at the paths in the linked question. They are well over 127 chars, and there is nothing you can do about it.

Example:

'C:\Windows\assembly\GAC_MSIL\Microsoft.VisualStudio.HostingProcess.Utilities.Sync\10.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.HostingProcess.Utilities.Sync.dll

EDIT: Try changing to "x86" and see if the error goes away.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top