57 lines
2.4 KiB
XML
57 lines
2.4 KiB
XML
<Project>
|
|
<PropertyGroup>
|
|
<MicrosoftCommonTargetsImported>true</MicrosoftCommonTargetsImported>
|
|
<VerifyDependsOn>$(VerifyDependsOn);PublishPackage</VerifyDependsOn>
|
|
<PublishFeed>https://dotnet.myget.org/F/aspnetcoremodule/api/v2/package</PublishFeed>
|
|
<NuGetCommandLineVersion>3.5.0</NuGetCommandLineVersion>
|
|
</PropertyGroup>
|
|
|
|
<ItemGroup>
|
|
<PackageReference Include="PackagePublisher" Version="1.0.2-*" />
|
|
<PackageReference Include="NuGet.CommandLine" Version="$(NuGetCommandLineVersion)" />
|
|
</ItemGroup>
|
|
|
|
<Target Name="_LocateMSBuildExe">
|
|
<ItemGroup>
|
|
<MSBuild15ExePaths Include="$(MSBuildProgramFiles32)\Microsoft Visual Studio\**\MSBuild\15.0\Bin\MSBuild.exe" />
|
|
</ItemGroup>
|
|
|
|
<Error
|
|
Text="Unable to locate MSBuild 15.0 under $(MSBuildProgramFiles32)\Microsoft Visual Studio"
|
|
Condition="'@(MSBuild15ExePaths)'==''"/>
|
|
|
|
<PropertyGroup Condition="'@(MSBuild15ExePaths)'!=''">
|
|
<MSBuildExePath>%(MSBuild15ExePaths.FullPath)</MSBuildExePath>
|
|
</PropertyGroup>
|
|
</Target>
|
|
|
|
<Target Name="BuildNativeAssets" DependsOnTargets="_LocateMSBuildExe" BeforeTargets="Compile">
|
|
<ItemGroup>
|
|
<BuildConfigurations Include="/p:Configuration=Release /p:platform=Win32" />
|
|
<BuildConfigurations Include="/p:Configuration=Release /p:platform=x64" />
|
|
</ItemGroup>
|
|
<Exec Command=""$(MSBuildExePath)" "$(RepositoryRoot)src\AspNetCore\AspNetCore.vcxproj" %(BuildConfigurations.Identity)" />
|
|
</Target>
|
|
|
|
<Target Name="PackageProjects">
|
|
<PropertyGroup>
|
|
<NuGetExePath>$([MSBuild]::EnsureTrailingSlash('$(NuGetPackageRoot)'))nuget.commandline\$(NuGetCommandLineVersion)\tools\nuget.exe</NuGetExePath>
|
|
<NuspecPath>$(RepositoryRoot)nuget\AspNetCore.nuspec</NuspecPath>
|
|
</PropertyGroup>
|
|
|
|
<Exec Command=""$(NuGetExePath)" pack "$(NuspecPath)" -OutputDirectory "$(ArtifactsDir)\build" -prop Version=1.0.0-$(BuildNumber)" />
|
|
</Target>
|
|
|
|
<Target Name="PublishPackage"
|
|
DependsOnTargets="_FindDotNetPath"
|
|
Condition="'$(PublishPackage)'=='true'">
|
|
|
|
<Exec Command=""$(DotNetPath)" $(PackagePublisherNetCoreApp) -d "$(ArtifactsDir)\build" -f $(PublishFeed)" />
|
|
</Target>
|
|
|
|
<Target Name="_FindDotNetPath">
|
|
<GetDotNetHost>
|
|
<Output TaskParameter="ExecutablePath" PropertyName="DotNetPath" />
|
|
</GetDotNetHost>
|
|
</Target>
|
|
</Project> |