parent
ebf207cea4
commit
900f38b0c2
|
|
@ -57,6 +57,10 @@
|
||||||
AfterTargets="ComputeRefAssembliesToPublish"
|
AfterTargets="ComputeRefAssembliesToPublish"
|
||||||
Condition="'$(MvcRazorCompileOnPublish)'=='true'">
|
Condition="'$(MvcRazorCompileOnPublish)'=='true'">
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<_MvcRazorOutputPdbFullPath>$([System.IO.Path]::ChangeExtension('$(_MvcRazorOutputFullPath)', '.pdb'))</_MvcRazorOutputPdbFullPath>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ResolvedFileToPublish
|
<ResolvedFileToPublish
|
||||||
Remove="%(MvcRazorFilesToCompile.FullPath)"
|
Remove="%(MvcRazorFilesToCompile.FullPath)"
|
||||||
|
|
@ -65,6 +69,10 @@
|
||||||
<ResolvedFileToPublish Include="$(_MvcRazorOutputFullPath)" CopyToPublishDirectory="Always">
|
<ResolvedFileToPublish Include="$(_MvcRazorOutputFullPath)" CopyToPublishDirectory="Always">
|
||||||
<RelativePath>$([System.IO.Path]::GetFileName('$(_MvcRazorOutputFullPath)'))</RelativePath>
|
<RelativePath>$([System.IO.Path]::GetFileName('$(_MvcRazorOutputFullPath)'))</RelativePath>
|
||||||
</ResolvedFileToPublish>
|
</ResolvedFileToPublish>
|
||||||
|
|
||||||
|
<ResolvedFileToPublish Include="$(_MvcRazorOutputPdbFullPath)" CopyToPublishDirectory="Always">
|
||||||
|
<RelativePath>$([System.IO.Path]::GetFileName('$(_MvcRazorOutputPdbFullPath)'))</RelativePath>
|
||||||
|
</ResolvedFileToPublish>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup Condition="'$(MvcRazorExcludeRefAssembliesFromPublish)'=='true'">
|
<ItemGroup Condition="'$(MvcRazorExcludeRefAssembliesFromPublish)'=='true'">
|
||||||
|
|
|
||||||
|
|
@ -52,6 +52,20 @@ namespace FunctionalTests
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[ConditionalTheory]
|
||||||
|
[MemberData(nameof(SupportedFlavorsTheoryData))]
|
||||||
|
public async Task Precompilation_PublishesPdbsToOutputDirectory(RuntimeFlavor flavor)
|
||||||
|
{
|
||||||
|
// Arrange
|
||||||
|
using (var deployment = await Fixture.CreateDeploymentAsync(flavor))
|
||||||
|
{
|
||||||
|
var pdbPath = Path.Combine(deployment.DeploymentResult.ContentRoot, Fixture.ApplicationName + ".PrecompiledViews.pdb");
|
||||||
|
|
||||||
|
// Act & Assert
|
||||||
|
Assert.True(File.Exists(pdbPath), $"PDB at {pdbPath} was not found.");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public class TestFixture : ApplicationTestFixture
|
public class TestFixture : ApplicationTestFixture
|
||||||
{
|
{
|
||||||
public TestFixture()
|
public TestFixture()
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue