Skip to content
This repository has been archived by the owner on Jan 12, 2024. It is now read-only.

Commit

Permalink
Migrate to PackageReference to improve build, cleanup and fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
kzu committed Jun 9, 2017
1 parent 7838a0a commit 0f8fa8f
Show file tree
Hide file tree
Showing 23 changed files with 110 additions and 371 deletions.
4 changes: 2 additions & 2 deletions build.proj
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<RunCodeAnalysis Condition=" '$(RunCodeAnalysis)' == ''">false</RunCodeAnalysis>
<IntermediateOutputPath>.nuget\</IntermediateOutputPath>
<PackagesPath>$(IntermediateOutputPath)packages</PackagesPath>
<CommonBuildProperties>WarningLevel=0;NoWarn=1591;Out=$(Out);Configuration=$(Configuration);RunCodeAnalysis=$(RunCodeAnalysis);PackageOutputPath=$(Out)</CommonBuildProperties>
<CommonBuildProperties>WarningLevel=0;NoWarn=1591;Out=$(Out);Configuration=$(Configuration);RunCodeAnalysis=$(RunCodeAnalysis);PackageOutputPath=$(Out);NuGetBuildTasksPackTargets=NO-SDK-PACK</CommonBuildProperties>
<DefaultImportance Condition=" '$(DefaultImportance)' == '' ">high</DefaultImportance>
<PS>%WINDIR%\System32\WindowsPowerShell\v1.0\powershell.exe</PS>
</PropertyGroup>
Expand Down Expand Up @@ -75,12 +75,12 @@

<Target Name="Restore">
<ItemGroup>
<NuGetRestore Include="external\ApiIntersect\ApiIntersect.sln" />
<NuGetRestore Include="src\Build\NuGet.Build.Packaging.Tests\Scenarios\given_a_library_with_non_nugetized_reference\b.sln" />
<NuGetRestore Include="src\Build\NuGet.Build.Packaging.Tests\Scenarios\given_a_multi_platform_solution\forms.sln" />
<NuGetRestore Include="src\Build\NuGet.Build.Packaging.Tests\Scenarios\given_a_library_with_json_dependencies\project.json" />
<MSBuildRestore Include="src\Build\NuGet.Build.Packaging.Tests\Scenarios\given_a_packaging_project_with_netstandard\a.nuproj" />

<MSBuildRestore Include="external\ApiIntersect\ApiIntersect.sln" />
<MSBuildRestore Include="src\Build\NuGet.Build.Packaging.sln" />
<MSBuildRestore Include="src\VisualStudio\NuGet.Packaging.VisualStudio.sln" />
</ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion external/ApiIntersect
5 changes: 5 additions & 0 deletions src/Build/NuGet.Build.Packaging.Tasks.Shared.targets
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,10 @@
<PackageProjectUrl>https://github.com/NuGet/NuGet.Build.Packaging</PackageProjectUrl>
</PropertyGroup>

<PropertyGroup>
<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
<NuGetPackagingTargetsImported>true</NuGetPackagingTargetsImported>
</PropertyGroup>

<Import Project="PackageVersion.targets" Condition="$(PackageVersionImported) != 'true'" />
</Project>

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,19 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" DefaultTargets="Build">
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), NuGet.Build.Packaging.Shared.props))\NuGet.Build.Packaging.Shared.props" />
<PropertyGroup>
<ProjectGuid>{A3D231D7-31E4-4A70-8CD1-7246C7D069F6}</ProjectGuid>
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
<TargetFramework>net46</TargetFramework>
<NuGetBuildTasksPackTargets>NO-SDK-PACK</NuGetBuildTasksPackTargets>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="GitInfo" Version="1.1.61" PrivateAssets="all" />
<PackageReference Include="ILRepack" Version="2.0.13" PrivateAssets="all" />
<PackageReference Include="netfx-System.StringResources" Version="3.0.14" PrivateAssets="all" />
<PackageReference Include="netfx-System.StringResources" Version="3.1.5" PrivateAssets="all" />
<PackageReference Include="Microsoft.Build" Version="14.3.0" PrivateAssets="all" />
<PackageReference Include="Microsoft.Build.Tasks.Core" Version="14.3.0" PrivateAssets="all" />
<PackageReference Include="MSBuilder.ThisAssembly.Project" Version="0.3.3" PrivateAssets="all" />
Expand All @@ -23,55 +18,29 @@
<PackageReference Include="NuGet.ProjectManagement" Version="4.0.0" PrivateAssets="all" />
</ItemGroup>
<ItemGroup>
<Content Include="NuGet.Build.Packaging.props" />
<Content Include="NuGet.Build.Packaging.targets" />
<Content Include="NuGet.Build.Packaging.CrossTargeting.targets" />
<Content Include="MSBuild\Imports\Microsoft.Common.Props\ImportBefore\Microsoft.NuGet.Packaging.ImportBefore.props" />
<Content Include="MSBuild\Microsoft.Common.Targets\ImportAfter\Microsoft.NuGet.Packaging.ImportAfter.targets" />
<Content Include="NuGet.Build.Packaging.Authoring.targets" />
<Content Include="NuGet.Build.Packaging.Compatibility.props" />
<Content Include="NuGet.Build.Packaging.ReferenceAssembly.targets" />
<Content Include="NuGet.Build.Packaging.Legacy.targets" />
<Content Include="NuGet.Build.Packaging.Inference.targets" />
<Content Include="NuGet.Build.Packaging.Authoring.props" />
<Content Include="GenerateReferenceAssembly.csproj" />
<Content Include="NuGet.Build.Packaging.Legacy.props" />
<Content Include="NuGet.Build.Packaging.Version.props" />
<None Remove="**\*.props;**\*.targets" />
<None Include="NuGet.Build.Packaging.Tasks.targets" />
<Content Include="**\*.props;**\*.targets" Exclude="obj\**\*.*;bin\**\*.*;NuGet.Build.Packaging.Tasks.targets">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Update="Properties\Resources.resx">
<Generator>PublicResXFileCodeGenerator</Generator>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\external\ApiIntersect\ApiIntersect\ApiIntersect.csproj">
<SkipGetTargetFrameworkProperties>true</SkipGetTargetFrameworkProperties>
<AdditionalProperties>PrimaryOutputKind=build</AdditionalProperties>
<Project>{cd767d93-6c99-4d6a-a303-3c139a73400e}</Project>
<Name>ApiIntersect</Name>
<IncludeInPackage>false</IncludeInPackage>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>PublicResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<Compile Include="..\..\GlobalAssemblyInfo.cs">
<Link>GlobalAssemblyInfo.cs</Link>
</Compile>
<Compile Include="ApiIntersect.cs" />
<Compile Include="AssignPackagePath.cs" />
<Compile Include="CreatePackage.cs" />
<Compile Include="Extensions.cs" />
<Compile Include="GenerateAssemblyInfo.cs" />
<Compile Include="GetApiIntersectTargetPaths.cs" />
<Compile Include="MetadataName.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<Compile Include="ReadLegacyConfigDependencies.cs" />
<Compile Include="ReadLegacyJsonDependencies.cs" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), NuGet.Build.Packaging.Tasks.Shared.targets))\NuGet.Build.Packaging.Tasks.Shared.targets" />
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,11 @@
</ItemDefinitionGroup>

<PropertyGroup>
<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>

<PackageId>NuGet.Build.Packaging</PackageId>
<Title>NuGetizer-3000</Title>
<Description>NuGet Packaging Targets</Description>
<Description>NuGetizer-3000</Description>
<IsDevelopmentDependency>true</IsDevelopmentDependency>
<PrimaryOutputKind>build</PrimaryOutputKind>

Expand All @@ -27,12 +29,6 @@

<Target Name="AddBuiltOutput" BeforeTargets="GetPackageContents" DependsOnTargets="AllProjectOutputGroups" Returns="@(PackageFile)">
<ItemGroup>
<PackageFile Include="$(OutputPath)ApiIntersect.exe">
<PackagePath>build\ApiIntersect.exe</PackagePath>
</PackageFile>
<PackageFile Include="$(OutputPath)ApiIntersect.exe.config">
<PackagePath>build\ApiIntersect.exe.config</PackagePath>
</PackageFile>
<PackageFile Include="$(OutputPath)ICSharpCode.Decompiler.dll">
<PackagePath>build\ICSharpCode.Decompiler.dll</PackagePath>
</PackageFile>
Expand Down
Loading

0 comments on commit 0f8fa8f

Please sign in to comment.