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>netcoreapp2.0;net461</TargetFrameworks>
|
||||||
<TargetFrameworks Condition=" '$(OS)' != 'Windows_NT' ">netcoreapp2.0</TargetFrameworks>
|
<TargetFrameworks Condition=" '$(OS)' != 'Windows_NT' ">netcoreapp2.0</TargetFrameworks>
|
||||||
<RuntimeIdentifier Condition="!$(TargetFramework.StartsWith('netcoreapp'))">win7-x64</RuntimeIdentifier>
|
<RuntimeIdentifier Condition="!$(TargetFramework.StartsWith('netcoreapp'))">win7-x64</RuntimeIdentifier>
|
||||||
|
<ClassLibraryProjectPath>..\ClassLibraryWithPrecompiledViews\ClassLibraryWithPrecompiledViews.csproj</ClassLibraryProjectPath>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<Import Project="..\..\build\common-testapps.props" />
|
<Import Project="..\..\build\common-testapps.props" />
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\ClassLibraryWithPrecompiledViews\ClassLibraryWithPrecompiledViews.csproj" />
|
<ProjectReference Include="$(ClassLibraryProjectPath)" />
|
||||||
|
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="$(AspNetCoreVersion)" />
|
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="$(AspNetCoreVersion)" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Server.Kestrel" Version="$(AspNetCoreVersion)" />
|
<PackageReference Include="Microsoft.AspNetCore.Server.Kestrel" Version="$(AspNetCoreVersion)" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Configuration.CommandLine" Version="$(AspNetCoreVersion)" />
|
<PackageReference Include="Microsoft.Extensions.Configuration.CommandLine" Version="$(AspNetCoreVersion)" />
|
||||||
|
|
@ -15,6 +17,11 @@
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<Target Name="CopyPrecompiledViewAssets" BeforeTargets="Publish">
|
<Target Name="CopyPrecompiledViewAssets" BeforeTargets="Publish">
|
||||||
|
<MSBuild
|
||||||
|
Projects="$(ClassLibraryProjectPath)"
|
||||||
|
Targets="MvcRazorPrecompile"
|
||||||
|
Properties="TargetFramework=$(TargetFramework);Configuration=$(Configuration)" />
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PrecompiledArtifacts Include="..\ClassLibraryWithPrecompiledViews\obj\precompiled\$(TargetFramework)\*.dll" />
|
<PrecompiledArtifacts Include="..\ClassLibraryWithPrecompiledViews\obj\precompiled\$(TargetFramework)\*.dll" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,4 @@
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="$(AspNetCoreVersion)" />
|
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="$(AspNetCoreVersion)" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<Target Name="PrecompileRazorViews" AfterTargets="Build" DependsOnTargets="MvcRazorPrecompile" Condition="'$(TargetFramework)'!=''" />
|
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue