Added nuspec file for Mvc.Razor.ViewCompilation to include symbols
This commit is contained in:
Родитель
672efed0c4
Коммит
2a10e6fe1d
|
@ -3,7 +3,6 @@
|
|||
<PropertyGroup>
|
||||
<Description>Build-time references required to enable Razor view compilation as part of building the application.</Description>
|
||||
<TargetFrameworks>netcoreapp2.0;net461</TargetFrameworks>
|
||||
<TargetFrameworks Condition=" '$(OS)' != 'Windows_NT' ">netcoreapp2.0</TargetFrameworks>
|
||||
|
||||
<PackageTags>cshtml;razor;compilation;precompilation;aspnetcore</PackageTags>
|
||||
<PreserveCompilationContext>true</PreserveCompilationContext>
|
||||
|
@ -11,6 +10,7 @@
|
|||
<TasksProjectDirectory>..\Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Tasks\</TasksProjectDirectory>
|
||||
<IncludeBuildOutput>false</IncludeBuildOutput>
|
||||
<EnableApiCheck>false</EnableApiCheck>
|
||||
<NuspecFile>$(MSBuildProjectName).nuspec</NuspecFile>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(TargetFramework)'=='net461'">
|
||||
|
@ -31,17 +31,6 @@
|
|||
<PackageReference Update="Microsoft.NETCore.App" PrivateAssets="All" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Include="build\**\*.*" Pack="true" PackagePath="%(Identity)" />
|
||||
<None Include="$(OutputPath)netcoreapp2.0\$(AssemblyName).dll" Pack="true" PackagePath="build\netstandard2.0\$(AssemblyName).dll" />
|
||||
<None Include="$(TasksProjectDirectory)bin\$(Configuration)\netstandard2.0\$(AssemblyName).Tasks.dll" Pack="true" PackagePath="build\netstandard2.0\$(AssemblyName).Tasks.dll" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup Condition="'$(OS)'=='Windows_NT'">
|
||||
<None Include="$(OutputPath)net461\win7-x86\$(AssemblyName)-x86.exe" Pack="true" PackagePath="build\netstandard2.0\" />
|
||||
<None Include="$(OutputPath)net461\win7-x64\$(AssemblyName)-x64.exe" Pack="true" PackagePath="build\netstandard2.0\" />
|
||||
</ItemGroup>
|
||||
|
||||
<Target Name="BuildX64" AfterTargets="Build" Condition="'$(TargetFramework)'=='net461' AND '$(PlatformTarget)'!='x64'">
|
||||
<MSBuild
|
||||
Projects="$(MSBuildProjectFullPath)"
|
||||
|
@ -51,4 +40,37 @@
|
|||
TargetFramework=net461;
|
||||
Platform=x64;" />
|
||||
</Target>
|
||||
|
||||
<Target Name="PopulateNuspec" BeforeTargets="GenerateNuspec" DependsOnTargets="BuildX64;">
|
||||
|
||||
<PropertyGroup>
|
||||
<!-- Make sure we create a symbols.nupkg. -->
|
||||
<IncludeSymbols>true</IncludeSymbols>
|
||||
|
||||
<NuspecProperties>
|
||||
id=$(PackageId);
|
||||
version=$(PackageVersion);
|
||||
authors=$(Authors);
|
||||
description=$(Description);
|
||||
tags=$(PackageTags.Replace(';', ' '));
|
||||
licenseUrl=$(PackageLicenseUrl);
|
||||
projectUrl=$(PackageProjectUrl);
|
||||
iconUrl=$(PackageIconUrl);
|
||||
repositoryUrl=$(RepositoryUrl);
|
||||
repositoryCommit=$(RepositoryCommit);
|
||||
copyright=$(Copyright);
|
||||
AssemblyName=$(AssemblyName);
|
||||
|
||||
OutputBinary=$(OutputPath)netcoreapp2.0\$(AssemblyName).dll;
|
||||
OutputSymbol=$(OutputPath)netcoreapp2.0\$(AssemblyName).pdb;
|
||||
TaskBinary=$(TasksProjectDirectory)bin\$(Configuration)\netstandard2.0\$(AssemblyName).Tasks.dll;
|
||||
TaskSymbol=$(TasksProjectDirectory)bin\$(Configuration)\netstandard2.0\$(AssemblyName).Tasks.pdb;
|
||||
|
||||
OutputExeX86=$(OutputPath)net461\win7-x86\$(AssemblyName)-x86.exe;
|
||||
OutputExeSymbolX86=$(OutputPath)net461\win7-x86\$(AssemblyName)-x86.pdb;
|
||||
OutputExeX64=$(OutputPath)net461\win7-x64\$(AssemblyName)-x64.exe;
|
||||
OutputExeSymbolX64=$(OutputPath)net461\win7-x64\$(AssemblyName)-x64.pdb;
|
||||
</NuspecProperties>
|
||||
</PropertyGroup>
|
||||
</Target>
|
||||
</Project>
|
||||
|
|
|
@ -0,0 +1,38 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<package xmlns="http://schemas.microsoft.com/packaging/2012/06/nuspec.xsd">
|
||||
<metadata>
|
||||
<id>$id$</id>
|
||||
<version>$version$</version>
|
||||
<authors>$authors$</authors>
|
||||
<requireLicenseAcceptance>true</requireLicenseAcceptance>
|
||||
<licenseUrl>$licenseUrl$</licenseUrl>
|
||||
<projectUrl>$projectUrl$</projectUrl>
|
||||
<iconUrl>$iconUrl$</iconUrl>
|
||||
<description>$description$</description>
|
||||
<copyright>$copyright$</copyright>
|
||||
<tags>$tags$</tags>
|
||||
<repository type="git" url="$repositoryUrl$" commit="$repositoryCommit$" />
|
||||
<dependencies>
|
||||
<group targetFramework=".NETFramework4.6.1">
|
||||
<dependency id="Microsoft.AspNetCore.Hosting" version="$version$" exclude="Build,Analyzers" />
|
||||
<dependency id="Microsoft.AspNetCore.Mvc.RazorPages" version="$version$" exclude="Build,Analyzers" />
|
||||
</group>
|
||||
<group targetFramework=".NETCoreApp2.0">
|
||||
<dependency id="Microsoft.AspNetCore.Hosting" version="$version$" exclude="Build,Analyzers" />
|
||||
<dependency id="Microsoft.AspNetCore.Mvc.RazorPages" version="$version$" exclude="Build,Analyzers" />
|
||||
</group>
|
||||
</dependencies>
|
||||
</metadata>
|
||||
|
||||
<files>
|
||||
<file src="build\**\*" target="build\" />
|
||||
<file src="$OutputBinary$" target="build\netstandard2.0\$AssemblyName$.dll" />
|
||||
<file src="$OutputSymbol$" target="build\netstandard2.0\$AssemblyName$.pdb" />
|
||||
<file src="$TaskBinary$" target="build\netstandard2.0\$AssemblyName$.Tasks.dll" />
|
||||
<file src="$TaskSymbol$" target="build\netstandard2.0\$AssemblyName$.Tasks.pdb" />
|
||||
<file src="$OutputExeX86$" target="build\netstandard2.0\" />
|
||||
<file src="$OutputExeSymbolX86$" target="build\netstandard2.0\" />
|
||||
<file src="$OutputExeX64$" target="build\netstandard2.0\" />
|
||||
<file src="$OutputExeSymbolX64$" target="build\netstandard2.0\" />
|
||||
</files>
|
||||
</package>
|
Загрузка…
Ссылка в новой задаче