0
votes

I'am currently to try to create a nuget package in a personnal feed. My build & integration works well, my package is push with a custom build number.

But I have a problem with prelease & release. I have two branches ( Dev & Master) and I want to set my generated nuget package from dev branch as @Prelease

As official documentation mentionned, I have -beta to my custom version but seems to the package is not set to prerelease.

Any idea ?

My Custom version number:

$(MajorVersion).$(MinorVersion).$(BuildID)-beta

EDIT :

I provide a one drive link with Restore, Build, Test, Nuget Pack & Nuget Push logs

EDIT 2:

Here my Nuget Pack configuration

Nuget Pack configuration

Here my Nuget Push configuration

Nuget Pack configuration

Logs

EDIT 3 :

I change my feed and still the issue.

Other strange thing. I'm not able with nuget CLI to add my package with this command after using nuget add sources command.

nuget install Askmethat.Hobbidea.Commons

I have a 404 not found but if I use Visual Studio For Mac, It works... This is giving me crazy because I need to add a nuget.config for each project or class library.

1
How do you check the package whether it is prerelease or not? You can check it in VS (Manage NuGet package=> Check Include prerelease option) or NuGet command: nuget list [package name] -source [xxx] --PreRelease. (Note, I check it on web, botth @prerelease and @release return 0 result)starian chen-MSFT
@starain-MSFT I check on web ( with the tags ) or in Nuget Manager. If i use the nuget command it returns 404OrcusZ
Based on the log, it isn't a Prerelease package. How do you specify the source? (e.g. dotnet add package xxx -s xxx or nuget sources add xxx)starian chen-MSFT
What's the endpoint address like? Is it a v3 endpoint?starian chen-MSFT
What's the result if you push the package to a new feed? What's the result if you push the package on local machine manually, then add it to project?starian chen-MSFT

1 Answers

1
votes

Thank to @starain-MSFT, He oriented me to the right way.

I revolve one part of my problem yesterday to have a unique version in Package manager

I change a little bit the build number format in VSTS :

$(Major).$(Minor).$(Patch)-ci-$(Rev:r)

Major, Minor & Patch are variables created in VSTS.

In my Nuget Pack configuration, I added an additionnal propertie :

NUGET PACK CONF

And in my .csproj, I changed the hardcoded version to :

<PackageVersion>$(Version)</PackageVersion>

The version is correct for my nuget package. This correct to keep version like 3.0.0 available for release but the package still not in prelease.

EDIT :

It's seems to work for prerelease after a quick check in Visual Studio.

So it's resolved