Skip to content
Open
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
5 changes: 2 additions & 3 deletions src/NuGetizer.Tasks/NuGetizer.Tasks.Pack.targets
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@
<!-- GeneratePackageOnBuild=false is used by VS when right-click Pack is used :) -->
<Target Name="Pack" Condition="'$(GeneratePackageOnBuild)' == 'false' AND '$(NuGetize)' != 'true'" Returns="@(PackOutput)">
<!-- Typically called in the IDE when we run Pack context menu. -->
<MSBuild Projects="$(MSBuildProjectFullPath)" UnloadProjectsOnCompletion="true" UseResultsCache="false"
Properties="NuGetize=true" Targets="Pack">
<Output TaskParameter="TargetOutputs" ItemName="PackOutput"/>
<MSBuild Projects="$(MSBuildProjectFullPath)" UnloadProjectsOnCompletion="true" UseResultsCache="false" Properties="NuGetize=true" Targets="Pack">
<Output TaskParameter="TargetOutputs" ItemName="PackOutput" />
</MSBuild>
</Target>

Expand Down
4 changes: 2 additions & 2 deletions src/NuGetizer.Tasks/NuGetizer.Tasks.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
<PackageReference Include="Microsoft.Build.Tasks.Core" Version="16.11.6" PrivateAssets="all" />
<PackageReference Include="NuGet.Packaging" Version="6.12.1" PrivateAssets="all" />
<PackageReference Include="PolySharp" Version="1.15.0" PrivateAssets="all" />
<PackageReference Include="ThisAssembly.Project" Version="1.5.0" PrivateAssets="all" />
<PackageReference Include="ThisAssembly.Strings" Version="1.5.0" PrivateAssets="all" />
<PackageReference Include="ThisAssembly.Project" Version="2.0.14" PrivateAssets="all" />
<PackageReference Include="ThisAssembly.Strings" Version="2.0.14" PrivateAssets="all" />
<PackageReference Include="Minimatch" Version="2.0.0" PrivateAssets="all" />
</ItemGroup>

Expand Down
27 changes: 6 additions & 21 deletions src/NuGetizer.Tasks/NuGetizer.Tasks.targets
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,7 @@
<PropertyGroup>
<XmlNs>&lt;Namespace Prefix='msb' Uri='http://schemas.microsoft.com/developer/msbuild/2003'/&gt;</XmlNs>
</PropertyGroup>
<XmlPoke Namespaces="$(XmlNs)"
XmlInputPath="$(OutputPath)NuGetizer.Version.props"
Query="/msb:Project/msb:PropertyGroup/msb:PackVersion"
Value="$(Version)"/>
<XmlPoke Namespaces="$(XmlNs)" XmlInputPath="$(OutputPath)NuGetizer.Version.props" Query="/msb:Project/msb:PropertyGroup/msb:PackVersion" Value="$(Version)" />
</Target>

<PropertyGroup>
Expand All @@ -61,23 +58,11 @@
<Output ItemName="_PackFolderKind" TaskParameter="TargetOutputs" />
</MSBuild>

<WriteLinesToFile Lines='
namespace $(RootNamespace)
{
/// &lt;summary&gt;Known PackFolder metadata values for PackageFile and _PackageContent items&lt;/summary&gt;
public static partial class PackFolderKind
{
' Overwrite='true' File='$(PackFolderKindFile)' />

<WriteLinesToFile Lines='
/// &lt;summary&gt;PackageFolder: $([MSBuild]::ValueOrDefault(%(PackageFolder), %(Identity)))&lt;/summary&gt;
public const string %(_PackFolderKind.Identity) = "$([MSBuild]::ValueOrDefault(%(PackageFolder), %(Identity)))"%3B
' Overwrite='false' File='$(PackFolderKindFile)' />

<WriteLinesToFile Lines='
}
}
' Overwrite='false' File='$(PackFolderKindFile)' />
<WriteLinesToFile Lines=" namespace $(RootNamespace) { /// &lt;summary&gt;Known PackFolder metadata values for PackageFile and _PackageContent items&lt;/summary&gt; public static partial class PackFolderKind { " Overwrite="true" File="$(PackFolderKindFile)" />

<WriteLinesToFile Lines=" /// &lt;summary&gt;PackageFolder: $([MSBuild]::ValueOrDefault(%(PackageFolder), %(Identity)))&lt;/summary&gt; public const string %(_PackFolderKind.Identity) = &quot;$([MSBuild]::ValueOrDefault(%(PackageFolder), %(Identity)))&quot;%3B " Overwrite="false" File="$(PackFolderKindFile)" />

<WriteLinesToFile Lines=" } } " Overwrite="false" File="$(PackFolderKindFile)" />

<ItemGroup>
<FileWrites Include="$(PackFolderKindFile)" />
Expand Down
Loading