Struggling with 'dotnet pack" and loading 'directory.build.props' #26272
-
Greetings, I hope that you are feeling well. Well, I’m struggling within “Github Actions”, 😛 . I have a dotnet library solution, and I expect to end up with a versioned nuget package to push to nuget.org. Simple right?! 😛 Actually, not really. I’m going to focus on the “dotnet pack” challenge. There are two challenges :slight_smile: I use directory.build.props to define a set of properties that “dotnet pack” will use to generate a versioned nuget package, with the most common fields filled. If a do a
on my windows and ubuntu command line, it works as expected. However on Giihub.com The package is generated but without the version suffix. This is my first issue. It works, but I rather don’t have it. That was the purpose of the directory.build.props. My second issue, the package generated doesn’t have the properties defined on directory.build.props. When the expectation was this: As a “workaround,” I moved all parameters to csproj. It works, but I rather don’t have it. That was the purpose of the directory.build.props. Does anyone have a similar issue? Am I doing something wrong with my Github actions? BTW, and it is my fault, I should confirm the package first: I appreciate all the constructive comments |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi. I figure out the issue. :slight_smile: The problem is related to the name file, which is all lower case. The file is named " directory.build.props" when it should be named “** Directory.Build.props**”. For future reference: It post may be closed. 😛 |
Beta Was this translation helpful? Give feedback.
Hi.
I figure out the issue. :slight_smile:
The problem is related to the name file, which is all lower case. The file is named " directory.build.props" when it should be named “** Directory.Build.props**”.
For future reference:
Customize your build - MSBuild | Microsoft Docs
It post may be closed. 😛