© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•4y ago•
6 replies
_moare

Use dll from project reference

I have a class library which adds a few helper functions to a nuget package. This nuget package requires the System.Windows.Forms.dll.

My main project references the class library and my class library references the nuget package.

When i add the DLL to the main project and reference it from there everything works as expected. But when i add it to my class library, it cant be found when running.

Could not load file or assembly 'System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'. Das System kann die angegebene Datei nicht finden.
Could not load file or assembly 'System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'. Das System kann die angegebene Datei nicht finden.


Is there a way to make this work?

Project: .net core 6
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,828Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Reference base in different project/dll
C#CC# / help
3y ago
"Protected" dll reference
C#CC# / help
2y ago
❔ Cannot find .dll in referenced project
C#CC# / help
3y ago
DLL references
C#CC# / help
12mo ago