C
C#2y ago
gbrlhz

❔ I can't reference a class library please help

I can't reference a class library i t says compilation error
14 Replies
gbrlhz
gbrlhzOP2y ago
please help
Angius
Angius2y ago
What library? How are you referencing it? What's the error?
gbrlhz
gbrlhzOP2y ago
gbrlhz
gbrlhzOP2y ago
@Angius Im trying to reference classLibrary from windows forms app The message says Compilation error Would you wish to continue and execute a previous correct version
Angius
Angius2y ago
Does the library build fine by itself? And does the main app build fine by itself?
gbrlhz
gbrlhzOP2y ago
Yes they do @Angius
Angius
Angius2y ago
Huh, odd Weird that there isn't a good and proper error message
gbrlhz
gbrlhzOP2y ago
it seems that removing that line from the classLibrary.csproj lets me reference
Angius
Angius2y ago
Huh Do both the class library and the Winforms project target the same framework version?
gbrlhz
gbrlhzOP2y ago
Yes No forget it doesn't work again 😦 @Angius i have net 6 installed and both are using net 6 as target framework i dont see the problem
Angius
Angius2y ago
I don't see it either, sorry
cptcrawler
cptcrawler2y ago
try targeting from the library .netstandard 2.0 instead of .Net 6 WinForms may have some problems with it maybe 🧐
Anton
Anton2y ago
it should be .net6-windows
Accord
Accord2y ago
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.
Want results from more Discord servers?
Add your server