You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use an older Fody DLL (ReactiveUI.Fody I think version 19.5.41) to mutilate a .NET DLL. (Put [Reactive] attribute on a property.)
It adds System.Runtime version 8.0 to the DLL. There is also already a System.Runtime version 9.0 in the DLL. I suspect this is not supposed to be. (I see two separate references in the DLL using dotPeek.)
Debug with VS2022 preview or use dotnet watch and make a hot reload change.
No matter what the change is, it fails with CS7038.
Diagnostic Id:
error CS7038: Failed to emit module 'Xyz.Core': Changing the version of an assembly reference is not allowed during debugging: 'System.Runtime, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' changed version to '9.0.0.0'.
Expected Behavior:
Hot reload works.
Actual Behavior:
Hot reload fails with this error:
dotnet watch :x: error CS7038: Failed to emit module 'Xyz.Core': Changing the version of an assembly reference is not allowed during debugging: 'System.Runtime, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' changed version to '9.0.0.0'.
Suggestions for fix:
[Suggestion 1] Detect this scenario: the assembly has v8, v9 references of a DLL before Hot Reload, and the same two versions after, so do not fail with CS7038, because this is inaccurate: no assembly versions of references actually changed.
[Suggestion 2] Improve the error message in this scenario: "DLLs are not allowed to have multiple references to the same DLL, with different version numbers. Bad IL exception." (...that's if this is true. I have no idea.)
Note on bigger picture: Hot Reload has a bad reputation for not working a lot of the time, so any time Microsoft can detect problems caused by 3rd parties (i.e. buggy Fody mutilations), it would be great, in order to rehabilitate the Hot Reload reputation. I almost gave up on tracking this down but I'm glad I didn't. Hot Reload is so helpful when it works.
Crossposted:
I also just filed this issue with the ReactiveUI Fody project that destroyed my DLL:
Version Used:
Steps to Reproduce:
dotnet watch
and make a hot reload change.Diagnostic Id:
error CS7038: Failed to emit module 'Xyz.Core': Changing the version of an assembly reference is not allowed during debugging: 'System.Runtime, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' changed version to '9.0.0.0'.
Expected Behavior:
Hot reload works.
Actual Behavior:
Hot reload fails with this error:
Suggestions for fix:
Note on bigger picture: Hot Reload has a bad reputation for not working a lot of the time, so any time Microsoft can detect problems caused by 3rd parties (i.e. buggy Fody mutilations), it would be great, in order to rehabilitate the Hot Reload reputation. I almost gave up on tracking this down but I'm glad I didn't. Hot Reload is so helpful when it works.
Crossposted:
I also just filed this issue with the ReactiveUI Fody project that destroyed my DLL:
Old unresolved Fody issue that is related:
The text was updated successfully, but these errors were encountered: