Nuget Feed publish failing

I have been successfully publishing a nuget package to the internal Team City nuget feed up until a few days ago when errors exactly like the below example started showing in the diagnostic logs. 

 

[2017-09-06 09:50:23,338]   INFO - NuGetArtifactsMetadataProvider - Indexing NuGet package from artifact MyNugetPackage.1.2.0.nupkg of build #2 {build id=2649, buildTypeId=MyBuild} 
[2017-09-06 09:50:23,339]   WARN - l.NuGetPackageStructureVisitor - Failed to read content of NuGet package MyNugetPackage.1.2.0.nupkg 
[2017-09-06 09:50:23,339]   WARN - NuGetArtifactsMetadataProvider - Failed to resolve NuGet package Id, package ignored: Artifact[promotionId=2649, relativePath=MyNugetPackage.1.2.0.nupkg] 
[2017-09-06 09:50:23,339]   INFO - NuGetArtifactsMetadataProvider - Indexing NuGet package from artifact MyNugetPackage.1.1.0.nupkg of build #2 {build id=2649, buildTypeId=MyBuild} 
[2017-09-06 09:50:23,339]   WARN - l.NuGetPackageStructureVisitor - Failed to read content of NuGet package MyNugetPackage.1.1.0.nupkg 
[2017-09-06 09:50:23,341]   WARN - NuGetArtifactsMetadataProvider - Failed to resolve NuGet package Id, package ignored: Artifact[promotionId=2649, relativePath=MyNugetPackage.1.1.0.nupkg] 

 

The configuration is simply this:

Package the nuget with:

dotnet pack %system.teamcity.build.workingDir%\MyProject.csproj -o ..\build\packages /p:PackageVersion=%NugetVersion%

And then set the artifact paths for this build configuration:

build\packages\** =>

 

I have tried: 

1. Clearing the nuget cache on our Team City server

2. Clearing the buildsMetadata cache via the Admin settings.

3. Disabling and re-enabling the nuget feed in the Admin settings.

4. Deleting ALL history of the builds so that our feed packages have been all removed (no published nuget versions remain)

But the above errors still persist, and no published nuget is showing up in the feed anymore.

It might be worth noting that this is from a .NET Core 2.0 Solution and the csproj that is being packed is referencing .NET Standard 2.0 and .NET Framework 4.5.

How can I fix this?

 

1
4 comments
Avatar
Permanently deleted user

I have tested this by running this Build Step on a different Build Agent which has a lower version of .NET Core (1.1.0). 

On this version, dotnet pack works successfully. 

Apparently, nuget pack won't work for the latest version of .NET Core (2.0)?

I am not sure why this is the case.

0

Hi,

which version of teamcity are you currently using? .net core 2.0 should be supported already (https://github.com/JetBrains/teamcity-dotnet-plugin/issues/42)

0
Avatar
Permanently deleted user

Our Team City version is 2017 (Although the issue happens in both TC10 and 2017 regardless).

After some additional testing, it was revealed that this is a problem with NET Core 2.0 itself (one of the preview versions generates corrupt nupkg files). We are raising a bug with Microsoft.

0

Thanks for the heads up, will notify this as well internally so that our people are aware of it, should the issue show up in our tests.

0

Please sign in to leave a comment.