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

Use a static verison of nuget.build.tasks.pack, use licenseexpression #2574

Merged
merged 1 commit into from
Jan 7, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .nuget/packages.config
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,6 @@
<package id="MicroBuild.Core" version="0.2.0" targetFramework="net45" />
<package id="NuGetValidator" version="2.0.1" targetFramework="net461" />
<package id="XunitXml.TestLogger" version="2.0.0" />
<package id="NuGet.Build.Tasks.Pack" version="4.9.2" />
<package id="Microsoft.DotNet.Build.Tasks.Feed" version="2.1.0-prerelease-02419-02" /> <!-- For the .NET Core orchestrated build.-->
</packages>
1 change: 1 addition & 0 deletions build/common.project.props
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
<XunitConsoleExePath>$(SolutionPackagesFolder)xunit.runner.console.2.3.1\tools\net452\xunit.console.x86.exe</XunitConsoleExePath>
<ILMergeExePath>$(SolutionPackagesFolder)ILMerge.2.14.1208\tools\ILMerge.exe</ILMergeExePath>
<XunitXmlLoggerDirectory>$(SolutionPackagesFolder)XunitXml.TestLogger.2.0.0\build\_common</XunitXmlLoggerDirectory>
<NuGetBuildTasksPackTargets>$(SolutionPackagesFolder)NuGet.Build.Tasks.Pack.4.9.2\build\NuGet.Build.Tasks.Pack.targets</NuGetBuildTasksPackTargets>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why can't we just use the one from the current build?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Kind of breaks the whole repeatability thing. And it only works with build.ps1, not necessarily if you want to pack individual projects.
It also will have file access issues when you are trying to pack the pack tasks package itself.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not able to follow the repeatability concerns here. What exactly it breaks? why shouldn't this always pack our projects with in-built pack target? It will also add an additional check if our pack target breaks something for normal cases...

Also, not able to see through other concerns, may be it'll be better to talk offline and get clarity.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see the posting on testing "real scenarios".
What are integration tests for then? The pack scenarios for our solution are basic.

Furthermore we are not ready to conform to the changes in the pack targets immediately.
Say for example we were doing this for 4.9.1.
We'd have to suppress the license url warning in all our projects, just to build our packages the way they used to be built.
If we say wanted to build with license expressions or license file we wouldn't have been able to push because the server would not be ready to handle the new feature yet.
It just adds needless complexity in my opinion.

If you run the pack target with the built assemblies, you'd be trying to copy the current running assembly in which you have all the pack logic. That wouldn't work.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Discussed offline, we're good here.

<EnlistmentRoot>$(RepositoryRootDirectory)</EnlistmentRoot>
<EnlistmentRootSrc>$(RepositoryRootDirectory)src</EnlistmentRootSrc>
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">$(RepositoryRootDirectory)</SolutionDir>
Expand Down
4 changes: 4 additions & 0 deletions build/common.targets
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@
<DocumentationFile Condition=" '$(DocumentationFile)' == '' AND '$(GenerateDocumentationFile)' == 'true' AND '$(IsNetCoreProject)' != 'true' ">$(OutputPath)\$(AssemblyName).xml</DocumentationFile>
</PropertyGroup>

<ImportGroup Condition=" '$(PackProject)' == 'true' ">
<Import Project="$(NuGetBuildTasksPackTargets)" />
</ImportGroup>

<!-- Test Projects -->
<ImportGroup Condition=" '$(TestProject)' == 'true' ">
<Import Project="test.targets" />
Expand Down
2 changes: 1 addition & 1 deletion build/config.props
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
<PropertyGroup>
<Authors>Microsoft</Authors>
<PackageProjectUrl>https://aka.ms/nugetprj</PackageProjectUrl>
<PackageLicenseUrl>https://aka.ms/nugetlicense</PackageLicenseUrl>
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
<RepositoryType>git</RepositoryType>
<RepositoryUrl>https://github.com/NuGet/NuGet.Client</RepositoryUrl>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -536,9 +536,6 @@
<SubType>Designer</SubType>
</Content>
</ItemGroup>
<ItemGroup>
<PackageReference Include="NuGet.Build.Tasks.Pack" Version="4.8.0" PrivateAssets="all" />
</ItemGroup>
<PropertyGroup>
<IncludeContentInPack>false</IncludeContentInPack>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,6 @@
<PackageReference Include="VSLangProj110" Version="11.0.61030" />
<PackageReference Include="VSLangProj2" Version="7.0.5000" />
<PackageReference Include="VSLangProj157" Version="15.7.0" />
<PackageReference Include="NuGet.Build.Tasks.Pack" Version="4.8.0" PrivateAssets="all" />
</ItemGroup>
<Import Project="$(BuildCommonDirectory)common.targets" />
<Import Project="$(BuildCommonDirectory)fixinterop.targets" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,9 @@
<PackProject>true</PackProject>
<IncludeInVsix>true</IncludeInVsix>
<authors>Microsoft</authors>
<PackageLicenseUrl>https://aka.ms/nugetlicense</PackageLicenseUrl>
<PackageProjectUrl>https://aka.ms/nugetprj</PackageProjectUrl>
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
<AssemblyDescription>APIs for invoking NuGet Restore Manager in Visual Studio.</AssemblyDescription>
<Description>APIs for invoking NuGet Restore Manager in Visual Studio.</Description>
<copyright>&#169; Microsoft Corporation. All rights reserved.</copyright>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,7 @@
<Guid>228F7591-2777-47D7-B81D-FEADFC71CEB5</Guid>
<ComVisible>false</ComVisible>
<authors>Microsoft</authors>
<PackageLicenseUrl>https://aka.ms/nugetlicense</PackageLicenseUrl>
<PackageProjectUrl>https://aka.ms/nugetprj</PackageProjectUrl>
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
<copyright>&#169; Microsoft Corporation. All rights reserved.</copyright>
</PropertyGroup>

<ItemGroup>
Expand Down