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

Commit 1287448

Browse files
adalonkzu
authored andcommitted
Removed the .targets used for versioning from the project templates #
And also provide default value for PackageVersion in the EditMetadata dialog. NuGet/Home#4728
1 parent 9b24856 commit 1287448

13 files changed

Lines changed: 5 additions & 53 deletions

File tree

src/VisualStudio/NuGet.Packaging.VisualStudio.15/NuGet.Packaging.VisualStudio.15.csproj

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@
5656
<Compile Include="TemplateWizard.cs" />
5757
<None Include="NuGet.Packaging.VisualStudio.15.targets" />
5858
<None Include="Templates\Projects\CSharp\Package-Workaround\Package.nuproj" />
59-
<None Include="Templates\Projects\CSharp\Package-Workaround\Package.targets" />
6059
<None Include="Templates\Projects\PortableClassLibrary\class1.cs" />
6160
<None Include="Templates\Projects\PortableClassLibrary\assemblyinfo.cs" />
6261
<Compile Include="ProjectSystem\ProjectProperties.cs" />
@@ -68,8 +67,6 @@
6867
<Compile Include="ProjectSystem\NuProjValidProjectReferenceChecker.cs" />
6968
<None Include="project.json" />
7069
<None Include="Templates\Projects\Nuget\Package\Package.nuproj" />
71-
<None Include="Templates\Projects\Nuget\Package\Package.targets" />
72-
<None Include="Templates\Projects\PortableClassLibrary\PortableClassLibrary.targets" />
7370
</ItemGroup>
7471
<ItemGroup>
7572
<None Include="app.config" />

src/VisualStudio/NuGet.Packaging.VisualStudio.15/Templates/Projects/CSharp/Package-Workaround/Package.nuproj

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
</ItemGroup>
1515
<PropertyGroup Label="Configuration">
1616
<PackageId>$safeprojectname$</PackageId>
17+
<PackageVersion Condition="'$(PackageVersion)' == ''">1.0.0</PackageVersion>
1718
<Title>$projectname$</Title>
1819
<Authors>$username$</Authors>
1920
<Owners>$username$</Owners>
@@ -28,9 +29,6 @@
2829
<PropertyGroup Label="Globals">
2930
<OutputPath>bin\$(Configuration)\</OutputPath>
3031
</PropertyGroup>
31-
<ItemGroup>
32-
<None Include="$projectname$.targets" />
33-
</ItemGroup>
3432
<ItemGroup>
3533
<None Include="Readme.txt">
3634
<IncludeInPackage>true</IncludeInPackage>
@@ -39,5 +37,4 @@
3937
</ItemGroup>
4038
<Import Project="$(MSBuildToolsPath)\Microsoft.Common.targets" />
4139
<Import Project="$(NuGetAuthoringPath)\NuGet.Packaging.Authoring.targets" Condition="Exists('$(NuGetAuthoringPath)\NuGet.Packaging.Authoring.targets')" />
42-
<Import Project="$projectname$.targets" />
4340
</Project>

src/VisualStudio/NuGet.Packaging.VisualStudio.15/Templates/Projects/CSharp/Package-Workaround/Package.targets

Lines changed: 0 additions & 11 deletions
This file was deleted.

src/VisualStudio/NuGet.Packaging.VisualStudio.15/Templates/Projects/CSharp/Package-Workaround/Package.vstemplate

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
<TemplateContent>
2222
<Project File="Package.nuproj" ReplaceParameters="true">
2323
<ProjectItem ReplaceParameters="true" OpenInEditor="true">Readme.txt</ProjectItem>
24-
<ProjectItem TargetFileName="$projectname$.targets" ReplaceParameters="true">Package.targets</ProjectItem>
2524
</Project>
2625
</TemplateContent>
2726
<WizardExtension>

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

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
</ItemGroup>
1515
<PropertyGroup Label="Configuration">
1616
<PackageId>$safeprojectname$</PackageId>
17+
<PackageVersion Condition="'$(PackageVersion)' == ''">1.0.0</PackageVersion>
1718
<Title>$projectname$</Title>
1819
<Authors>$username$</Authors>
1920
<Owners>$username$</Owners>
@@ -28,9 +29,6 @@
2829
<PropertyGroup Label="Globals">
2930
<OutputPath>bin\$(Configuration)\</OutputPath>
3031
</PropertyGroup>
31-
<ItemGroup>
32-
<None Include="$projectname$.targets" />
33-
</ItemGroup>
3432
<ItemGroup>
3533
<None Include="Readme.txt">
3634
<IncludeInPackage>true</IncludeInPackage>
@@ -39,5 +37,4 @@
3937
</ItemGroup>
4038
<Import Project="$(MSBuildToolsPath)\Microsoft.Common.targets" />
4139
<Import Project="$(NuGetAuthoringPath)\NuGet.Packaging.Authoring.targets" Condition="Exists('$(NuGetAuthoringPath)\NuGet.Packaging.Authoring.targets')" />
42-
<Import Project="$projectname$.targets" />
4340
</Project>

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

Lines changed: 0 additions & 11 deletions
This file was deleted.

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
<TemplateContent>
1919
<Project File="Package.nuproj" ReplaceParameters="true">
2020
<ProjectItem ReplaceParameters="true" OpenInEditor="true">Readme.txt</ProjectItem>
21-
<ProjectItem TargetFileName="$projectname$.targets" ReplaceParameters="true">Package.targets</ProjectItem>
2221
</Project>
2322
</TemplateContent>
2423
<WizardExtension>

src/VisualStudio/NuGet.Packaging.VisualStudio.15/Templates/Projects/PortableClassLibrary/PortableClassLibrary.csproj

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
</PropertyGroup>
3434
<PropertyGroup Label="Configuration">
3535
<PackageId>$safeprojectname$</PackageId>
36+
<PackageVersion Condition="'$(PackageVersion)' == ''" >1.0.0</PackageVersion>
3637
<Title>$projectname$</Title>
3738
<Authors>$username$</Authors>
3839
<Owners>$username$</Owners>
@@ -48,11 +49,7 @@
4849
<Compile Include="Class1.cs" />
4950
<Compile Include="Properties\AssemblyInfo.cs" />
5051
</ItemGroup>
51-
<ItemGroup>
52-
<None Include="$projectname$.targets" />
53-
</ItemGroup>
5452
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\Portable\$(TargetFrameworkVersion)\Microsoft.Portable.CSharp.targets" />
55-
<Import Project="$projectname$.targets" />
5653
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
5754
Other similar extension points exist, see Microsoft.Common.targets.
5855
<Target Name="BeforeBuild">

src/VisualStudio/NuGet.Packaging.VisualStudio.15/Templates/Projects/PortableClassLibrary/PortableClassLibrary.targets

Lines changed: 0 additions & 11 deletions
This file was deleted.

src/VisualStudio/NuGet.Packaging.VisualStudio.15/Templates/Projects/PortableClassLibrary/csPortableClassLibrary.vstemplate

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
<Project File="PortableClassLibrary.csproj" ReplaceParameters="true">
1717
<ProjectItem ReplaceParameters="true" TargetFileName="Properties\AssemblyInfo.cs">AssemblyInfo.cs</ProjectItem>
1818
<ProjectItem ReplaceParameters="true" OpenInEditor="true">Class1.cs</ProjectItem>
19-
<ProjectItem TargetFileName="$projectname$.targets" ReplaceParameters="true">PortableClassLibrary.targets</ProjectItem>
2019
</Project>
2120
</TemplateContent>
2221
<WizardExtension>

0 commit comments

Comments
 (0)