Avoid running the precompilation tool as part of building ClassLibraryWithPrecompiledViews
Fixes #117
This commit is contained in:
parent
06db90cbfa
commit
ebf207cea4
|
|
@ -3,11 +3,13 @@
|
|||
<TargetFrameworks>netcoreapp2.0;net461</TargetFrameworks>
|
||||
<TargetFrameworks Condition=" '$(OS)' != 'Windows_NT' ">netcoreapp2.0</TargetFrameworks>
|
||||
<RuntimeIdentifier Condition="!$(TargetFramework.StartsWith('netcoreapp'))">win7-x64</RuntimeIdentifier>
|
||||
<ClassLibraryProjectPath>..\ClassLibraryWithPrecompiledViews\ClassLibraryWithPrecompiledViews.csproj</ClassLibraryProjectPath>
|
||||
</PropertyGroup>
|
||||
<Import Project="..\..\build\common-testapps.props" />
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\ClassLibraryWithPrecompiledViews\ClassLibraryWithPrecompiledViews.csproj" />
|
||||
<ProjectReference Include="$(ClassLibraryProjectPath)" />
|
||||
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="$(AspNetCoreVersion)" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Server.Kestrel" Version="$(AspNetCoreVersion)" />
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration.CommandLine" Version="$(AspNetCoreVersion)" />
|
||||
|
|
@ -15,6 +17,11 @@
|
|||
</ItemGroup>
|
||||
|
||||
<Target Name="CopyPrecompiledViewAssets" BeforeTargets="Publish">
|
||||
<MSBuild
|
||||
Projects="$(ClassLibraryProjectPath)"
|
||||
Targets="MvcRazorPrecompile"
|
||||
Properties="TargetFramework=$(TargetFramework);Configuration=$(Configuration)" />
|
||||
|
||||
<ItemGroup>
|
||||
<PrecompiledArtifacts Include="..\ClassLibraryWithPrecompiledViews\obj\precompiled\$(TargetFramework)\*.dll" />
|
||||
</ItemGroup>
|
||||
|
|
|
|||
|
|
@ -12,6 +12,4 @@
|
|||
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="$(AspNetCoreVersion)" />
|
||||
</ItemGroup>
|
||||
|
||||
<Target Name="PrecompileRazorViews" AfterTargets="Build" DependsOnTargets="MvcRazorPrecompile" Condition="'$(TargetFramework)'!=''" />
|
||||
|
||||
</Project>
|
||||
|
|
|
|||
Loading…
Reference in New Issue