-
Notifications
You must be signed in to change notification settings - Fork 650
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
[Bug] dotnet pack fails on cold build with GitVersion.MsBuild and IsPackable=false #2815
Comments
Seems like you have an idea how to fix this. Pull requests are welcome! 🙏🏼 |
jpeirson
pushed a commit
to jpeirson/GitVersion
that referenced
this issue
May 10, 2022
6 tasks
I've added a PR that fixes this by making |
🎉 This issue has been resolved in version 5.10.3 🎉 Your GitReleaseManager bot 📦🚀 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
dotnet pack
will fail with aDirectoryNotFoundException
when building a project that includes GitVersion.MsBuild and where IsPackable=false.Expected Behavior
dotnet pack
should succeed as if GitVersion.MsBuild was not there.Actual Behavior
dotnet pack
fails because GitVersion does not generate theGitVersionInformation.g.cs
file:Steps to Reproduce
dotnet pack
Context
We are hitting this in a solution which contains a large number of NuGet packages and also includes their test projects, and in which we are importing GitVersion.MsBuild into all in a
Directory.Build.props
file.The good news is I can easily work around this by adding an
IsPackable
check to myInclude
. The ideal path may be to just short-circuit out ifIsPackable
is false, but I don't know how this would affect a project with both NuGet and non-NuGet deployable packages that need versioning.Your Environment
The text was updated successfully, but these errors were encountered: