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

Cannot reference my nuget package namespace

$
0
0

Repro

I have created my FIRST nuget package. Package project targets net standard 2.0. It is built and published by azure pipeline:

...
- task: VSBuild@1
  ...

- task: VSTest@2
  ...

- task: NuGetCommand@2
  inputs:
    command: pack
    packDestination: '$(Build.ArtifactStagingDirectory)/Nuget/MyPackage'
    packagesToPack: '**/MyPackage.EventBus.nuspec'

- task: NuGetCommand@2
  displayName: 'NuGet push'
  inputs:
    command: push
    packagesToPush: '$(Build.ArtifactStagingDirectory)/Nuget/MyPackage/*.nupkg'
    publishVstsFeed: 'MyFeed'
    allowPackageConflicts: true

I have a nuspec file which has defined id, version, title, owner, license etc. and of course files:

<file src="MyPackage.EventBus\Factory\**" target="content\Factory" />
<file src="MyPackage.EventBus\Interfaces\**" target="content\Interfaces" />
<file src="MyPackage.EventBus\Null\**" target="content\Null" />
<file src="MyPackage.EventBus\ServiceBus\**" target="content\ServiceBus" />

<file src="MyPackage.EventBus\*.cs" target="content" />
<file src="MyPackage.EventBus\MyPackage.EventBus.csproj" target="content" />

Next I have installed my package in azure function v3 project with net core 3.1.

Problem

After installation I cannot reference any class or namespace from my package e.g.:

namespace MyPackage.EventBus
{
    public abstract class BaseEvent

Tried

I have checked my nuget package file in NuGet Package Explorer:

nuget package content

It seems that there is no dll file. Should it be there in package or not? What to do to contain dll file in package if it is neccessary?


Viewing all articles
Browse latest Browse all 3067

Trending Articles



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