sinsedrix
sinsedrix

Reputation: 4775

VS2022 CS8785 'CodeBehindGenerator' failed to generate MauiXaml

I work on a MAUI project on Visual Studio 2022 preview 3. At compile time, I get the following warning:

CS8785 'CodeBehindGenerator' failed to generate MauiXaml

Then the code behind is not generated, so the project doesn't compile. The generate action is set to MauiXaml for the xaml files. Is there a known way to repair the code generator?

What I already tried:

¤ .NET MAUI Check v0.7.3.0 ¤
────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
This tool will attempt to evaluate your .NET MAUI development environment.
If problems are detected, this tool may offer the option to try and fix them for you, or suggest a way to fix them
yourself.

Thanks for choosing .NET MAUI!
────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
» Synchronizing configuration... ok
» Scheduling appointments... ok

> OpenJDK 11.0 Checkup...
  - 1.8.0-25 (C:\Program Files\Android\Jdk\microsoft_dist_openjdk_1.8.0.25)
  - 11.0.10 (C:\Program Files\Microsoft\jdk-11.0.10.9-hotspot\bin\..)

> Visual Studio 17.0.0-pre.3.0 Checkup...
  - 17.0.0-pre.3.0 - C:\Program Files\Microsoft Visual Studio\2022\Preview

> Android SDK Checkup...
  - emulator (30.1.5)
  - build-tools;30.0.2 (30.0.2)
  - platforms;android-30 (3)
  - system-images;android-30;google_apis;x86 (9)
  - platform-tools (30.0.4)
  - cmdline-tools;3.0 (3.0)

> Android Emulator Checkup...
  - Emulator: tablet_pie_9_0_-_api_30_-_x64 found.

> .NET SDK Checkup...
  - 5.0.400 - C:\Program Files\dotnet\sdk\5.0.400
  - 6.0.100-preview.7.21379.14 - C:\Program Files\dotnet\sdk\6.0.100-preview.7.21379.14

> .NET SDK - Workload Deduplication Checkup...

> Edge WebView2 Checkup...
  - Found Edge WebView2 version 92.0.902.67

> .NET SDK - Workloads (6.0.100-preview.7.21379.14) Checkup...
  - android-aot (Microsoft.NET.Sdk.Android.Manifest-6.0.100 : 30.0.100-preview.7.110) installed.
  - ios (Microsoft.NET.Sdk.iOS.Manifest-6.0.100 : 15.0.100-preview.7.230) installed.
  - maccatalyst (Microsoft.NET.Sdk.MacCatalyst.Manifest-6.0.100 : 15.0.100-preview.7.230) installed.
  - tvos (Microsoft.NET.Sdk.tvOS.Manifest-6.0.100 : 15.0.100-preview.7.230) installed.
  - macos (Microsoft.NET.Sdk.macOS.Manifest-6.0.100 : 12.0.100-preview.7.230) installed.
  - maui (Microsoft.NET.Sdk.Maui.Manifest-6.0.100 : 6.0.100-preview.7.1345) installed.
  - wasm-tools (microsoft.net.workload.mono.toolchain.manifest-6.0.100 : 6.0.0-preview.7.21377.19) installed.
  - microsoft-net-sdk-emscripten (microsoft.net.workload.emscripten.manifest-6.0.100 : 6.0.0-preview.7.21377.2)
installed.
────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────

- Congratulations, everything looks great!

Upvotes: 2

Views: 779

Answers (0)

Related Questions