Родитель
ebf207cea4
Коммит
900f38b0c2
|
@ -57,6 +57,10 @@
|
|||
AfterTargets="ComputeRefAssembliesToPublish"
|
||||
Condition="'$(MvcRazorCompileOnPublish)'=='true'">
|
||||
|
||||
<PropertyGroup>
|
||||
<_MvcRazorOutputPdbFullPath>$([System.IO.Path]::ChangeExtension('$(_MvcRazorOutputFullPath)', '.pdb'))</_MvcRazorOutputPdbFullPath>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ResolvedFileToPublish
|
||||
Remove="%(MvcRazorFilesToCompile.FullPath)"
|
||||
|
@ -65,6 +69,10 @@
|
|||
<ResolvedFileToPublish Include="$(_MvcRazorOutputFullPath)" CopyToPublishDirectory="Always">
|
||||
<RelativePath>$([System.IO.Path]::GetFileName('$(_MvcRazorOutputFullPath)'))</RelativePath>
|
||||
</ResolvedFileToPublish>
|
||||
|
||||
<ResolvedFileToPublish Include="$(_MvcRazorOutputPdbFullPath)" CopyToPublishDirectory="Always">
|
||||
<RelativePath>$([System.IO.Path]::GetFileName('$(_MvcRazorOutputPdbFullPath)'))</RelativePath>
|
||||
</ResolvedFileToPublish>
|
||||
</ItemGroup>
|
||||
|
||||
<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 TestFixture()
|
||||
|
|
Загрузка…
Ссылка в новой задаче