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
For some reason when I disable allowMarshaling for some reason the source generator stops making its generated outputs visible to Visual Studio. ILSpy on the compiled binary confirms that they were emitted as expected, but they are not visible to the editor, Solution Explorer, or anywhere else in VS. This prevents me from effectively testing CsWin32, because I am getting tons of spurious symbol-not-found errors. This can only be avoided by turning allowMarshalling back on, and then reloading the solution to force VS to re-evaluate the code generators. I don’t know why this would happen, but I do remember it didn’t happen when I tried this library in the past. (I’m running VS 2022 Preview 3.1 and using CsWin32 0.1.506-preview.) Thanks!
It turns out it isn't toggling allowMarshaling that does it. It's having the JSON file in an unparseable state. If you toggle directly between true and false (by selecting true and pasting in false), it's fine. But if any keystroke leaves the json file in an invalid state, the source generator throws an unhandled exception and then roslyn penalizes it by never invoking it again within that session.
For some reason when I disable allowMarshaling for some reason the source generator stops making its generated outputs visible to Visual Studio. ILSpy on the compiled binary confirms that they were emitted as expected, but they are not visible to the editor, Solution Explorer, or anywhere else in VS. This prevents me from effectively testing CsWin32, because I am getting tons of spurious symbol-not-found errors. This can only be avoided by turning allowMarshalling back on, and then reloading the solution to force VS to re-evaluate the code generators. I don’t know why this would happen, but I do remember it didn’t happen when I tried this library in the past. (I’m running VS 2022 Preview 3.1 and using CsWin32 0.1.506-preview.) Thanks!
Originally posted by @wjk in #328 (comment)
The text was updated successfully, but these errors were encountered: