-
Notifications
You must be signed in to change notification settings - Fork 934
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
Use MsBuild for packing .nupkg files #1404
Conversation
src/NHibernate/NHibernate.csproj
Outdated
<PropertyGroup> | ||
<Description>An object persistence library for relational databases.</Description> | ||
<Description>NHibernate is a mature, open source object-relational mapper for the .NET framework. It is actively developed, fully featured and used in thousands of successful projects.</Description> | ||
<PackageTags>ORM; O/RM; DataBase; DAL; ObjectRelationalMapping; NHibernate; ADO.Net; Core</PackageTags> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tags are space separated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://docs.microsoft.com/en-us/dotnet/core/tools/csproj#packagetags In the resulting .nuspec
file, they are space separated.
<PackageReference Include="iesi.collections" Version="4.0.2" /> | ||
<PackageReference Include="Remotion.Linq" Version="2.1.2" /> | ||
<PackageReference Include="Remotion.Linq.EagerFetching" Version="2.1.0" /> | ||
<PackageReference Include="Antlr3.Runtime" Version="[3.5.1, 4.0)" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I doubt there will be v4 of Antlr3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excluding v4 was how the previous .nuspec
had it. It doesn't hurt to keep it.
Can you please drop d55ffdf out of this PR? |
Do you want it as a separate pull request? Is there a reason for leaving it? |
c66adc2
to
8e49199
Compare
src/NHibernate/NHibernate.csproj
Outdated
<PropertyGroup> | ||
<Description>An object persistence library for relational databases.</Description> | ||
<Description>NHibernate is a mature, open source object-relational mapper for the .NET framework. It is actively developed, fully featured and used in thousands of successful projects.</Description> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please put this into <PackageDescription>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hazzik what are you referencing? <Description>
is what Visual Studio fills out based on the project package property page, and what is documented here: https://docs.microsoft.com/en-us/dotnet/core/tools/csproj#description
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't care about this documentation. I'm talking about this one: https://github.com/NuGet/NuGet.Client/blob/dev/src/NuGet.Core/NuGet.Build.Tasks.Pack/Pack.targets#L28 (it was hard to find this file)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree that the naming of properties intended to be set in .csproj
for generating .nuget
packages are not altogether consistent, but they do work as documented.
If you set the description in <PackageDescription>
, it may override that pack.targets property, but it no longer shows up in Visual Studio's project property page for the Package description, so <PackageDescription>
clearly is not the property that is intended to be set in the .csproj
file. The line you reference is by default set by $(Description)
, which we were already setting in the .csproj
. I just adjusted the text so the output .nuspec
matches the old templated one.
If you compile and compare the extracted .nuget
packages, it all works fine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The problem that Description
also meant to set AssemblyDescriptionAttribute
. The PackageDescription
is what transferred into the PackTask
(L211). So, it is a correct way to set the separate descriptions for a package and an assembly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok... but where does that ever show up in normal use? It doesn't show up in the NHibernate.dll
file Properties dialog (from File Explorer).
Is there a problem if the text on AssemblyDescriptionAttribute
does match the NuGet package description?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not saying that they don't collide; obviously they do. I was asking why it matters? Also, the NuGet/NuGet.Client#1648 pull request was only 2 months ago, so it wasn't included in the .net core sdk 2.0.0 release. On my computer, the file at: C:\Program Files\dotnet\sdk\2.0.0\Sdks\NuGet.Build.Tasks.Pack\build\NuGet.Build.Tasks.Pack.targets
doesn't have <PackageDescription>
and instead relies on <Description>
:
<Description Condition="'$(Description)'==''">Package Description</Description>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's in 2.0.2 / VS 2017.4
There are a lot of changes not related to the topic of the PR |
build-common/NHibernate.props
Outdated
@@ -12,5 +12,17 @@ | |||
<Product>NHibernate</Product> | |||
<Company>NHibernate.info</Company> | |||
<Copyright>Licensed under LGPL.</Copyright> | |||
<Authors>NHibernate community, Hibernate community</Authors> | |||
<Company>NHibernate.info</Company> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Already here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed duplicate property.
8e49199
to
9233b60
Compare
b68ecf7
to
a18c2e5
Compare
I've removed unrelated changes |
I think my changes were better. Now with the |
But this is only in release configuration. Do you often build that? |
No, I suppose I don't build release in visual studio often. Too many common items such as PackageProjectUrl, PackageIconUrl, PackageRequireLicenseAcceptance, and PackageLicenseUrl moved out of the common |
8393a3c
to
25642d3
Compare
25642d3
to
e7a5979
Compare
After force pushing on top of each other... the current version (e7a5979) is probably the best it's been. Thanks for the feedback. |
Thanks |
Use
dotnet msbuild
tasks to pack NuGet.nupkg
files. Done as part of the primary build in the current NAnt scripts.README.md
file isn't transformed to.html
for the.nupkg
file, but is copied as is. I doubt many people need it there when they should refer to the most recent version on github.Removed the unused and broken NHibernate.Setup WiX project.