Skip to content
Draft
Show file tree
Hide file tree
Changes from 1 commit
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
1 change: 1 addition & 0 deletions eng/testing/scenarios/BuildWasmAppsJobsList.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Wasm.Build.NativeRebuild.Tests.ReferenceNewAssemblyRebuildTest
Wasm.Build.NativeRebuild.Tests.SimpleSourceChangeRebuildTest
Wasm.Build.Tests.InterpPgoTests
Wasm.Build.Templates.Tests.NativeBuildTests
Wasm.Build.Tests.Blazor.AppsettingsTests
Wasm.Build.Tests.Blazor.BuildPublishTests
Wasm.Build.Tests.Blazor.SimpleRunTests
Wasm.Build.Tests.Blazor.CleanTests
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ public AppsettingsTests(ITestOutputHelper output, SharedBuildPerTestClassFixture
}

[Fact]
[ActiveIssue("https://github.com/dotnet/runtime/issues/122338")] // add it back to eng\testing\scenarios\BuildWasmAppsJobsList.txt
public async Task FileInVfs()
{
Configuration config = Configuration.Debug;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -221,5 +221,5 @@ public override async Task<RunResult> RunForPublishWithWebServer(RunOptions runO
}

public string GetBlazorBinFrameworkDir(Configuration config, bool forPublish, string? framework = null, string? projectDir = null)
=> _provider.GetBinFrameworkDir(config: config, forPublish: forPublish, framework: framework ?? DefaultTargetFrameworkForBlazor, projectDir: projectDir);
=> _provider.GetBinFrameworkDir(config: config, forPublish: forPublish, framework: framework ?? _provider.GetDefaultTargetFramework(), projectDir: projectDir);
}
Original file line number Diff line number Diff line change
Expand Up @@ -73,14 +73,9 @@ public ProjectInfo CreateWasmTemplateProject(
(string projectName, string logPath, string nugetDir) =
InitProjectLocation(idPrefix, config, aot, appendUnicodeToPath ?? s_buildEnv.IsRunningOnCI);

if (addFrameworkArg) {
var defaultTarget = template switch
{
Template.BlazorWasm => DefaultTargetFrameworkForBlazorTemplate,
_ => DefaultTargetFramework,
};

extraArgs += $" -f {defaultTarget}";
if (addFrameworkArg)
{
extraArgs += $" -f {_provider.GetDefaultTargetFramework()}";
}

using DotNetCommand cmd = new DotNetCommand(s_buildEnv, _testOutput, useDefaultArgs: false);
Expand Down Expand Up @@ -282,7 +277,7 @@ protected void DeleteFile(string pathRelativeToProjectDir)

protected void UpdateBrowserMainJs(string? targetFramework = null, string runtimeAssetsRelativePath = DefaultRuntimeAssetsRelativePath)
{
targetFramework ??= DefaultTargetFramework;
targetFramework ??= _provider.GetDefaultTargetFramework();
string mainJsPath = Path.Combine(_projectDir, "wwwroot", "main.js");
string mainJsContent = File.ReadAllText(mainJsPath);
Version targetFrameworkVersion = new Version(targetFramework.Replace("net", ""));
Expand Down Expand Up @@ -431,10 +426,10 @@ void OnErrorMessage(string msg)
}

public string GetBinFrameworkDir(Configuration config, bool forPublish, string? framework = null, string? projectDir = null) =>
_provider.GetBinFrameworkDir(config, forPublish, framework ?? DefaultTargetFramework, projectDir);
_provider.GetBinFrameworkDir(config, forPublish, framework ?? _provider.GetDefaultTargetFramework(), projectDir);

public string GetObjDir(Configuration config, string? framework = null, string? projectDir = null) =>
_provider.GetObjDir(config, framework ?? DefaultTargetFramework, projectDir);
_provider.GetObjDir(config, framework ?? _provider.GetDefaultTargetFramework(), projectDir);

public BuildPaths GetBuildPaths(Configuration config, bool forPublish) =>
_provider.GetBuildPaths(config, forPublish);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ public WasmSdkBasedProjectProvider(ITestOutputHelper _testOutput, string default

protected override string BundleDirName { get { return "wwwroot"; } }

public string GetDefaultTargetFramework() => _defaultTargetFramework;

protected override IReadOnlyDictionary<string, bool> GetAllKnownDotnetFilesToFingerprintMap(AssertBundleOptions assertOptions)
{
var result = new SortedDictionary<string, bool>()
Expand Down
Loading