NuGet Assembly outside lib folder

前端 未结 8 554
悲&欢浪女
悲&欢浪女 2020-12-08 12:59

I\'m going to bang out a couple of questions here...first, with NuGet is it possible to create a package from a few DLLs? There is no visual studio project, just the command

相关标签:
8条回答
  • 2020-12-08 13:51

    If dependencies or libraries have been changed, old files affect the packaging operation.

    1. Remove obj and bin folders from project.
    2. Run dotnet restore
    3. Run nuget pack yournuspecfile.nuspec -properties Configuration=Release -IncludeReferencedProjects or your command whatever.
    0 讨论(0)
  • 2020-12-08 13:52

    I just ran into this problem. Nuget is expecting a structure that looks like:

    root
      - lib
        - net40
          - File1.dll
          - File2.dll
          - File3.dll
    

    net40 or net20 or net45 as appropriate to your .net version.

    run

    nuget pack yourlibrary.nuspec
    

    to package it up.

    That will pack up the dir wholesale and put it in the nupkg. The error messages will disappear at that point.

    0 讨论(0)
提交回复
热议问题