Dear support forum,
I am happily using Ncrunch for a long time now. But I started facing build problems when we were using Fody's NullGuard. A long time I could just manual rebuild and it would solve itself. But now I can not rebuild either and it stays in an error state of "Build failure".
-----------
Fody: An unhandled exception occurred:
Exception:
Unable to cast transparent proxy to type 'IInnerWeaver'.
Type:
System.InvalidCastException
StackTrace:
at IsolatedAssemblyLoadContext.CreateInstanceFromAndUnwrap()
at Processor.ExecuteInOwnAssemblyLoadContext()
at Processor.Inner()
at Processor.Execute()
Source:
FodyCommon
TargetSite:
IInnerWeaver CreateInstanceFromAndUnwrap()
----------
Now this is of course no immediate Ncrunch problem, since its Fody that complains. I also saw older posts on stack overflow, which make me believe this was an older and solved problem in Fody.NullGuard. I also set the "Auto-detect NuGet build dependencies to false (saw it mentioned as a solution).
But now it has become unusable for me.
I am hoping there is an approach were we can still use the NullGuarding and have Ncrunch make my day productive again.
Any solutions or pointers to solution are very welcome.
Regards,
Remco Bosman
Build/Test Issues
Unable to cast transparent proxy to type 'IInnerWeaver'.
Started by bosmanr on 3,717 views
Remco NCrunch Developer
#15492
23 Jun 2021 11:49 UTC
Hi Remco,
Thanks for sharing this problem. I'm not sure where to begin on this, so I reached out to Simon Cropp (the developer of Fody) for help. He's wondering if you are able to create a sample that can reproduce the problem? https://twitter.com/SimonCropp/status/1407664240459010049.
Thanks for sharing this problem. I'm not sure where to begin on this, so I reached out to Simon Cropp (the developer of Fody) for help. He's wondering if you are able to create a sample that can reproduce the problem? https://twitter.com/SimonCropp/status/1407664240459010049.
Well I wonder if I need to add some extra configuration. I found some older posts about copying referenced assemblies and copying the Fody packages. Or should it work out of the box with default settings? Weird thing is the same solution works on my desktop (requiring manual rebuild as well, but I can get it to build) but it all of a sudden stopped on my laptop, same solution.
Remco NCrunch Developer
#15494
23 Jun 2021 12:47 UTC
bosmanr wrote:Well I wonder if I need to add some extra configuration. I found some older posts about copying referenced assemblies and copying the Fody packages. Or should it work out of the box with default settings? Weird thing is the same solution works on my desktop (requiring manual rebuild as well, but I can get it to build) but it all of a sudden stopped on my laptop, same solution.
The 'Copy referenced assemblies to workspace' setting is usually the first one to try, as this makes the build behave in a manner more similar to that of VS (with some performance implications).
I can also recommend trying compatibility mode.
Unfortunately I'm not familiar enough with the internals of Fody to guess at what may be the cause of this exception. If you can put together a sample solution that can consistently produce the problem, Simon is offering to take a closer look.
Ok thanks for the reply, i will see how far i can get with these settings and try to make a smaller solution to be able to pinpoint if it always goes wrong. But that will take me a bit more time. And I'll address Fody for this.
Just to post a bit of an update. The projects were using two Fody weavers, NullGuard and EmptyConstructor. Things seem to work better with just one. I hope I can make a simple test project with this in mind.
I encountered fody related build issues too. "Copy referenced assemblies" did not help in my case.
After randomly tweeking ncrunch settings it "works on my machines" setting "Build process CPU architecture" in ncrunch settings to x64 instead of the defaulted x86.
Hope it helps anyone :)
After randomly tweeking ncrunch settings it "works on my machines" setting "Build process CPU architecture" in ncrunch settings to x64 instead of the defaulted x86.
Hope it helps anyone :)
Thanks Lars,
Trying that now and my most cumbersome project seems to be running way smoother now. Never got down to the real problem, since it only happens on larger solutions. I created a test solution with just three projects, it never failed.
Hope it keeps on working.
Trying that now and my most cumbersome project seems to be running way smoother now. Never got down to the real problem, since it only happens on larger solutions. I created a test solution with just three projects, it never failed.
Hope it keeps on working.
Post a reply
Log in to reply.