Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WPF template scenario test fails due to wpftmp project #4361

Open
mthalman opened this issue Apr 30, 2024 · 3 comments
Open

WPF template scenario test fails due to wpftmp project #4361

mthalman opened this issue Apr 30, 2024 · 3 comments

Comments

@mthalman
Copy link
Member

mthalman commented Apr 30, 2024

Windows build legs for the unified build pipeline fail when executing the VerifyWPFTemplate test. It gets the following error:

[FAIL] Microsoft.DotNet.ScenarioTests.SdkTemplateTests.SdkTemplateTests.VerifyWPFTemplate(language: CSharp)
System.InvalidOperationException : Failed to execute D:\a\_work\1\s\artifacts\obj\extracted-dotnet-sdk\dotnet.exe publish  /bl:D:\a\_work\1\s\artifacts\scenario-tests\artifacts/SdkTemplateTest_Wpf_CSharp\publish.binlog
Exit code: 1
MSBUILD : error MSB1011: Specify which project or solution file to use because this folder contains more than one project or solution file. [D:\a\_work\1\s\src\scenario-tests\src\Microsoft.DotNet.ScenarioTests.SdkTemplateTests\Microsoft.DotNet.ScenarioTests.SdkTemplateTests.csproj] [D:\a\_work\1\s\repo-projects\scenario-tests.proj]

This happens because there are two csproj files in the working directory:

D:\a\_work\1\s\artifacts\scenario-tests\artifacts/SdkTemplateTest_Wpf_CSharp\SdkTemplateTest_Wpf_CSharp.csproj
D:\a\_work\1\s\artifacts\scenario-tests\artifacts/SdkTemplateTest_Wpf_CSharp\SdkTemplateTest_Wpf_CSharp_fszxaeqt_wpftmp.csproj

The commands the test executes are the following:

Executing: D:\a\_work\1\s\artifacts\obj\extracted-dotnet-sdk\dotnet.exe new globaljson --sdk-version 9.0.100-preview.5.24226.1
Executing: D:\a\_work\1\s\artifacts\obj\extracted-dotnet-sdk\dotnet.exe new wpf --name SdkTemplateTest_Wpf_CSharp --output D:\a\_work\1\s\artifacts\scenario-tests\artifacts/SdkTemplateTest_Wpf_CSharp --language "C#"
Executing: D:\a\_work\1\s\artifacts\obj\extracted-dotnet-sdk\dotnet.exe run /bl:D:\a\_work\1\s\artifacts\scenario-tests\artifacts/SdkTemplateTest_Wpf_CSharp\run.binlog
Executing: D:\a\_work\1\s\artifacts\obj\extracted-dotnet-sdk\dotnet.exe publish  /bl:D:\a\_work\1\s\artifacts\scenario-tests\artifacts/SdkTemplateTest_Wpf_CSharp\publish.binlog

The wpftmp project shows up after the dotnet run call. That causes dotnet publish to fail because there is more than one project file in the working directory. The wpftmp project is supposed to be deleted but isn't for some reason. See related wpf logic: https://github.com/dotnet/wpf/blob/699fecfdccce0c5cd42277c935434256f9de61e9/src/Microsoft.DotNet.Wpf/src/PresentationBuildTasks/Microsoft/Build/Tasks/Windows/GenerateTemporaryTargetAssembly.cs#L159-L205

Test log:
TestResults_16350246.zip

These tests have been disabled with a patch: https://github.com/dotnet/sdk/blob/main/src/SourceBuild/patches/scenario-tests/0002-Disable-WPF-scenario-test.patch. This patch needs to be deleted as part of the work of resolving this.

@mthalman
Copy link
Member Author

Interestingly, if both the VB and C# tests are enabled, the C# test fails with this error but the VB test succeeds. But if you disable the C# test, the VB one fails with the same error.

@ViktorHofer
Copy link
Member

@mthalman as we have a patch in the VMR for this, were you planning to submit a PR into scenario-tests to get rid of the patch? Or do you want to keep the patch around until this is investigated further?

@mthalman
Copy link
Member Author

I submitted a scenario-tests PR: dotnet/scenario-tests#95

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Backlog
Status: No status
Development

No branches or pull requests

3 participants