Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ Copyright (c) .NET Foundation. All rights reserved.

<PropertyGroup>
<EnableDefaultContentItems Condition=" '$(EnableDefaultContentItems)' == '' ">true</EnableDefaultContentItems>

<!-- Trimmer defaults that depend on user-definable settings.
This must be configured before it's initialized in the .NET SDK targets (which are imported by the Razor SDK). -->
<SuppressTrimAnalysisWarnings Condition="'$(SuppressTrimAnalysisWarnings)' == '' And '$(TrimmerDefaultAction)' != 'link'">true</SuppressTrimAnalysisWarnings>
</PropertyGroup>

<Import Sdk="Microsoft.NET.Sdk.Razor" Project="Sdk.targets" />
Expand Down Expand Up @@ -61,9 +65,6 @@ Copyright (c) .NET Foundation. All rights reserved.
<StaticWebAssetBasePath Condition="'$(StaticWebAssetBasePath)' == ''">/</StaticWebAssetBasePath>
<BlazorCacheBootResources Condition="'$(BlazorCacheBootResources)' == ''">true</BlazorCacheBootResources>

<!-- Trimmer defaults that depend on user-definable settings -->
<SuppressTrimAnalysisWarnings Condition="'$(SuppressTrimAnalysisWarnings)' == '' And '$(TrimmerDefaultAction)' != 'link'">true</SuppressTrimAnalysisWarnings>

<!-- Turn off parts of the build that do not apply to WASM projects -->
<GenerateDependencyFile>false</GenerateDependencyFile>
<GenerateRuntimeConfigurationFiles>false</GenerateRuntimeConfigurationFiles>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ public void Publish_MinimalApp_Works()
var testInstance = CreateAspNetSdkTestAsset(testAppName);

var publishCommand = new PublishCommand(Log, testInstance.TestRoot);
publishCommand.Execute().Should().Pass();
publishCommand.Execute().Should().Pass()
.And.NotHaveStdOutContaining("warning IL");

var publishDirectory = publishCommand.GetOutputDirectory(DefaultTfm);

Expand Down
9 changes: 6 additions & 3 deletions src/WebSdk/Web/Sdk/Sdk.targets
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ Copyright (c) .NET Foundation. All rights reserved.
<!-- We can't add it here because the OutputPath and other msbuild properties are not evaluated.-->
<!--<Import Sdk="Microsoft.NET.Sdk.Publish" Project="ImportPublishProfile.targets" />-->

<PropertyGroup>
<!-- Trimmer defaults that depend on user-definable settings.
This must be configured before it's initialized in the .NET SDK targets. -->
<SuppressTrimAnalysisWarnings Condition="'$(SuppressTrimAnalysisWarnings)' == '' And '$(TrimmerDefaultAction)' != 'link'">true</SuppressTrimAnalysisWarnings>
</PropertyGroup>

<Import Sdk="Microsoft.NET.Sdk" Project="Sdk.targets" />

<PropertyGroup>
Expand All @@ -22,9 +28,6 @@ Copyright (c) .NET Foundation. All rights reserved.
Microsoft.AspNetCore.App. This needs to happen after the .NET SDK has evaluated TFMs.
-->
<AddRazorSupportForMvc Condition="'$(DisableImplicitFrameworkReferences)' != 'true' And '$(AddRazorSupportForMvc)' == '' And '$(TargetFrameworkIdentifier)' == '.NETCoreApp' And '$(_TargetFrameworkVersionWithoutV)' >= '3.0'">true</AddRazorSupportForMvc>

<!-- Trimmer defaults that depend on user-definable settings -->
<SuppressTrimAnalysisWarnings Condition="'$(SuppressTrimAnalysisWarnings)' == '' And '$(TrimmerDefaultAction)' != 'link'">true</SuppressTrimAnalysisWarnings>
</PropertyGroup>

<Import Sdk="Microsoft.NET.Sdk.Razor" Project="Sdk.targets" />
Expand Down