0
votes

Question 1: I'm using VSTS internal nuget server, I have some problem while playing with it.

Now I have a build definition publishing to VSTS internal package server as below, where I set --version-suffix as build number

enter image description here

After build and publish package per VSTS build, the new packages with suffix should all have been successfully pushed to the server - at least from the log,enter image description here

Yet don’t know why, none of them were reflected correctly in the package list, only Common.Test which I removed before the build,enter image description here

Question 2: How in the setting I can ignore *.test.csproj for “dotnet pack”?

Question 3: We’re using internal package server, now the interesting thing is, I cannot find a way with “dotnet restore” to get from any nuget config, or internal nuget feed, when this supports internal nuget server/nuget.config as “nuget restore”?

enter image description here

1
dotnet pack command is used for pack .csproj into a nuget package docs.microsoft.com/en-us/dotnet/core/tools/dotnet-pack. But it seems your donet core is based on VS2015 with .xproj. So please convert it to VS2017 at first.Marina Liu
@Marina-MSFT it's buit on VS2017 latest update using .net core 1.1Elaine
What's the result if you specify *.csproj in dotnet pack?Marina Liu
@Marina-MSFT from the log, I thought the packages were generated, and pushed, right? I just tried, same log.Elaine
Yes, they were generated and pushed. But it's wired since you set dotnet pack *.sln. Did you use other steps to generate .nupkg except the task you showed in screen shot?Marina Liu

1 Answers

1
votes

The reason why interal package server don’t show the nuget package with version suffix is that the nuget version 1.0.0 already exist before you pack .nupkg files with --version-suffix v$(build.buildnumber) argument and nuget treat 1.0.0 version is newer than 1.0.0-v$(build.buildnumber) . You can find your pushed versions by click dropdown list. enter image description here

If you want to ignore some .csproj to generate .nupkg, you can set in dotnet pack. You can ignore *Test.csproj in dotnet pack with two line as below picture:

enter image description here