-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"GenerateResource" task failed unexpectedly due to System.Runtime.Remoting.RemotingExcpetion: Object 'xxx.rem' has been disconnected or does not exist at the server #11003
Comments
ProcessResourceFiles seems to derive from MarshalByRefObject on .NET Framework: msbuild/src/Tasks/GenerateResource.cs Lines 2212 to 2215 in 8f6b8ad
The GenerateResource task doesn't seem to be doing anything about leases for cross-appdomain remoting. If the operation lasts longer than the timeouts configured in LifetimeServices, then perhaps .NET Framework disconnects the ProcessResourceFiles instance from remoting. This might be fixable by making ProcessResourceFiles override the MarshalByRefObject.InitializeLifetimeService method to return null. The caller will unload the whole AppDomain anyway, so the lease mechanism is not useful for ProcessResourceFiles. |
We did turn on the We're assuming that the optimized resource usage as a result of |
|
Setting ResGenExecuteAsTool=true might work around the problem, by making the GenerateResource task run ResGen.exe as a child process instead of using cross-AppDomain remoting. It could be slower, though. |
Thanks! Understood.
Will definitely take a look at this one. I've asked the folks to get me a bin log and we'll turn that option on and monitor. |
Issue Description
We're running into an issue with a large .NET Framework project that runs into the following error intermittently:
This project is using the older csproj format and is on the larger side with a bunch of resource files. We've been struggling to determine how to figure out the root cause of the problem though. Anyone have ideas of what the issue is or what logs we can turn on to investigate further? We've turned on Roslyn compiler logs and didn't see anything too crazy to the untrained eye. This seems like a relevant issue but not a lot of content there: #6770
Steps to Reproduce
We can't provide reproduce steps unfortunately since we see it intermittently in a very large internal project.
Expected Behavior
We expect the compilation and the GenerateResource task to succeed.
Actual Behavior
The GenerateResource task will fail intermittently with an error that is a little difficult for those unfamiliar with MSbuild internals to understand.
Analysis
No response
Versions & Configurations
No response
The text was updated successfully, but these errors were encountered: