Quantcast
Channel: Active questions tagged nuget-package - Stack Overflow
Viewing all articles
Browse latest Browse all 3067

Azure pipeline generated NuGet packages will not install "seem empty"

$
0
0

NuGet Packages "seem Empty"

I have a solution that creates two .dll files.

  • JReyLibrary - some common functions and controls.
  • JRTestLib - Testing helps.

I was able to build NuGet Packages for both and install into an app, using the classic pipeline.When I changed to the YAML pipeline I was able to build the packages but the will not install in the app.

The installation has no errors but do not show up in the references.

I am very confused some documentation says I do not need a .nuspec file if I have a .csproj file.

I do not have a *[library]*.nuspec file.

Observations

Inspecting the .nuget\packages[library] I find that the directory structure is different.

Classic Pipeline

The following is an old Version that loads and is visible in the VS project References. This was created using the classic pipeline.

 Directory of C:\Users\james\.nuget\packages\jrtestlib\0.14.6535.2474107/30/2020  07:39 AM    <DIR>          .07/30/2020  07:39 AM    <DIR>          ..07/30/2020  07:39 AM               130 .nupkg.metadata07/30/2020  07:39 AM             7,561 jrtestlib.0.14.6535.24741.nupkg07/30/2020  07:39 AM                88 jrtestlib.0.14.6535.24741.nupkg.sha51211/22/2017  01:45 PM               605 jrtestlib.nuspec07/30/2020  07:39 AM    <DIR>          lib               4 File(s)          8,384 bytes Directory of C:\Users\james\.nuget\packages\jrtestlib\0.14.6535.24741\lib07/30/2020  07:39 AM    <DIR>          .07/30/2020  07:39 AM    <DIR>          ..07/30/2020  07:39 AM    <DIR>          net40               0 File(s)              0 bytes Directory of C:\Users\james\.nuget\packages\jrtestlib\0.14.6535.24741\lib\net4007/30/2020  07:39 AM    <DIR>          .07/30/2020  07:39 AM    <DIR>          ..11/22/2017  01:45 PM            11,264 JRTestLib.dll               1 File(s)         11,264 bytes     Total Files Listed:               5 File(s)         19,648 bytes               8 Dir(s)  389,112,635,392 bytes free

Note: The .dll file is in contained in .\lib\net40 directory.

Am not able to show the classic pipeline steps because it says I cannot imbed an image.

There is one item that I was not able to translate to YAML. The Output Variables option contains NuGetPackager_5 (JReyLibrary) and NuGetPackager_11 (JRTestLib).

I also noticed that the Publisher Task is before the copy files task.

YAML Pipeline

This package was built using YAML to crate the packages.These packages install without error but do not show up in the References of the project.

The following directory structure is found.

 Directory of C:\Users\james\.nuget\packages\jrtestlib\0.16.20201211.712/11/2020  03:09 PM    <DIR>          .12/11/2020  03:09 PM    <DIR>          ..12/11/2020  03:09 PM               130 .nupkg.metadata12/11/2020  03:09 PM             6,708 jrtestlib.0.16.20201211.7.nupkg12/11/2020  03:09 PM                88 jrtestlib.0.16.20201211.7.nupkg.sha51212/11/2020  03:09 PM               586 jrtestlib.nuspec12/11/2020  03:09 PM    <DIR>          tools               4 File(s)          7,512 bytes Directory of C:\Users\james\.nuget\packages\jrtestlib\0.16.20201211.7\tools12/11/2020  03:09 PM    <DIR>          .12/11/2020  03:09 PM    <DIR>          ..12/11/2020  03:09 PM            11,264 JRTestLib.dll               1 File(s)         11,264 bytes     Total Files Listed:               5 File(s)         18,776 bytes               5 Dir(s)  388,888,588,288 bytes free

Note: the .dll file is found in the ./Tools Directory.

Changing the app project References to this file directly compiles correctly.

The following shows the tasks to pack an publish the NuGet packages.

YAML pipeline snippit
- task: NuGetCommand@2  displayName: 'NuGet pack JReyLibrary'  env:    packageversion: $(packageversion)  inputs:    command: pack    packagesToPack: JLReyLibrary/JReyLibrary.csproj    versioningScheme: byEnvVar    versionEnvVar: packageversion    includeSymbols: true    toolPackage: true  enabled: true- task: NuGetCommand@2  displayName: 'NuGet pack JRTestLib'  env:    packageversion: $(packageversion)  inputs:      command: pack      packagesToPack: JLReyLibrary/JRTestLib/JRTestLib.csproj      versioningScheme: byEnvVar      versionEnvVar: packageversion      includeSymbols: true      toolPackage: true  enabled: true- task: NuGetCommand@2  displayName: NuGet Push  inputs:    command: 'push'    packagesToPush: '$(Build.ArtifactStagingDirectory)/**/*.nupkg;!$(Build.ArtifactStagingDirectory)/**/*.symbols.nupkg'    nuGetFeedType: 'internal'    publishVstsFeed: 'jlr_feed'- task: CopyFiles@2  inputs:   SourceFolder: '$(build.sourcesdirectory)'   Contents: '**'   TargetFolder: '$(build.artifactstagingdirectory)'- task: PublishBuildArtifacts@1  inputs:    PathtoPublish: '$(Build.ArtifactStagingDirectory)'    ArtifactName: 'drop'    publishLocation: 'Container'

I do not see any documentation that will help this.


Viewing all articles
Browse latest Browse all 3067

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>