Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Could not load file or assembly from package installed from nuget

Could not load file or assembly from package installed from nuget

Scheduled Pinned Locked Moved C#
visual-studiocsharphelptutorial
4 Posts 2 Posters 11 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Member_15634071
    wrote on last edited by
    #1

    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

    OriginalGriffO 1 Reply Last reply
    0
    • M Member_15634071

      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

      OriginalGriffO Offline
      OriginalGriffO Offline
      OriginalGriff
      wrote on last edited by
      #2

      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 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

      M 1 Reply Last reply
      0
      • OriginalGriffO OriginalGriff

        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!

        M Offline
        M Offline
        Member_15634071
        wrote on last edited by
        #3

        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

        OriginalGriffO 1 Reply Last reply
        0
        • M Member_15634071

          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

          OriginalGriffO Offline
          OriginalGriffO Offline
          OriginalGriff
          wrote on last edited by
          #4

          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!

          "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

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups