-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove extra code paths, add tests, update docs
- Loading branch information
1 parent
4209f1f
commit 2a0ed07
Showing
17 changed files
with
386 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
using System; | ||
|
||
namespace ClasslibPackRidSpecificCustom | ||
{ | ||
public class Class1 | ||
{ | ||
} | ||
} |
18 changes: 18 additions & 0 deletions
18
Tests/ClasslibPackNonRidSpecificCustom/ClasslibPackNonRidSpecificCustom.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<Project> | ||
|
||
<Import Project="$(MSBuildThisFileDirectory)..\..\Source\MSBuild.Sdk.Extras\Sdk\Sdk.props" /> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>netstandard2.0</TargetFramework> | ||
<ExtrasIncludeDefaultProjectBuildOutputInPackTarget>IncludeDefaultProjectBuildOutputInPack</ExtrasIncludeDefaultProjectBuildOutputInPackTarget> | ||
</PropertyGroup> | ||
|
||
<Import Project="$(MSBuildThisFileDirectory)..\..\Source\MSBuild.Sdk.Extras\Sdk\Sdk.targets" /> | ||
|
||
<Target Name="GenerateNuspec" DependsOnTargets="ClasslibPackNonRidSpecificGenerateNuspec" /> | ||
|
||
<Target Name="Test" DependsOnTargets="Pack"> | ||
<Error Text="GenerateNuspec must be called" Condition="'$(GenerateNuspecCalled)' != 'true'"/> | ||
</Target> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
using System; | ||
|
||
namespace ClasslibPackRidSpecificDefault | ||
{ | ||
public class Class1 | ||
{ | ||
} | ||
} |
17 changes: 17 additions & 0 deletions
17
Tests/ClasslibPackNonRidSpecificDefault/ClasslibPackNonRidSpecificDefault.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<Project> | ||
|
||
<Import Project="$(MSBuildThisFileDirectory)..\..\Source\MSBuild.Sdk.Extras\Sdk\Sdk.props" /> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>netstandard2.0</TargetFramework> | ||
</PropertyGroup> | ||
|
||
<Import Project="$(MSBuildThisFileDirectory)..\..\Source\MSBuild.Sdk.Extras\Sdk\Sdk.targets" /> | ||
|
||
<Target Name="GenerateNuspec" DependsOnTargets="ClasslibPackNonRidSpecificGenerateNuspec" /> | ||
|
||
<Target Name="Test" DependsOnTargets="Pack"> | ||
<Error Text="GenerateNuspec must be called" Condition="'$(GenerateNuspecCalled)' != 'true'"/> | ||
</Target> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
using System; | ||
|
||
namespace ClasslibPackRidSpecificSkip | ||
{ | ||
public class Class1 | ||
{ | ||
} | ||
} |
18 changes: 18 additions & 0 deletions
18
Tests/ClasslibPackNonRidSpecificSkip/ClasslibPackNonRidSpecificSkip.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<Project> | ||
|
||
<Import Project="$(MSBuildThisFileDirectory)..\..\Source\MSBuild.Sdk.Extras\Sdk\Sdk.props" /> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>netstandard2.0</TargetFramework> | ||
<ExtrasIncludeDefaultProjectBuildOutputInPack>false</ExtrasIncludeDefaultProjectBuildOutputInPack> | ||
</PropertyGroup> | ||
|
||
<Import Project="$(MSBuildThisFileDirectory)..\..\Source\MSBuild.Sdk.Extras\Sdk\Sdk.targets" /> | ||
|
||
<Target Name="GenerateNuspec" DependsOnTargets="ClasslibPackNonRidSpecificGenerateNuspec" /> | ||
|
||
<Target Name="Test" DependsOnTargets="Pack"> | ||
<Error Text="GenerateNuspec must be called" Condition="'$(GenerateNuspecCalled)' != 'true'"/> | ||
</Target> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
using System; | ||
|
||
namespace ClasslibPackRidSpecificCustom | ||
{ | ||
public class Class1 | ||
{ | ||
} | ||
} |
50 changes: 50 additions & 0 deletions
50
Tests/ClasslibPackRidSpecificCustom/ClasslibPackRidSpecificCustom.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
<Project> | ||
|
||
<Import Project="$(MSBuildThisFileDirectory)..\..\Source\MSBuild.Sdk.Extras\Sdk\Sdk.props" /> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>netstandard2.0</TargetFramework> | ||
<RuntimeIdentifiers>win;unix</RuntimeIdentifiers> | ||
<ExtrasBuildEachRuntimeIdentifier>true</ExtrasBuildEachRuntimeIdentifier> | ||
<ExtrasIncludeDefaultProjectBuildOutputInPackTarget>IncludeDefaultProjectBuildOutputInPack</ExtrasIncludeDefaultProjectBuildOutputInPackTarget> | ||
</PropertyGroup> | ||
|
||
<Import Project="$(MSBuildThisFileDirectory)..\..\Source\MSBuild.Sdk.Extras\Sdk\Sdk.targets" /> | ||
|
||
<Target Name="GenerateNuspec" DependsOnTargets="$(GenerateNuspecDependsOn);_CalculateInputsOutputsForPack;_GetProjectReferenceVersions;_InitializeNuspecRepositoryInformationProperties" Condition="$(IsPackable) == 'true'" | ||
Inputs="@(NuGetPackInput)" Outputs="@(NuGetPackOutput)"> | ||
|
||
<PropertyGroup> | ||
<GenerateNuspecCalled>true</GenerateNuspecCalled> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<TestNuGetPackInputOutputAssembly Include="@(NuGetPackInput->WithMetadataValue('BuildAction', 'None')->WithMetadataValue('Pack', 'true')->HasMetadata('PackagePath')->WithMetadataValue('Filename', '$(MSBuildProjectName)')->WithMetadataValue('Extension', '.dll'))" /> | ||
<TestNuGetPackInputOutputSymbols Include="@(NuGetPackInput->WithMetadataValue('BuildAction', 'None')->WithMetadataValue('Pack', 'true')->HasMetadata('PackagePath')->WithMetadataValue('Filename', '$(MSBuildProjectName)')->WithMetadataValue('Extension', '.pdb'))" /> | ||
<TestPackageFilesOutputAssembly Include="@(_PackageFiles->WithMetadataValue('BuildAction', 'None')->WithMetadataValue('Pack', 'true')->HasMetadata('PackagePath')->WithMetadataValue('Filename', '$(MSBuildProjectName)')->WithMetadataValue('Extension', '.dll'))" /> | ||
<TestPackageFilesOutputSymbols Include="@(_PackageFiles->WithMetadataValue('BuildAction', 'None')->WithMetadataValue('Pack', 'true')->HasMetadata('PackagePath')->WithMetadataValue('Filename', '$(MSBuildProjectName)')->WithMetadataValue('Extension', '.pdb'))" /> | ||
</ItemGroup> | ||
|
||
<Error Text="NuGetPackInput must contain the output DLLs" Condition="'@(TestNuGetPackInputOutputAssembly->Count())' != '2'" /> | ||
<Error Text="NuGetPackInput must contain output PDBs" Condition="'@(TestNuGetPackInputOutputSymbols->Count())' != '2'" /> | ||
<Error Text="NuGetPackInput must contain output DLL for win RID" Condition="'@(TestNuGetPackInputOutputAssembly->WithMetadataValue('PackagePath', 'tools/netstandard2.0/win')->Count())' != '1'" /> | ||
<Error Text="NuGetPackInput must contain output PDB for win RID" Condition="'@(TestNuGetPackInputOutputSymbols->WithMetadataValue('PackagePath', 'tools/netstandard2.0/win')->Count())' != '1'" /> | ||
<Error Text="NuGetPackInput must contain output DLL for unix RID" Condition="'@(TestNuGetPackInputOutputAssembly->WithMetadataValue('PackagePath', 'tools/netstandard2.0/unix')->Count())' != '1'" /> | ||
<Error Text="NuGetPackInput must contain output PDB for unix RID" Condition="'@(TestNuGetPackInputOutputSymbols->WithMetadataValue('PackagePath', 'tools/netstandard2.0/unix')->Count())' != '1'" /> | ||
<Error Text="BuildOutputInPackage must be empty" Condition="'@(_BuildOutputInPackage->Count())' != '0'" /> | ||
<Error Text="TargetPathsToSymbols must be empty" Condition="'@(_TargetPathsToSymbols->Count())' != '0'" /> | ||
<Error Text="_PackageFiles must contain exactly 2×2 items" Condition="'@(_PackageFiles->Count())' != '4'" /> | ||
<Error Text="_PackageFiles must contain the output DLLs" Condition="'@(TestPackageFilesOutputAssembly->Count())' != '2'" /> | ||
<Error Text="_PackageFiles must contain output PDBs" Condition="'@(TestPackageFilesOutputSymbols->Count())' != '2'" /> | ||
<Error Text="_PackageFiles must contain output DLL for win RID" Condition="'@(TestPackageFilesOutputAssembly->WithMetadataValue('PackagePath', 'tools/netstandard2.0/win')->Count())' != '1'" /> | ||
<Error Text="_PackageFiles must contain output PDB for win RID" Condition="'@(TestPackageFilesOutputSymbols->WithMetadataValue('PackagePath', 'tools/netstandard2.0/win')->Count())' != '1'" /> | ||
<Error Text="_PackageFiles must contain output DLL for unix RID" Condition="'@(TestPackageFilesOutputAssembly->WithMetadataValue('PackagePath', 'tools/netstandard2.0/unix')->Count())' != '1'" /> | ||
<Error Text="_PackageFiles must contain output PDB for unix RID" Condition="'@(TestPackageFilesOutputSymbols->WithMetadataValue('PackagePath', 'tools/netstandard2.0/unix')->Count())' != '1'" /> | ||
|
||
</Target> | ||
|
||
<Target Name="Test" DependsOnTargets="Pack"> | ||
<Error Text="GenerateNuspec must be called" Condition="'$(GenerateNuspecCalled)' != 'true'"/> | ||
</Target> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
using System; | ||
|
||
namespace ClasslibPackRidSpecificDefault | ||
{ | ||
public class Class1 | ||
{ | ||
} | ||
} |
Oops, something went wrong.