-
-
Notifications
You must be signed in to change notification settings - Fork 18
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
Blank VB project on .NET Framework does not compile when PropertyChanging.Fody is added #569
Comments
are you a sponsor of the project? |
I am not. I consider it simply as a bug report, not a support request. I don't expect you to solve it unless you consider it a matter of general interest for the project. My assumption is that this is a small but still valuable contribution, both for you to know of the issue, and for anyone else encountering the issue to have a documented workaround. Would you prefer not to get bug reports from non-sponsors? |
I'm a sponsor now, considering how useful Fody is, I don't mind contributing. :) |
Looking at the workaround you supposed, I don't see any other way to fix this, since Fody can't know what language the assembly was created from. |
@tom-englert - PropertyChanged.Fody does not require this change when using the same setup, so it's not a general Fody issue. There must be a difference in implementation causing this repo to have a dependency on this, which most likely could be averted. The question is how many users of VB.NET/NET4.8 are around and if it's worth solving it "elegantly", or it's rather better to document the requirement explicitly in the setup instructions / notes and leave it at that. Since there's already a requirement to inject mscorlib / System.Object in legacy VB.NET/NETFramework projects. |
Since both VB and NetFramework are retired technologies, I would rather recommend to document this requirement. Can you provide a PR? |
Agreed |
Added info to the Wiki |
Describe the issue
When using a .NET Framework VB project, adding the PropertyChanging.Fody makes the project not compile. This happens regardless of the version of PropertyChanging.Fody or Fody (tested with Fody 1.x.x - 6.x.x).
The same does not happen with C#, which will compile normally.
Error text:
A fresh VB.NET project at first gives a different error, like in the related PropertyChanged.Fody library, solved as shown here:
Fody/PropertyChanged#313
But after solving that part, gives the quoted error.
Minimal Repro
VB.NET .NET Framework 4.8:
FodyVb.zip
On .NET Core and above, the issue does not occur.
Make an effort to fix the bug
The workaround for VB.NET is to add the following to the .vbproj file:
<Reference Include="Microsoft.VisualBasic" />
The text was updated successfully, but these errors were encountered: