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 @@ -9,11 +9,12 @@ WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and
Copyright (c) .NET Foundation. All rights reserved.
***********************************************************************************************
-->
<Project ToolsVersion="14.0" TreatAsLocalProperty="RuntimeIdentifier">
<Project ToolsVersion="14.0" TreatAsLocalProperty="RuntimeIdentifier;RuntimeIdentifiers">
<PropertyGroup>
<OutputType>exe</OutputType>

<RuntimeIdentifier>browser-wasm</RuntimeIdentifier>
<RuntimeIdentifiers>$(RuntimeIdentifier)</RuntimeIdentifiers>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm unsure if we should just unset the property entirely or set it to $(RuntimeIdentifier) here. Did you try it both ways? Were there any behavioral differences?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would set this explicitly to browser-wasm

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In my testing I didn't find a difference

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have a vague recollection of some issue when both RuntimeIdentifiers and RuntimeIdentifier were set but I can't find any details anymore. Maybe it was just when they disagreed.

<AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath>
<CopyOutputSymbolsToPublishDirectory>false</CopyOutputSymbolsToPublishDirectory>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -697,6 +697,23 @@ public class TestReference
fileInWwwroot.Should().Exist();
}

[RequiresMSBuildVersionFact("17.12", Reason = "Needs System.Text.Json 8.0.5")]
public void Restore_WithRuntime_Works()
{
var testInstance = CreateAspNetSdkTestAsset("BlazorHosted");

var nugetRestorePath = Path.Combine(testInstance.TestRoot, ".nuget");

new DotnetRestoreCommand(Log, "-bl:msbuild-restore.binlog", "-r", "linux-x64")
.WithWorkingDirectory(Path.Combine(testInstance.TestRoot, "blazorhosted"))
.WithEnvironmentVariable("NUGET_PACKAGES", nugetRestorePath)
.Execute()
.Should().Pass();

new DirectoryInfo(Path.Combine(nugetRestorePath, "microsoft.netcore.app.runtime.mono.linux-x64"))
.Should().NotExist();
}

[RequiresMSBuildVersionFact("17.12", Reason = "Needs System.Text.Json 8.0.5")]
public void Build_WithReference_Works()
{
Expand Down