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

Unable to build all projects in solution on the winui branch #4390

Open
marcelwgn opened this issue Nov 19, 2021 · 17 comments
Open

Unable to build all projects in solution on the winui branch #4390

marcelwgn opened this issue Nov 19, 2021 · 17 comments
Labels
sample app 🖼 testing 🏗️ WinUI 💠 Related to WinUI 3 Version or when paired with External can mean requires fix in WinUI 2/3.

Comments

@marcelwgn
Copy link
Contributor

When using the winui branch, building the solution wth VS 2022 ends with a few projects failing to build. Build log: https://gist.github.com/chingucoding/5fd6d1cdf7b9e6fd297ce6a2c032b236

Context: I was trying to figure out why unit test projects for WinUI 3 were not working and the awesome @azchohfi suggested to checkout the winui branch and it's unit tests. Since building (and running them didn't work), I'm opening this issue for input and help.

@ghost ghost added the needs triage 🔍 label Nov 19, 2021
@ghost
Copy link

ghost commented Nov 19, 2021

Hello chingucoding, thank you for opening an issue with us!

I have automatically added a "needs triage" label to help get things started. Our team will analyze and investigate the issue, and escalate it to the relevant team if possible. Other community members may also look into the issue and provide feedback 🙌

@azchohfi
Copy link
Contributor

Ah, there is the issue.
The UI Tests are enabled on the winui branch, but the Unit Tests are enabled only on the winui_unittests branch. I still haven't merged these into the winui branch yet, due to an issue that we are still investigating. The issue happens only on our test project that has many, many tests, and we were still not able to reproduce them on projects with only a few (<1000 tests), so you should still be fine when using the MSTest infrastructure.
Btw, how are you executing these? build.cmd from the build folder, or directly through VS?

@marcelwgn
Copy link
Contributor Author

Ah I see. I'm building the project through Visual Studio. The first times it failed, but after running the build.bat file inside the build folder, the build errors for the UI tests project didn't seem to occur again and the tests ran fine. After cleaning the projects again though, trying to run the UI tests ended in a build issues and the tests not running.

@michael-hawker
Copy link
Member

@azchohfi you mentioned you've merged these two branches together now I think, eh?

@azchohfi
Copy link
Contributor

azchohfi commented Dec 2, 2021

Yes, the winui_unittests branch was merged into the winui branch.

@michael-hawker
Copy link
Member

@chingucoding let us know if you have better luck now and what issues still remain.

@marcelwgn
Copy link
Contributor Author

Well using VS, I'm still getting build errors https://gist.github.com/chingucoding/97da4bce3c21beead463ba85396c0518
It seems that it fails to download some dependencies properly, could I be missing the link to a NuGet repository?

Btw, tests seem to be running now.

Btw², it seems that you also have the issue of the UI being created and not cleaned up; is that worth looking into?

@michael-hawker
Copy link
Member

Well using VS, I'm still getting build errors https://gist.github.com/chingucoding/97da4bce3c21beead463ba85396c0518 It seems that it fails to download some dependencies properly, could I be missing the link to a NuGet repository?

The SampleApp won't build in the branch out-of-the-box at the moment as there's not a package of the Monaco editor for WinUI 3 yet, that has to be built manually from Alex's branch in that repo. Eventually hope to have a package using WebView2 for it across platforms, but have been waiting for WebView2 to support hosting objects for scripting interop vs. doing manual messaging.

Btw², it seems that you also have the issue of the UI being created and not cleaned up; is that worth looking into?

Is this only in WinUI or in UWP as well? Definitely appreciate any insight.

@michael-hawker michael-hawker added sample app 🖼 testing 🏗️ WinUI 💠 Related to WinUI 3 Version or when paired with External can mean requires fix in WinUI 2/3. and removed needs triage 🔍 labels Dec 3, 2021
@marcelwgn
Copy link
Contributor Author

Well using VS, I'm still getting build errors https://gist.github.com/chingucoding/97da4bce3c21beead463ba85396c0518 It seems that it fails to download some dependencies properly, could I be missing the link to a NuGet repository?

The SampleApp won't build in the branch out-of-the-box at the moment as there's not a package of the Monaco editor for WinUI 3 yet, that has to be built manually from Alex's branch in that repo. Eventually hope to have a package using WebView2 for it across platforms, but have been waiting for WebView2 to support hosting objects for scripting interop vs. doing manual messaging.

Ah I see, that makes sense. So to a degree those build failures are expected. Should this issue be kept open then so people know that this is (partially) expected?

Btw², it seems that you also have the issue of the UI being created and not cleaned up; is that worth looking into?

Is this only in WinUI or in UWP as well? Definitely appreciate any insight.

UWP test apps don't exhibit this behavior, so far only WinUI 3 apps do this (at least from what I have seen).

@azchohfi
Copy link
Contributor

azchohfi commented Dec 3, 2021

You should still be able to build the solution from VS if you target Release/AnyCPU. That should not build the sample app and should just work. Or just run the build.bat command from the build folder.

@marcelwgn
Copy link
Contributor Author

Ah I see. Building with Release/AnyCPU, two projects still fail to compile, below is the build log:

Build started...
NU1201: Project CommunityToolkit.WinUI.UI.Controls.Media is not compatible with uap10.0.18362 (UAP,Version=v10.0.18362). Project CommunityToolkit.WinUI.UI.Controls.Media supports: net5.0-windows10.0.18362 (.NETCoreApp,Version=v5.0)
NU1201: Project CommunityToolkit.WinUI.UI.Controls.Input is not compatible with uap10.0.18362 (UAP,Version=v10.0.18362). Project CommunityToolkit.WinUI.UI.Controls.Input supports: net5.0-windows10.0.18362 (.NETCoreApp,Version=v5.0)
NU1201: Project CommunityToolkit.WinUI.Input.GazeInteraction is not compatible with uap10.0.18362 (UAP,Version=v10.0.18362). Project CommunityToolkit.WinUI.Input.GazeInteraction supports: net5.0-windows10.0.18362 (.NETCoreApp,Version=v5.0)
NU1201: Project CommunityToolkit.WinUI.UI.Controls.Core is not compatible with uap10.0.18362 (UAP,Version=v10.0.18362). Project CommunityToolkit.WinUI.UI.Controls.Core supports: net5.0-windows10.0.18362 (.NETCoreApp,Version=v5.0)
NU1201: Project CommunityToolkit.WinUI.UI is not compatible with uap10.0.18362 (UAP,Version=v10.0.18362). Project CommunityToolkit.WinUI.UI supports: net5.0-windows10.0.18362 (.NETCoreApp,Version=v5.0)
NU1201: Project CommunityToolkit.WinUI is not compatible with uap10.0.18362 (UAP,Version=v10.0.18362). Project CommunityToolkit.WinUI supports: net5.0-windows10.0.18362 (.NETCoreApp,Version=v5.0)
NU1201: Project CommunityToolkit.WinUI.Input.GazeInteraction is not compatible with uap10.0.18362 (UAP,Version=v10.0.18362) / win10-arm. Project CommunityToolkit.WinUI.Input.GazeInteraction supports: net5.0-windows10.0.18362 (.NETCoreApp,Version=v5.0)
NU1201: Project CommunityToolkit.WinUI.UI.Controls.Input is not compatible with uap10.0.18362 (UAP,Version=v10.0.18362) / win10-arm. Project CommunityToolkit.WinUI.UI.Controls.Input supports: net5.0-windows10.0.18362 (.NETCoreApp,Version=v5.0)
NU1201: Project CommunityToolkit.WinUI.UI.Controls.Media is not compatible with uap10.0.18362 (UAP,Version=v10.0.18362) / win10-arm. Project CommunityToolkit.WinUI.UI.Controls.Media supports: net5.0-windows10.0.18362 (.NETCoreApp,Version=v5.0)
NU1201: Project CommunityToolkit.WinUI.UI.Controls.Core is not compatible with uap10.0.18362 (UAP,Version=v10.0.18362) / win10-arm. Project CommunityToolkit.WinUI.UI.Controls.Core supports: net5.0-windows10.0.18362 (.NETCoreApp,Version=v5.0)
NU1201: Project CommunityToolkit.WinUI.UI is not compatible with uap10.0.18362 (UAP,Version=v10.0.18362) / win10-arm. Project CommunityToolkit.WinUI.UI supports: net5.0-windows10.0.18362 (.NETCoreApp,Version=v5.0)
NU1201: Project CommunityToolkit.WinUI is not compatible with uap10.0.18362 (UAP,Version=v10.0.18362) / win10-arm. Project CommunityToolkit.WinUI supports: net5.0-windows10.0.18362 (.NETCoreApp,Version=v5.0)
NU1201: Project CommunityToolkit.WinUI.Input.GazeInteraction is not compatible with uap10.0.18362 (UAP,Version=v10.0.18362) / win10-arm-aot. Project CommunityToolkit.WinUI.Input.GazeInteraction supports: net5.0-windows10.0.18362 (.NETCoreApp,Version=v5.0)
NU1201: Project CommunityToolkit.WinUI.UI.Controls.Input is not compatible with uap10.0.18362 (UAP,Version=v10.0.18362) / win10-arm-aot. Project CommunityToolkit.WinUI.UI.Controls.Input supports: net5.0-windows10.0.18362 (.NETCoreApp,Version=v5.0)
NU1201: Project CommunityToolkit.WinUI.UI.Controls.Media is not compatible with uap10.0.18362 (UAP,Version=v10.0.18362) / win10-arm-aot. Project CommunityToolkit.WinUI.UI.Controls.Media supports: net5.0-windows10.0.18362 (.NETCoreApp,Version=v5.0)
NU1201: Project CommunityToolkit.WinUI.UI.Controls.Core is not compatible with uap10.0.18362 (UAP,Version=v10.0.18362) / win10-arm-aot. Project CommunityToolkit.WinUI.UI.Controls.Core supports: net5.0-windows10.0.18362 (.NETCoreApp,Version=v5.0)
NU1201: Project CommunityToolkit.WinUI.UI is not compatible with uap10.0.18362 (UAP,Version=v10.0.18362) / win10-arm-aot. Project CommunityToolkit.WinUI.UI supports: net5.0-windows10.0.18362 (.NETCoreApp,Version=v5.0)
NU1201: Project CommunityToolkit.WinUI is not compatible with uap10.0.18362 (UAP,Version=v10.0.18362) / win10-arm-aot. Project CommunityToolkit.WinUI supports: net5.0-windows10.0.18362 (.NETCoreApp,Version=v5.0)
NU1201: Project CommunityToolkit.WinUI.Input.GazeInteraction is not compatible with uap10.0.18362 (UAP,Version=v10.0.18362) / win10-arm64-aot. Project CommunityToolkit.WinUI.Input.GazeInteraction supports: net5.0-windows10.0.18362 (.NETCoreApp,Version=v5.0)
NU1201: Project CommunityToolkit.WinUI.UI.Controls.Input is not compatible with uap10.0.18362 (UAP,Version=v10.0.18362) / win10-arm64-aot. Project CommunityToolkit.WinUI.UI.Controls.Input supports: net5.0-windows10.0.18362 (.NETCoreApp,Version=v5.0)
NU1201: Project CommunityToolkit.WinUI.UI.Controls.Media is not compatible with uap10.0.18362 (UAP,Version=v10.0.18362) / win10-arm64-aot. Project CommunityToolkit.WinUI.UI.Controls.Media supports: net5.0-windows10.0.18362 (.NETCoreApp,Version=v5.0)
NU1201: Project CommunityToolkit.WinUI.UI.Controls.Core is not compatible with uap10.0.18362 (UAP,Version=v10.0.18362) / win10-arm64-aot. Project CommunityToolkit.WinUI.UI.Controls.Core supports: net5.0-windows10.0.18362 (.NETCoreApp,Version=v5.0)
NU1201: Project CommunityToolkit.WinUI.UI is not compatible with uap10.0.18362 (UAP,Version=v10.0.18362) / win10-arm64-aot. Project CommunityToolkit.WinUI.UI supports: net5.0-windows10.0.18362 (.NETCoreApp,Version=v5.0)
NU1201: Project CommunityToolkit.WinUI is not compatible with uap10.0.18362 (UAP,Version=v10.0.18362) / win10-arm64-aot. Project CommunityToolkit.WinUI supports: net5.0-windows10.0.18362 (.NETCoreApp,Version=v5.0)
NU1201: Project CommunityToolkit.WinUI.Input.GazeInteraction is not compatible with uap10.0.18362 (UAP,Version=v10.0.18362) / win10-x64. Project CommunityToolkit.WinUI.Input.GazeInteraction supports: net5.0-windows10.0.18362 (.NETCoreApp,Version=v5.0)
NU1201: Project CommunityToolkit.WinUI.UI.Controls.Input is not compatible with uap10.0.18362 (UAP,Version=v10.0.18362) / win10-x64. Project CommunityToolkit.WinUI.UI.Controls.Input supports: net5.0-windows10.0.18362 (.NETCoreApp,Version=v5.0)
NU1201: Project CommunityToolkit.WinUI.UI.Controls.Media is not compatible with uap10.0.18362 (UAP,Version=v10.0.18362) / win10-x64. Project CommunityToolkit.WinUI.UI.Controls.Media supports: net5.0-windows10.0.18362 (.NETCoreApp,Version=v5.0)
NU1201: Project CommunityToolkit.WinUI.UI.Controls.Core is not compatible with uap10.0.18362 (UAP,Version=v10.0.18362) / win10-x64. Project CommunityToolkit.WinUI.UI.Controls.Core supports: net5.0-windows10.0.18362 (.NETCoreApp,Version=v5.0)
NU1201: Project CommunityToolkit.WinUI.UI is not compatible with uap10.0.18362 (UAP,Version=v10.0.18362) / win10-x64. Project CommunityToolkit.WinUI.UI supports: net5.0-windows10.0.18362 (.NETCoreApp,Version=v5.0)
NU1201: Project CommunityToolkit.WinUI is not compatible with uap10.0.18362 (UAP,Version=v10.0.18362) / win10-x64. Project CommunityToolkit.WinUI supports: net5.0-windows10.0.18362 (.NETCoreApp,Version=v5.0)
NU1201: Project CommunityToolkit.WinUI.Input.GazeInteraction is not compatible with uap10.0.18362 (UAP,Version=v10.0.18362) / win10-x64-aot. Project CommunityToolkit.WinUI.Input.GazeInteraction supports: net5.0-windows10.0.18362 (.NETCoreApp,Version=v5.0)
NU1201: Project CommunityToolkit.WinUI.UI.Controls.Input is not compatible with uap10.0.18362 (UAP,Version=v10.0.18362) / win10-x64-aot. Project CommunityToolkit.WinUI.UI.Controls.Input supports: net5.0-windows10.0.18362 (.NETCoreApp,Version=v5.0)
NU1201: Project CommunityToolkit.WinUI.UI.Controls.Media is not compatible with uap10.0.18362 (UAP,Version=v10.0.18362) / win10-x64-aot. Project CommunityToolkit.WinUI.UI.Controls.Media supports: net5.0-windows10.0.18362 (.NETCoreApp,Version=v5.0)
NU1201: Project CommunityToolkit.WinUI.UI.Controls.Core is not compatible with uap10.0.18362 (UAP,Version=v10.0.18362) / win10-x64-aot. Project CommunityToolkit.WinUI.UI.Controls.Core supports: net5.0-windows10.0.18362 (.NETCoreApp,Version=v5.0)
NU1201: Project CommunityToolkit.WinUI.UI is not compatible with uap10.0.18362 (UAP,Version=v10.0.18362) / win10-x64-aot. Project CommunityToolkit.WinUI.UI supports: net5.0-windows10.0.18362 (.NETCoreApp,Version=v5.0)
NU1201: Project CommunityToolkit.WinUI is not compatible with uap10.0.18362 (UAP,Version=v10.0.18362) / win10-x64-aot. Project CommunityToolkit.WinUI supports: net5.0-windows10.0.18362 (.NETCoreApp,Version=v5.0)
NU1201: Project CommunityToolkit.WinUI.Input.GazeInteraction is not compatible with uap10.0.18362 (UAP,Version=v10.0.18362) / win10-x86. Project CommunityToolkit.WinUI.Input.GazeInteraction supports: net5.0-windows10.0.18362 (.NETCoreApp,Version=v5.0)
NU1201: Project CommunityToolkit.WinUI.UI.Controls.Input is not compatible with uap10.0.18362 (UAP,Version=v10.0.18362) / win10-x86. Project CommunityToolkit.WinUI.UI.Controls.Input supports: net5.0-windows10.0.18362 (.NETCoreApp,Version=v5.0)
NU1201: Project CommunityToolkit.WinUI.UI.Controls.Media is not compatible with uap10.0.18362 (UAP,Version=v10.0.18362) / win10-x86. Project CommunityToolkit.WinUI.UI.Controls.Media supports: net5.0-windows10.0.18362 (.NETCoreApp,Version=v5.0)
NU1201: Project CommunityToolkit.WinUI.UI.Controls.Core is not compatible with uap10.0.18362 (UAP,Version=v10.0.18362) / win10-x86. Project CommunityToolkit.WinUI.UI.Controls.Core supports: net5.0-windows10.0.18362 (.NETCoreApp,Version=v5.0)
NU1201: Project CommunityToolkit.WinUI.UI is not compatible with uap10.0.18362 (UAP,Version=v10.0.18362) / win10-x86. Project CommunityToolkit.WinUI.UI supports: net5.0-windows10.0.18362 (.NETCoreApp,Version=v5.0)
NU1201: Project CommunityToolkit.WinUI is not compatible with uap10.0.18362 (UAP,Version=v10.0.18362) / win10-x86. Project CommunityToolkit.WinUI supports: net5.0-windows10.0.18362 (.NETCoreApp,Version=v5.0)
NU1201: Project CommunityToolkit.WinUI.Input.GazeInteraction is not compatible with uap10.0.18362 (UAP,Version=v10.0.18362) / win10-x86-aot. Project CommunityToolkit.WinUI.Input.GazeInteraction supports: net5.0-windows10.0.18362 (.NETCoreApp,Version=v5.0)
NU1201: Project CommunityToolkit.WinUI.UI.Controls.Input is not compatible with uap10.0.18362 (UAP,Version=v10.0.18362) / win10-x86-aot. Project CommunityToolkit.WinUI.UI.Controls.Input supports: net5.0-windows10.0.18362 (.NETCoreApp,Version=v5.0)
NU1201: Project CommunityToolkit.WinUI.UI.Controls.Media is not compatible with uap10.0.18362 (UAP,Version=v10.0.18362) / win10-x86-aot. Project CommunityToolkit.WinUI.UI.Controls.Media supports: net5.0-windows10.0.18362 (.NETCoreApp,Version=v5.0)
NU1201: Project CommunityToolkit.WinUI.UI.Controls.Core is not compatible with uap10.0.18362 (UAP,Version=v10.0.18362) / win10-x86-aot. Project CommunityToolkit.WinUI.UI.Controls.Core supports: net5.0-windows10.0.18362 (.NETCoreApp,Version=v5.0)
NU1201: Project CommunityToolkit.WinUI.UI is not compatible with uap10.0.18362 (UAP,Version=v10.0.18362) / win10-x86-aot. Project CommunityToolkit.WinUI.UI supports: net5.0-windows10.0.18362 (.NETCoreApp,Version=v5.0)
NU1201: Project CommunityToolkit.WinUI is not compatible with uap10.0.18362 (UAP,Version=v10.0.18362) / win10-x86-aot. Project CommunityToolkit.WinUI supports: net5.0-windows10.0.18362 (.NETCoreApp,Version=v5.0)
Failed to restore D:\Projects\WindowsCommunityToolkit\UnitTests\UnitTests.XamlIslands.UWPApp\UnitTests.XamlIslands.UWPApp.csproj (in 234 ms).
Failed to restore D:\Projects\WindowsCommunityToolkit\CommunityToolkit.WinUI.SampleApp\CommunityToolkit.WinUI.SampleApp.csproj (in 2,79 sec).
1>------ Build started: Project: CommunityToolkit.WinUI.Notifications, Configuration: Release Any CPU ------
2>------ Skipped Build: Project: GazeInputTest, Configuration: Release x86 ------
2>Project not selected to build for this solution configuration 
3>------ Skipped Build: Project: GazeInputTest (Package), Configuration: Release x86 ------
3>Project not selected to build for this solution configuration 
4>------ Skipped Build: Project: UnitTests.XamlIslands.UWPApp, Configuration: Release x86 ------
4>Project not selected to build for this solution configuration 
5>------ Skipped Build: Project: UnitTests.XamlIslands, Configuration: Release Any CPU ------
5>Project not selected to build for this solution configuration 
6>------ Skipped Build: Project: UnitTests.XamlIslands.Package, Configuration: Release x86 ------
6>Project not selected to build for this solution configuration 
NuGet package restore failed. Please see Error List window for detailed warnings and errors.
1>CommunityToolkit.WinUI.Notifications -> D:\Projects\WindowsCommunityToolkit\CommunityToolkit.WinUI.Notifications\bin\Release\netstandard1.4\CommunityToolkit.WinUI.Notifications.dll
1>CommunityToolkit.WinUI.Notifications -> D:\Projects\WindowsCommunityToolkit\CommunityToolkit.WinUI.Notifications\bin\Release\uap10.0.19041\CommunityToolkit.WinUI.Notifications.dll
1>CommunityToolkit.WinUI.Notifications -> D:\Projects\WindowsCommunityToolkit\CommunityToolkit.WinUI.Notifications\bin\Release\net461\CommunityToolkit.WinUI.Notifications.dll
1>CommunityToolkit.WinUI.Notifications -> D:\Projects\WindowsCommunityToolkit\CommunityToolkit.WinUI.Notifications\bin\Release\netcoreapp3.1\CommunityToolkit.WinUI.Notifications.dll
1>CommunityToolkit.WinUI.Notifications -> D:\Projects\WindowsCommunityToolkit\CommunityToolkit.WinUI.Notifications\bin\Release\net5.0\CommunityToolkit.WinUI.Notifications.dll
1>CommunityToolkit.WinUI.Notifications -> D:\Projects\WindowsCommunityToolkit\CommunityToolkit.WinUI.Notifications\bin\Release\net5.0-windows10.0.18362.0\CommunityToolkit.WinUI.Notifications.dll
1>CommunityToolkit.WinUI.Notifications -> D:\Projects\WindowsCommunityToolkit\CommunityToolkit.WinUI.Notifications\bin\Release\native\CommunityToolkit.WinUI.Notifications.winmd
7>------ Build started: Project: UITests.App, Configuration: Release x86 ------
8>------ Skipped Build: Project: CommunityToolkit.Win32.WpfCore.SampleApp, Configuration: Release Any CPU ------
8>Project not selected to build for this solution configuration 
9>------ Skipped Build: Project: CommunityToolkit.WinUI.Samples.BackgroundTasks, Configuration: Release x86 ------
9>Project not selected to build for this solution configuration 
10>------ Skipped Build: Project: CommunityToolkit.WinUI.SampleApp, Configuration: Release x86 ------
10>Project not selected to build for this solution configuration 
11>------ Skipped Build: Project: CommunityToolkit.Win32.WpfCore.SampleApp.PackagingProject, Configuration: Release Any CPU ------
11>Project not selected to build for this solution configuration 
12>------ Skipped Build: Project: CommunityToolkit.WinUI.SampleApp.Package, Configuration: Release x86 ------
12>Project not selected to build for this solution configuration 
7>C:\Users\Marcel\.nuget\packages\grpc.tools\2.38.1\build\_protobuf\Google.Protobuf.Tools.targets(291,7): error MSB4064: The "AdditionalProtocArguments" parameter is not supported by the "ProtoCompile" task loaded from assembly: Protobuf.MSBuild, Version=0.0.0.0, Culture=neutral, PublicKeyToken=d754f35622e28bad from the path: C:\Users\Marcel\.nuget\packages\grpc.tools\2.36.4\build\_protobuf\net45\Protobuf.MSBuild.dll. Verify that the parameter exists on the task, the <UsingTask> points to the correct assembly, and it is a settable public instance property.
7>C:\Users\Marcel\.nuget\packages\grpc.tools\2.38.1\build\_protobuf\Google.Protobuf.Tools.targets(280,5): error MSB4063: The "ProtoCompile" task could not be initialized with its input parameters.
7>Done building project "UITests.App.csproj" -- FAILED.
13>------ Build started: Project: UITests.App.Package, Configuration: Release x86 ------
14>------ Build started: Project: UITests.Tests.TAEF, Configuration: Release Any CPU ------
15>------ Skipped Build: Project: UITests.Tests.MSTest, Configuration: Release Any CPU ------
15>Project not selected to build for this solution configuration 
14>UITests.Tests.TAEF -> D:\Projects\WindowsCommunityToolkit\UITests\UITests.Tests.TAEF\bin\Release\net5.0-windows10.0.19041\win10-x86\UITests.Tests.TAEF.dll
13>C:\Program Files\dotnet\sdk\5.0.403\Sdks\Microsoft.NET.Sdk\targets\Microsoft.PackageDependencyResolution.targets(241,5): error NETSDK1004: Assets file 'D:\Projects\WindowsCommunityToolkit\UITests\UITests.App\obj\wappublish\win10-x86\project.assets.json' not found. Run a NuGet package restore to generate this file.
13>Done building project "UITests.App.csproj" -- FAILED.
========== Build: 2 succeeded, 2 failed, 26 up-to-date, 11 skipped ==========

@azchohfi
Copy link
Contributor

azchohfi commented Dec 3, 2021

This is not happening on my box, neither on the build server, so I don't know exactly what is happening.
It seems like this is a known issue:
grpc/grpc#26116
I've found a few possible answers too:
https://stackoverflow.com/questions/67249017/additionalprotocarguments-parameter-is-not-supported-by-the-protocompile-task
and
https://medium.com/@woeterman_94/quickfix-the-additionalprotocarguments-parameter-is-not-supported-by-the-protocompile-task-287f96fdacd2

Not sure if any of them fixes the issue. We don't want to change cache or anything like that so we need to find a better solution. Can you try updating to a newer version of Grpc.* and Google.Protobuf within all the UITests projects? I can't replicate your issue, so I don't know what would fix it.

@marcelwgn
Copy link
Contributor Author

This seemed to fix one of the two projects failing, one project is still failing to build with VS:

[...]
34>------ Rebuild All started: Project: UITests.App, Configuration: Release x86 ------
35>------ Rebuild All started: Project: CommunityToolkit.WinUI.UI.Controls.Markdown.DesignTools, Configuration: Release Any CPU ------
36>------ Rebuild All started: Project: UnitTests.WinUI, Configuration: Release x86 ------
37>------ Skipped Rebuild All: Project: CommunityToolkit.WinUI.SampleApp, Configuration: Release x86 ------
37>Project not selected to build for this solution configuration 
38>------ Skipped Rebuild All: Project: CommunityToolkit.WinUI.SampleApp.Package, Configuration: Release x86 ------
38>Project not selected to build for this solution configuration 
35>CommunityToolkit.WinUI.UI.Controls.Markdown.DesignTools -> D:\Projects\WindowsCommunityToolkit\CommunityToolkit.WinUI.UI.Controls.Markdown\bin\Release\net5.0-windows10.0.18362.0\Design\CommunityToolkit.WinUI.UI.Controls.Markdown.DesignTools.dll
34>CSC : warning CS8785: Generator 'IMessengerRegisterAllGenerator' failed to generate source. It will not contribute to the output and compilation errors may occur as a result. Exception was of type 'ArgumentException' with message 'The hintName 'UITests.App.MainTestHost.cs' of the added source file must be unique within a generator.
34>CSC : warning CS8785: Generator 'IMessengerRegisterAllGenerator' failed to generate source. It will not contribute to the output and compilation errors may occur as a result. Exception was of type 'ArgumentException' with message 'The hintName 'UITests.App.MainTestHost.cs' of the added source file must be unique within a generator.
34>Saved patched .dll to D:\Projects\WindowsCommunityToolkit\UITests\UITests.App\obj\x86\Release\net5.0-windows10.0.19041.0\IIDOptimizer\
34>5 IID calculations/fetches patched
34>UITests.App -> D:\Projects\WindowsCommunityToolkit\UITests\UITests.App\bin\x86\Release\net5.0-windows10.0.19041.0\UITests.App.dll
34>Done building project "UITests.App.csproj".
39>------ Rebuild All started: Project: UITests.App.Package, Configuration: Release x86 ------
40>------ Rebuild All started: Project: UITests.Tests.TAEF, Configuration: Release Any CPU ------
41>------ Skipped Rebuild All: Project: UITests.Tests.MSTest, Configuration: Release Any CPU ------
41>Project not selected to build for this solution configuration 
33>CommunityToolkit.WinUI.UI.Controls -> D:\Projects\WindowsCommunityToolkit\CommunityToolkit.WinUI.UI.Controls\bin\Release\net5.0-windows10.0.18362.0\CommunityToolkit.WinUI.UI.Controls.dll
36>UnitTests.WinUI -> D:\Projects\WindowsCommunityToolkit\UnitTests\UnitTests.WinUI\bin\x86\Release\net5.0-windows10.0.19041.0\UnitTests.WinUI.dll
39>C:\Program Files\dotnet\sdk\5.0.403\Sdks\Microsoft.NET.Sdk\targets\Microsoft.PackageDependencyResolution.targets(241,5): error NETSDK1004: Assets file 'D:\Projects\WindowsCommunityToolkit\UITests\UITests.App\obj\wappublish\win10-x86\project.assets.json' not found. Run a NuGet package restore to generate this file.
39>Done building project "UITests.App.csproj" -- FAILED.
40>UITests.Tests.TAEF -> D:\Projects\WindowsCommunityToolkit\UITests\UITests.Tests.TAEF\bin\Release\net5.0-windows10.0.19041\win10-x86\UITests.Tests.TAEF.dll
========== Rebuild All: 29 succeeded, 1 failed, 11 skipped ==========

However I think this is still somewhat to unsurprising on my machine. Running a NuGet fails, not having the project.assets.json then is not too surprising here. Not sure why NuGet restore fails though, it complains about projects not being compatible with the targeted UAPs for some libraries.

@azchohfi
Copy link
Contributor

azchohfi commented Dec 3, 2021

Do you have the 19041 SDK installed? How about 18362?

@marcelwgn
Copy link
Contributor Author

I have installed all SDKs Visual Studio Installer lets me install:
Screenshot of installed Windows 10 SDKs

@pellea
Copy link

pellea commented Nov 23, 2022

Hello, since I have the same issue, I did not open another one.

NuGet cannot restore the Monaco.Editor 0.10.0 alpha package.
Where can we find it?

@michael-hawker
Copy link
Member

@pellea Alex had built a local version off a branch he made of Monaco that supported the Windows App SDK, it's not in a feed anywhere.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sample app 🖼 testing 🏗️ WinUI 💠 Related to WinUI 3 Version or when paired with External can mean requires fix in WinUI 2/3.
Projects
None yet
Development

No branches or pull requests

4 participants