-
Notifications
You must be signed in to change notification settings - Fork 77
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
Exception when trying to rewrite WPF .NET 6.0 application; unable to find PresentationCore #474
Comments
Tried again this morning by copying PresentationCore.dll from C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App\6.0.16, which made it pass the rewrite step, but currently failing the test run step due to Bad IL Format. |
Small update; weirdly, running ILVerify on the un-rewritten dlls is also throwing errors, so I'm currently trying to slim down the project and get rid of those. |
I believe that I have noticed this kind of error before if trying to use a different .NET version of the coyote tool with a different version of .NET binaries to rewrite. For example, trying to use .NET framework |
I've managed to get it rewriting successfully by copying in the files under test and fixing any IL issues on that, and it now runs the I think I'm using the .NET 7.0 version of coyote, and the project under test is definitely .NET 7.0. |
Glad you found a workaround, although I agree painful! If both are .NET 7, then it is really strange, not sure what it could be causing this. Let us know if you discover anything that might point to what is the root cause of this! |
I'm trying to rewrite
Getting logging output:
Attempted fixes
Attempted to ignore that assembly, via setting
in the passed JSON configuration file, but no luck.
Running with verbosity set to "exhaustive" gave the following stack trace:
I forked the code and wrapped the
method.DeclaringType.Resolve()
call in atry/catch
block, returningfalse
if an exception was thrown, which got me a little further;Did the same try/catch in that method, wrapping
methodReference.ReturnType.Resolve()
. Now throwing on IsForeignType check in the sameVisitInstruction
method;another try/catch and now the rewriting completed successfully.
I doubt this is the correct way of solving this though!
The text was updated successfully, but these errors were encountered: