Use dotnet pack to pack AspNetCore file

This commit is contained in:
Pranav K 2017-07-17 11:19:09 -07:00
parent afba2d05ae
commit 4d35489e85
3 changed files with 16 additions and 4 deletions

View File

@ -8,7 +8,6 @@
<ItemGroup> <ItemGroup>
<PackageReference Include="PackagePublisher" Version="2.0.0-*" /> <PackageReference Include="PackagePublisher" Version="2.0.0-*" />
<PackageReference Include="NuGet.CommandLine" Version="$(NuGetCommandLineVersion)" />
</ItemGroup> </ItemGroup>
<Target Name="_LocateMSBuildExe"> <Target Name="_LocateMSBuildExe">
@ -35,11 +34,14 @@
<Target Name="PackageProjects"> <Target Name="PackageProjects">
<PropertyGroup> <PropertyGroup>
<NuGetExePath>$([MSBuild]::EnsureTrailingSlash('$(NuGetPackageRoot)'))nuget.commandline\$(NuGetCommandLineVersion)\tools\nuget.exe</NuGetExePath> <PackageVersion>1.0.0-pre-$(BuildNumber)</PackageVersion>
<NuspecPath>$(RepositoryRoot)nuget\AspNetCore.nuspec</NuspecPath> <PackageOutputPath>$(ArtifactsDir)build\</PackageOutputPath>
</PropertyGroup> </PropertyGroup>
<Exec Command="&quot;$(NuGetExePath)&quot; pack &quot;$(NuspecPath)&quot; -OutputDirectory &quot;$(ArtifactsDir)\build&quot; -prop Version=1.0.0-pre-$(BuildNumber)" /> <MSBuild
Projects="$(MSBuildThisFileDirectory)../nuget/AspNetCore.csproj"
Targets="Pack"
Properties="PackageVersion=$(PackageVersion);PackageOutputPath=$(PackageOutputPath)" />
</Target> </Target>
<Target Name="PublishPackage" <Target Name="PublishPackage"

View File

@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<configuration> <configuration>
<packageSources> <packageSources>
<clear />
<add key="AspNetCore" value="https://dotnet.myget.org/F/aspnetcore-ci-dev/api/v3/index.json" /> <add key="AspNetCore" value="https://dotnet.myget.org/F/aspnetcore-ci-dev/api/v3/index.json" />
<add key="AspNetCoreTools" value="https://dotnet.myget.org/F/aspnetcore-tools/api/v3/index.json" /> <add key="AspNetCoreTools" value="https://dotnet.myget.org/F/aspnetcore-tools/api/v3/index.json" />
<add key="NuGet" value="https://api.nuget.org/v3/index.json" /> <add key="NuGet" value="https://api.nuget.org/v3/index.json" />

9
nuget/AspNetCore.csproj Normal file
View File

@ -0,0 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard1.0</TargetFramework>
<NuspecFile>$(MSBuildThisFileDirectory)AspNetCore.nuspec</NuspecFile>
<NuspecProperties>version=$(PackageVersion)</NuspecProperties>
</PropertyGroup>
</Project>