Skip to content

Commit

Permalink
Přesun z Directory.Build.targets na NuGet.targets a jeho použití v (z…
Browse files Browse the repository at this point in the history
…atím jediném) projektu pro opravu restore balíčků WebForms projektů ve VS
  • Loading branch information
jirikanda committed Mar 29, 2019
1 parent 2751083 commit 307ec55
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 40 deletions.
12 changes: 0 additions & 12 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,4 @@
<AssemblyTitle>HAVIT .NET Framework Extensions</AssemblyTitle>
</PropertyGroup>

<!-- NuGet -->
<PropertyGroup>
<Authors>HAVIT</Authors>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageIconUrl>https://www.gravatar.com/avatar/e59ffb10448162f0c6d6b5ae3fecd0ce?s=64</PackageIconUrl>

<!-- Jako default nebudeme dávat content do balíčků (stačí ukliknutí a máme content v nuget balíčku).
V projektech, ve kterých content do nuget balíčku chceme, si jej povolíme. -->
<IncludeContentInPack>false</IncludeContentInPack>
</PropertyGroup>
<!-- /NuGet -->

</Project>
25 changes: 0 additions & 25 deletions Directory.Build.targets

This file was deleted.

2 changes: 1 addition & 1 deletion Havit.Core/Havit.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
</PropertyGroup>

<!-- NuGet -->
<Import Project="../NuGet.targets"/>
<PropertyGroup>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<PackageVersion>2.0.1</PackageVersion>
<Description>HAVIT .NET Framework Extensions - Basic Class Library</Description>
</PropertyGroup>
Expand Down
4 changes: 2 additions & 2 deletions HavitFramework.sln
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "_Solution Items", "_Solutio
ProjectSection(SolutionItems) = preProject
CommonAssemblyInfo.cs = CommonAssemblyInfo.cs
Directory.Build.props = Directory.Build.props
Directory.Build.targets = Directory.Build.targets
NuGet.targets = NuGet.targets
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{345552D1-56B8-41F1-9513-AD2F31D2F985}"
Expand Down Expand Up @@ -224,7 +224,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestConsoleApp", "TestConso
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Havit.Core", "Havit.Core\Havit.Core.csproj", "{9F542D56-262C-4569-96FD-84AD9AA7B381}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Havit.NuGetPackage", "Havit.NuGetPackage\Havit.NuGetPackage.csproj", "{3FDD2013-1F21-4645-90A5-938649958734}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Havit.NuGetPackage", "Havit.NuGetPackage\Havit.NuGetPackage.csproj", "{3FDD2013-1F21-4645-90A5-938649958734}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Havit.Core.Tests", "Havit.Core.Tests\Havit.Core.Tests.csproj", "{48BA6236-3B42-41AB-AC48-7F977E85863E}"
EndProject
Expand Down
39 changes: 39 additions & 0 deletions NuGet.targets
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<Project>

<PropertyGroup>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Authors>HAVIT</Authors>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageIconUrl>https://www.gravatar.com/avatar/e59ffb10448162f0c6d6b5ae3fecd0ce?s=64</PackageIconUrl>

<!-- Jako default nebudeme dávat content do balíèkù (staèí ukliknutí a máme content v nuget balíèku).
V projektech, ve kterých content do nuget balíèku chceme, si jej povolíme. -->
<IncludeContentInPack>false</IncludeContentInPack>
</PropertyGroup>

<!-- SourceLink -->
<PropertyGroup>
<!-- Source: https://github.com/dotnet/sourcelink/#using-sourcelink -->
<!-- Optional: Publish the repository URL in the built .nupkg (in the NuSpec <Repository> element) -->
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<!-- Optional: Embed source files that are not tracked by the source control manager in the PDB -->
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<!-- Optional: Include the PDB in the built .nupkg -->
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
</PropertyGroup>

<ItemGroup>
<!-- Pokud se tento øádek dostane do WebForms projektu, rozbije restorování nuget balíèkù, bohužel nepomáhá ani jedno podmínìní pomocí Condition.
Proto nepoužíváme Directory.Build.targets, který by se automaticky použil pro všechny projekty,
ale do projektù importujeme tento NuGet.targets. -->
<PackageReference Include="Microsoft.SourceLink.Vsts.Git" Version="1.0.0-beta-63127-02" PrivateAssets="All" />
</ItemGroup>

<!-- Publish NuGet -->
<PropertyGroup>
<NuGetPublishFolder Condition="'$(NuGetPublishFolder)' == ''">PublicNuGets</NuGetPublishFolder>
<PackageOutputPath Condition="'$(PublishDirectory)' != ''">$(PublishDirectory)\$(NuGetPublishFolder)</PackageOutputPath>
</PropertyGroup>
<!-- /Publish NuGet -->

</Project>

0 comments on commit 307ec55

Please sign in to comment.