❔ I can't reference a class library please help

Ggbrlhz2/2/2023
I can't reference a class library i t says compilation error
Ggbrlhz2/2/2023
please help
AAngius2/2/2023
What library? How are you referencing it? What's the error?
Ggbrlhz2/2/2023
Image
Ggbrlhz2/2/2023
@Angius
Ggbrlhz2/2/2023
Im trying to reference classLibrary from windows forms app
Ggbrlhz2/2/2023
The message says Compilation error Would you wish to continue and execute a previous correct version
AAngius2/2/2023
Does the library build fine by itself?
AAngius2/2/2023
And does the main app build fine by itself?
Ggbrlhz2/2/2023
Yes they do
Ggbrlhz2/2/2023
@Angius
AAngius2/2/2023
Huh, odd
AAngius2/2/2023
Weird that there isn't a good and proper error message
Ggbrlhz2/2/2023
it seems that removing that line from the classLibrary.csproj lets me reference
Image
AAngius2/2/2023
Huh
AAngius2/2/2023
Do both the class library and the Winforms project target the same framework version?
Ggbrlhz2/2/2023
Yes
Ggbrlhz2/2/2023
No forget it doesn't work again 😦
Ggbrlhz2/2/2023
@Angius i have net 6 installed and both are using net 6 as target framework
Ggbrlhz2/2/2023
i dont see the problem
AAngius2/2/2023
I don't see it either, sorry
CCCpt Crawler2/2/2023
try targeting from the library .netstandard 2.0
CCCpt Crawler2/2/2023
instead of .Net 6
CCCpt Crawler2/2/2023
WinForms may have some problems with it maybe 🧐
AAntonC2/3/2023
it should be .net6-windows
AAccord2/4/2023
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.