Move away from `Assembly.Load` to Assembly.LoadFile
- Fixes build break.
This commit is contained in:
Родитель
ab64769c59
Коммит
8c822a8e77
|
@ -33,10 +33,6 @@ namespace Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.FunctionalTests
|
|||
};
|
||||
var expectedText = "Hello Index!";
|
||||
|
||||
var assemblyPath = Path.Combine(
|
||||
Fixture.DeploymentResult.DeploymentParameters.PublishedApplicationRootPath,
|
||||
$"{ApplicationName}.PrecompiledViews.dll");
|
||||
|
||||
// Act - 1
|
||||
var response1 = await Fixture.HttpClient.GetStringWithRetryAsync(
|
||||
"Home/Index",
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
using System;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
|
@ -13,8 +14,10 @@ namespace PublishWithEmbedViewSources.Controllers
|
|||
|
||||
public string GetPrecompiledResourceNames()
|
||||
{
|
||||
var precompiledAssembly = Assembly.Load(
|
||||
new AssemblyName("PublishWithEmbedViewSources.PrecompiledViews"));
|
||||
var precompiledAssemblyPath = Path.Combine(
|
||||
Path.GetDirectoryName(GetType().Assembly.Location),
|
||||
"PublishWithEmbedViewSources.PrecompiledViews.dll");
|
||||
var precompiledAssembly = Assembly.LoadFile(precompiledAssemblyPath);
|
||||
return string.Join(
|
||||
Environment.NewLine,
|
||||
precompiledAssembly.GetManifestResourceNames());
|
||||
|
|
Загрузка…
Ссылка в новой задаче