Skip to content

Commit a646c2d

Browse files
committed
Create coverlet.msbuild.nupkg on build
1 parent a50c10a commit a646c2d

File tree

4 files changed

+49
-30
lines changed

4 files changed

+49
-30
lines changed

build.proj

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
22

33
<PropertyGroup>
4-
<NuspecFile>$(MSBuildThisFileDirectory)coverlet.msbuild.nuspec</NuspecFile>
54
<Configuration Condition="$(Configuration) == ''">Debug</Configuration>
65
<OutputPath>$(MSBuildThisFileDirectory)build\$(Configuration)</OutputPath>
76
</PropertyGroup>
@@ -13,7 +12,7 @@
1312
</Target>
1413

1514
<Target Name="PublishMSBuildTaskProject" AfterTargets="BuildAllProjects">
16-
<Exec Command="dotnet publish &quot;$(MSBuildThisFileDirectory)src\coverlet.msbuild.tasks\coverlet.msbuild.tasks.csproj&quot; -c $(Configuration) -o &quot;$(OutputPath)&quot;" />
15+
<Exec Command="dotnet publish &quot;$(MSBuildThisFileDirectory)src\coverlet.msbuild.tasks\coverlet.msbuild.tasks.csproj&quot; -c $(Configuration) -o &quot;$(OutputPath)\netcoreapp2.0&quot;" />
1716
</Target>
1817

1918
<Target Name="CopyMSBuildScripts" AfterTargets="PublishMSBuildTaskProject">
@@ -29,7 +28,6 @@
2928
</Target>
3029

3130
<Target Name="CreateNuGetPackage" AfterTargets="RunTests" Condition="$(Configuration) == 'Release'">
32-
<Exec Command="dotnet pack &quot;$(MSBuildThisFileDirectory)src\coverlet.msbuild.tasks\coverlet.msbuild.tasks.csproj&quot; -c $(Configuration) -o $(OutputPath) /p:NuspecFile=$(NuspecFile)" />
3331
<Exec Command="dotnet pack &quot;$(MSBuildThisFileDirectory)src\coverlet.console\coverlet.console.csproj&quot; -c $(Configuration) -o $(OutputPath)" />
3432
</Target>
3533

coverlet.msbuild.nuspec

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

src/coverlet.msbuild.tasks/coverlet.msbuild.tasks.csproj

Lines changed: 46 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,31 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
1+
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
44
<OutputType>Library</OutputType>
55
<TargetFramework>netcoreapp2.0</TargetFramework>
66
<AssemblyVersion>2.4.0</AssemblyVersion>
7+
8+
<PackageId>coverlet.msbuild</PackageId>
9+
<PackageVersion>2.5.0</PackageVersion>
10+
<Title>coverlet.msbuild</Title>
11+
<Authors>tonerdo</Authors>
12+
<PackageLicenseUrl>https://github.com/tonerdo/coverlet/blob/master/LICENSE</PackageLicenseUrl>
13+
<PackageProjectUrl>http://github.com/tonerdo/coverlet</PackageProjectUrl>
14+
<PackageIconUrl>https://nuget.org/Content/gallery/img/default-package-icon.svg</PackageIconUrl>
15+
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
16+
<DevelopmentDependency>true</DevelopmentDependency>
17+
<Description>Coverlet is a cross platform code coverage library for .NET Core, with support for line, branch and method coverage.</Description>
18+
<PackageTags>coverage testing unit-test lcov opencover quality</PackageTags>
19+
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
20+
<ContentTargetFolders>build</ContentTargetFolders>
21+
22+
<!-- Build tasks should not be added to the lib folder. -->
23+
<IncludeBuildOutput>false</IncludeBuildOutput>
24+
<IncludeSymbols>true</IncludeSymbols>
25+
<IncludeSources>true</IncludeSources>
26+
27+
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
28+
<TargetsForTfmSpecificContentInPackage>$(TargetsForTfmSpecificContentInPackage);PackBuildOutputs</TargetsForTfmSpecificContentInPackage>
729
</PropertyGroup>
830

931
<ItemGroup>
@@ -15,4 +37,27 @@
1537
<ProjectReference Include="$(MSBuildThisFileDirectory)..\coverlet.core\coverlet.core.csproj" />
1638
</ItemGroup>
1739

40+
<ItemGroup>
41+
<None Include="..\coverlet.msbuild\coverlet.msbuild.props">
42+
<Link>build\coverlet.msbuild.props</Link>
43+
<Pack>true</Pack>
44+
</None>
45+
<Content Include="..\coverlet.msbuild\coverlet.msbuild.targets">
46+
<Link>build\coverlet.msbuild.targets</Link>
47+
</Content>
48+
</ItemGroup>
49+
50+
<Target Name="PackBuildOutputs" DependsOnTargets="ResolveProjectReferences;SatelliteDllsProjectOutputGroup;DebugSymbolsProjectOutputGroup;SatelliteDllsProjectOutputGroupDependencies;ResolveAssemblyReferences">
51+
<ItemGroup>
52+
<TfmSpecificPackageFile Include="$(TargetPath)" PackagePath="build\$(TargetFramework)\" />
53+
<TfmSpecificPackageFile Include="$(DepsFilePath)" PackagePath="build\$(TargetFramework)\" />
54+
<TfmSpecificPackageFile Include="@(DebugSymbolsProjectOutputGroupOutput)" PackagePath="build\$(TargetFramework)\" />
55+
<!--<TfmSpecificPackageFile Include="@(SatelliteDllsProjectOutputGroupDependency)" PackagePath="build\$(TargetFramework)\%(SatelliteDllsProjectOutputGroupDependency.DestinationSubDirectory)" />-->
56+
<!--<TfmSpecificPackageFile Include="@(SatelliteDllsProjectOutputGroupOutput->'%(FinalOutputPath)')" PackagePath="build\$(TargetFramework)\%(SatelliteDllsProjectOutputGroupOutput.Culture)\" />-->
57+
<TfmSpecificPackageFile Include="%(_ResolvedProjectReferencePaths.Identity)" PackagePath="build\$(TargetFramework)\" />
58+
59+
<TfmSpecificPackageFile Include="@(ReferenceCopyLocalPaths)" Exclude="@(_ResolvedProjectReferencePaths)" PackagePath="build\$(TargetFramework)\%(ReferenceCopyLocalPaths.DestinationSubPath)" />
60+
</ItemGroup>
61+
</Target>
62+
1863
</Project>

src/coverlet.msbuild/coverlet.msbuild.targets

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
22

3-
<UsingTask TaskName="Coverlet.MSbuild.Tasks.InstrumentationTask" AssemblyFile="$(MSBuildThisFileDirectory)coverlet.msbuild.tasks.dll"/>
4-
<UsingTask TaskName="Coverlet.MSbuild.Tasks.CoverageResultTask" AssemblyFile="$(MSBuildThisFileDirectory)coverlet.msbuild.tasks.dll"/>
3+
<UsingTask TaskName="Coverlet.MSbuild.Tasks.InstrumentationTask" AssemblyFile="$(MSBuildThisFileDirectory)netcoreapp2.0\coverlet.msbuild.tasks.dll"/>
4+
<UsingTask TaskName="Coverlet.MSbuild.Tasks.CoverageResultTask" AssemblyFile="$(MSBuildThisFileDirectory)netcoreapp2.0\coverlet.msbuild.tasks.dll"/>
55

66
<Target Name="InstrumentModulesNoBuild" BeforeTargets="VSTest">
77
<Coverlet.MSbuild.Tasks.InstrumentationTask

0 commit comments

Comments
 (0)