Don't specify MainEntryPoint when compiling Razor assembly
This commit is contained in:
parent
41fad8a33a
commit
9677553a33
|
|
@ -42,6 +42,7 @@ Copyright (c) .NET Foundation. All rights reserved.
|
||||||
Remove @(DocFileItem)
|
Remove @(DocFileItem)
|
||||||
Remove PdbFile="$(PdbFile)"
|
Remove PdbFile="$(PdbFile)"
|
||||||
Remove OutputRefAssembly="@(IntermediateRefAssembly)"
|
Remove OutputRefAssembly="@(IntermediateRefAssembly)"
|
||||||
|
Remove MainEntryPoint="$(StartupObject)"
|
||||||
|
|
||||||
Remove EmbedAllSources="$(EmbedAllSources)" - not supported by our supported version of MSBuild
|
Remove EmbedAllSources="$(EmbedAllSources)" - not supported by our supported version of MSBuild
|
||||||
|
|
||||||
|
|
@ -133,7 +134,6 @@ Copyright (c) .NET Foundation. All rights reserved.
|
||||||
KeyFile="$(KeyOriginatorFile)"
|
KeyFile="$(KeyOriginatorFile)"
|
||||||
LangVersion="$(LangVersion)"
|
LangVersion="$(LangVersion)"
|
||||||
LinkResources="@(LinkResource)"
|
LinkResources="@(LinkResource)"
|
||||||
MainEntryPoint="$(StartupObject)"
|
|
||||||
ModuleAssemblyName="$(ModuleAssemblyName)"
|
ModuleAssemblyName="$(ModuleAssemblyName)"
|
||||||
NoConfig="true"
|
NoConfig="true"
|
||||||
NoLogo="$(NoLogo)"
|
NoLogo="$(NoLogo)"
|
||||||
|
|
|
||||||
|
|
@ -553,6 +553,21 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests
|
||||||
Assert.BuildPassed(result);
|
Assert.BuildPassed(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
[InitializeTestProject("SimpleMvc")]
|
||||||
|
public async Task Build_WithStartupObjectSpecified_Works()
|
||||||
|
{
|
||||||
|
var result = await DotnetMSBuild("Build", $"/p:StartupObject=SimpleMvc.Program");
|
||||||
|
|
||||||
|
Assert.BuildPassed(result);
|
||||||
|
|
||||||
|
Assert.FileExists(result, IntermediateOutputPath, "SimpleMvc.Views.dll");
|
||||||
|
Assert.FileExists(result, IntermediateOutputPath, "SimpleMvc.Views.pdb");
|
||||||
|
|
||||||
|
Assert.FileExists(result, IntermediateOutputPath, "SimpleMvc.Views.dll");
|
||||||
|
Assert.FileExists(result, IntermediateOutputPath, "SimpleMvc.Views.pdb");
|
||||||
|
}
|
||||||
|
|
||||||
private static DependencyContext ReadDependencyContext(string depsFilePath)
|
private static DependencyContext ReadDependencyContext(string depsFilePath)
|
||||||
{
|
{
|
||||||
var reader = new DependencyContextJsonReader();
|
var reader = new DependencyContextJsonReader();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue