NuGet - install.ps1 does not get called

前端 未结 3 1160
日久生厌
日久生厌 2020-12-20 12:43

I\'m trying to create my first NuGet package. I don\'t know why my install.ps1 script does not get called. This is directory structure

--Package
|
 - MyPacka         


        
3条回答
  •  礼貌的吻别
    2020-12-20 13:00

    An alternative to the install script can sometimes be a package targets file. This targets file is automatically weaved into the project file (csproj, ...) and gets called with a build.

    To allow Nuget to find this targets file and to weave it in, these two things are mandatory:

    • the name of the targets file must be .targets
    • it must be saved in the folder build at the top level of the package

    If you like to copy something to the output folder (e.g. some additional binaries, like native DLLs) you can put these binaries into the package under folder binaries and use this fragment in the targets file for the copying:

    
        
            
                 
            
    
            
        
    
    

提交回复
热议问题