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

Commit 7a4d6e9

Browse files
committed
Update and clean up the authoring template and targets
This makes them more aligned with the SDK style.
1 parent af8d20b commit 7a4d6e9

2 files changed

Lines changed: 19 additions & 18 deletions

File tree

src/VisualStudio/NuGet.Packaging.VisualStudio.15/Templates/Projects/Nuget/Package/Package.nuproj

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,8 @@
22
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
33
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
44
<Import Project="$(NuGetAuthoringPath)\NuGet.Packaging.Authoring.props" Condition="Exists('$(NuGetAuthoringPath)\NuGet.Packaging.Authoring.props')" />
5-
<ItemGroup Label="ProjectConfigurations">
6-
<ProjectConfiguration Include="Debug|AnyCPU">
7-
<Configuration>Debug</Configuration>
8-
<Platform>AnyCPU</Platform>
9-
</ProjectConfiguration>
10-
<ProjectConfiguration Include="Release|AnyCPU">
11-
<Configuration>Release</Configuration>
12-
<Platform>AnyCPU</Platform>
13-
</ProjectConfiguration>
14-
</ItemGroup>
15-
<PropertyGroup Label="Configuration">
5+
6+
<PropertyGroup>
167
<PackageId>$safeprojectname$</PackageId>
178
<PackageVersion Condition="'$(PackageVersion)' == ''">1.0.0</PackageVersion>
189
<Title>$projectname$</Title>
@@ -24,17 +15,29 @@
2415
<PackageProjectUrl></PackageProjectUrl>
2516
<PackageLicenseUrl></PackageLicenseUrl>
2617
<Copyright>Copyright © $username$</Copyright>
27-
<PackageTags>$safeprojectname$</PackageTags>
28-
</PropertyGroup>
29-
<PropertyGroup Label="Globals">
18+
<PackageTags>$safeprojectname$</PackageTags>
19+
20+
<RestoreProjectStyle>PackageReference</RestoreProjectStyle>
21+
<TargetFramework>netstandard1.0</TargetFramework>
22+
<PackageTargetFallback>net11;net20;net35;net40;net403;net45;net451;net452;net46;net461;net462;net47;netcore;netcore45;netcore451;netcore50;win8;win81;win10;sl4;sl5;wp;wp7;wp75;wp8;wp81;wpa81;uap;uap10;netstandard1.0;netstandard1.1;netstandard1.2;netstandard1.3;netstandard1.4;netstandard1.5;netstandard1.6;netstandard2.0;netcoreapp1.0;netcoreapp2.0;monoandroid;monotouch;monomac;xamarinios;xamarinmac;xamarinpsthree;xamarinpsfour;xamarinpsvita;xamarinwatchos;xamarintvos;xamarinxboxthreesixty;xamarinxboxone</PackageTargetFallback>
23+
24+
<Configurations>Debug;Release</Configurations>
25+
<Platforms>AnyCPU</Platforms>
26+
27+
<Configuration Condition="'$(Configuration)' == ''">Debug</Configuration>
3028
<OutputPath>bin\$(Configuration)\</OutputPath>
3129
</PropertyGroup>
30+
31+
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'" />
32+
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|AnyCPU'" />
33+
3234
<ItemGroup>
3335
<None Include="Readme.txt">
3436
<IncludeInPackage>true</IncludeInPackage>
3537
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
3638
</None>
3739
</ItemGroup>
40+
3841
<Import Project="$(MSBuildToolsPath)\Microsoft.Common.targets" />
3942
<Import Project="$(NuGetAuthoringPath)\NuGet.Packaging.Authoring.targets" Condition="Exists('$(NuGetAuthoringPath)\NuGet.Packaging.Authoring.targets')" />
4043
</Project>

src/VisualStudio/NuGet.Packaging.VisualStudio/Targets/NuGet.Packaging.Authoring.targets

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ Copyright (c) .NET Foundation. All rights reserved.
1616
<PropertyGroup>
1717
<ProjectSystemRulesDir Condition="'$(ProjectSystemRulesDir)' == ''">$(MSBuildThisFileDirectory)..\Rules\</ProjectSystemRulesDir>
1818
<RestoreProjectStyle>PackageReference</RestoreProjectStyle>
19-
<TargetFrameworkMoniker>NETFramework,Version=v1.0</TargetFrameworkMoniker>
20-
<PackageTargetFallback>net11;net20;net35;net40;net403;net45;net451;net452;net46;net461;net462;netcore;netcore45;netcore451;netcore50;win8;win81;win10;sl4;sl5;wp;wp7;wp75;wp8;wp81;wpa81;uap;uap10;netstandard1.0;netstandard1.1;netstandard1.2;netstandard1.3;netstandard1.4;netstandard1.5;netstandard1.6;netcoreapp1.0;monoandroid;monotouch;monomac;xamarinios;xamarinmac;xamarinpsthree;xamarinpsfour;xamarinpsvita;xamarinwatchos;xamarintvos;xamarinxboxthreesixty;xamarinxboxone</PackageTargetFallback>
19+
<TargetFramework>netstandard1.0</TargetFramework>
20+
<PackageTargetFallback>net11;net20;net35;net40;net403;net45;net451;net452;net46;net461;net462;netcore;netcore45;netcore451;netcore50;win8;win81;win10;sl4;sl5;wp;wp7;wp75;wp8;wp81;wpa81;uap;uap10;netstandard1.0;netstandard1.1;netstandard1.2;netstandard1.3;netstandard1.4;netstandard1.5;netstandard1.6;netstandard2.0;netcoreapp1.0;netcoreapp2.0;monoandroid;monotouch;monomac;xamarinios;xamarinmac;xamarinpsthree;xamarinpsfour;xamarinpsvita;xamarinwatchos;xamarintvos;xamarinxboxthreesixty;xamarinxboxone</PackageTargetFallback>
2121
</PropertyGroup>
2222

2323
<ItemGroup>
@@ -73,8 +73,6 @@ Copyright (c) .NET Foundation. All rights reserved.
7373
<!-- DependenciesTree capability lights up a Dependencies tree node and it's sub node providers-->
7474
<ProjectCapability Include="DependenciesTree" />
7575

76-
<ProjectCapability Include="ProjectConfigurationsInferredFromUsage" />
77-
7876
<ProjectCapability Include="
7977
AssemblyReferences;
8078
ProjectReferences;

0 commit comments

Comments
 (0)