Could not load file or assembly from package installed from nuget
-
I downloaded and installed a package from nuget When I compile source code exe file cannot find dll file but after package installation dll appeared on disk How to fix it without using visual studio or copying dll's
-
I downloaded and installed a package from nuget When I compile source code exe file cannot find dll file but after package installation dll appeared on disk How to fix it without using visual studio or copying dll's
Check your project references, and if they all look OK, check the folders: the compiled DLL needs to be in the "bin" folder under the relevant project. If you have the references set correctly, the required non-system DLL files will be built and then copied to the bin folders.
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt AntiTwitter: @DalekDave is now a follower!
-
Check your project references, and if they all look OK, check the folders: the compiled DLL needs to be in the "bin" folder under the relevant project. If you have the references set correctly, the required non-system DLL files will be built and then copied to the bin folders.
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt AntiTwitter: @DalekDave is now a follower!
I added reference to the dll at compile time and executable was created but executable cannot find dll to load This program has two files one cs and one dll I compiled it from command line with csc given with Windows (Windows gives us .Net Framework 4.8 and C# up to 5.0) (It is simple program with one cs file and one dll file so i don't want to create project for that) Yes copying the dll to the program folder is kind of solution but wasting disk space Such copying is unnecessary in my opinion and better way would be for example choosing path to dll for executable I would like to do not need copying dlls to program folder for each program which uses that dll Now I am trying to extract data from html and I found nuget package for this Some time ago I found Rational number class I downloaded and installed it via nuget and executable couldn't locate dll But when I compiled dll from sources there was no problems with finding and loading dll by executable
-
I added reference to the dll at compile time and executable was created but executable cannot find dll to load This program has two files one cs and one dll I compiled it from command line with csc given with Windows (Windows gives us .Net Framework 4.8 and C# up to 5.0) (It is simple program with one cs file and one dll file so i don't want to create project for that) Yes copying the dll to the program folder is kind of solution but wasting disk space Such copying is unnecessary in my opinion and better way would be for example choosing path to dll for executable I would like to do not need copying dlls to program folder for each program which uses that dll Now I am trying to extract data from html and I found nuget package for this Some time ago I found Rational number class I downloaded and installed it via nuget and executable couldn't locate dll But when I compiled dll from sources there was no problems with finding and loading dll by executable
Check the build parameters: if your exe is 64 bit and the DLL is 32 then it can't load it, and vice versa.
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt AntiTwitter: @DalekDave is now a follower!