Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VS2017 GeneratePackageOnBuild produces 1.0.0 package #6972

Open
phatcher opened this issue May 25, 2018 · 3 comments
Open

VS2017 GeneratePackageOnBuild produces 1.0.0 package #6972

phatcher opened this issue May 25, 2018 · 3 comments
Labels
Functionality:Pack Priority:3 Issues under consideration. With enough upvotes, will be reconsidered to be added to the backlog. Status:Excluded from icebox cleanup Status:Inactive Icebox issues not updated for a specific long time

Comments

@phatcher
Copy link

Details about Problem

If I look at the project details it shows the correct versions, but if I compile with VS2017 it always generated a 1.0.0.0 packaged. The assemblies themselves have the correct version info

VS version (if appropriate): VS2017.7.1

Sample Project

See https://github.com/phatcher/CsvReader

@zhili1208
Copy link
Contributor

@rohit21agrawal

@dasMulli
Copy link

dasMulli commented May 26, 2018

quick analysis: The reason is that the project uses custom assembly attributes, has assembly attributes turned off and doesn't set any version-related MSBuild property.

The package targets currently don't read the package version from assembly attributes, so you'd need to set the VersionPrefix / Version or PackageVersion in the csproj file or else they default to 1.0.0.

An alternative workaround would by adding the targets from the answer in https://stackoverflow.com/questions/48065516/build-project-with-multiple-targetframeworks-in-tfs-as-nuget-package (also needs the GenerateNuspecDependsOn property from the question) to the csproj file. (currently only works on visual studio's MSBuild version or upcoming 2.1.300 dotnet CLI)

@dasMulli
Copy link

There has already been a discussion about this over at https://github.com/dotnet/cli/issues/8399

@ghost ghost added the Status:Inactive Icebox issues not updated for a specific long time label Sep 1, 2022
@jeffkl jeffkl added Priority:3 Issues under consideration. With enough upvotes, will be reconsidered to be added to the backlog. and removed Pipeline:Icebox labels Apr 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Functionality:Pack Priority:3 Issues under consideration. With enough upvotes, will be reconsidered to be added to the backlog. Status:Excluded from icebox cleanup Status:Inactive Icebox issues not updated for a specific long time
Projects
None yet
Development

No branches or pull requests

6 participants