Don't specify MainEntryPoint when compiling Razor assembly
This commit is contained in:
parent
e7db3f840b
commit
74667eda9c
|
|
@ -42,6 +42,7 @@ Copyright (c) .NET Foundation. All rights reserved.
|
|||
Remove @(DocFileItem)
|
||||
Remove PdbFile="$(PdbFile)"
|
||||
Remove OutputRefAssembly="@(IntermediateRefAssembly)"
|
||||
Remove MainEntryPoint="$(StartupObject)"
|
||||
|
||||
Remove EmbedAllSources="$(EmbedAllSources)" - not supported by our supported version of MSBuild
|
||||
|
||||
|
|
@ -133,7 +134,6 @@ Copyright (c) .NET Foundation. All rights reserved.
|
|||
KeyFile="$(KeyOriginatorFile)"
|
||||
LangVersion="$(LangVersion)"
|
||||
LinkResources="@(LinkResource)"
|
||||
MainEntryPoint="$(StartupObject)"
|
||||
ModuleAssemblyName="$(ModuleAssemblyName)"
|
||||
NoConfig="true"
|
||||
NoLogo="$(NoLogo)"
|
||||
|
|
|
|||
|
|
@ -553,6 +553,21 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests
|
|||
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)
|
||||
{
|
||||
var reader = new DependencyContextJsonReader();
|
||||
|
|
|
|||
Loading…
Reference in New Issue