Das Erstellen eines neuen .NET 9.0 MAUI-Projekts schlägt mit 13 Fehlern fehlC#

Ein Treffpunkt für C#-Programmierer
Guest
 Das Erstellen eines neuen .NET 9.0 MAUI-Projekts schlägt mit 13 Fehlern fehl

Post by Guest »

Wie der Titel schon sagt, schlägt die Erstellung des Projekts fehl und es werden 13 Build-Fehler angezeigt. Ich habe Visual Studio 2022 kürzlich aktualisiert und alle erforderlichen Optionen aktiviert. Das Erstellen und Erstellen eines neuen Projekts stürzt sofort ab.
Für weitere Informationen führe ich es auf einem Windows-Computer aus, der bei net9.0-windows10.0.19041.0< abstürzt /strong>.
Es werden die folgenden Fehler angezeigt

Code: Select all

1>C:\Users\115al\Documents\GitHub\5e-Monster-Randomiser-.NET-Maui-App\5e Randomiser\obj\Debug\net9.0-windows10.0.19041.0\win10-x64\intermediatexaml\WinRT.SourceGenerator\Generator.WinRTAotSourceGenerator\_5e_Randomiser.WinUI.App.WinRTVtable.g.cs(4,40,4,53): error CS0118: 'global::WinRT' is a namespace but is used like a type
1>C:\Users\115al\Documents\GitHub\5e-Monster-Randomiser-.NET-Maui-App\5e Randomiser\obj\Debug\net9.0-windows10.0.19041.0\win10-x64\intermediatexaml\WinRT.SourceGenerator\Generator.WinRTAotSourceGenerator\_5e_Randomiser.WinUI.App.WinRTVtable.g.cs(4,57,4,80): error CS0103: The name 'RandomiserVtableClasses' does not exist in the current context
1>C:\Users\115al\Documents\GitHub\5e-Monster-Randomiser-.NET-Maui-App\5e Randomiser\obj\Debug\net9.0-windows10.0.19041.0\win10-x64\intermediatexaml\WinRT.SourceGenerator\Generator.WinRTAotSourceGenerator\_5e_Randomiser.WinUI.App.WinRTVtable.g.cs(4,2,4,122): error CS1729: 'WinRTExposedTypeAttribute' does not contain a constructor that takes 3 arguments
1>C:\Users\115al\Documents\GitHub\5e-Monster-Randomiser-.NET-Maui-App\5e Randomiser\obj\Debug\net9.0-windows10.0.19041.0\win10-x64\intermediatexaml\WinRT.SourceGenerator\Generator.WinRTAotSourceGenerator\_5e_Randomiser.App.WinRTVtable.g.cs(4,40,4,53): error CS0118: 'global::WinRT' is a namespace but is used like a type
1>C:\Users\115al\Documents\GitHub\5e-Monster-Randomiser-.NET-Maui-App\5e Randomiser\obj\Debug\net9.0-windows10.0.19041.0\win10-x64\intermediatexaml\WinRT.SourceGenerator\Generator.WinRTAotSourceGenerator\_5e_Randomiser.App.WinRTVtable.g.cs(4,57,4,80): error CS0103: The name 'RandomiserVtableClasses' does not exist in the current context
1>C:\Users\115al\Documents\GitHub\5e-Monster-Randomiser-.NET-Maui-App\5e Randomiser\obj\Debug\net9.0-windows10.0.19041.0\win10-x64\intermediatexaml\WinRT.SourceGenerator\Generator.WinRTAotSourceGenerator\_5e_Randomiser.App.WinRTVtable.g.cs(4,2,4,121): error CS1729: 'WinRTExposedTypeAttribute' does not contain a constructor that takes 3 arguments
1>C:\Users\115al\Documents\GitHub\5e-Monster-Randomiser-.NET-Maui-App\5e Randomiser\obj\Debug\net9.0-windows10.0.19041.0\win10-x64\intermediatexaml\WinRT.SourceGenerator\Generator.WinRTAotSourceGenerator\_5e_Randomiser.MainPage.WinRTVtable.g.cs(4,40,4,53): error CS0118: 'global::WinRT' is a namespace but is used like a type
1>C:\Users\115al\Documents\GitHub\5e-Monster-Randomiser-.NET-Maui-App\5e Randomiser\obj\Debug\net9.0-windows10.0.19041.0\win10-x64\intermediatexaml\WinRT.SourceGenerator\Generator.WinRTAotSourceGenerator\_5e_Randomiser.MainPage.WinRTVtable.g.cs(4,57,4,80): error CS0103: The name 'RandomiserVtableClasses' does not exist in the current context
1>C:\Users\115al\Documents\GitHub\5e-Monster-Randomiser-.NET-Maui-App\5e Randomiser\obj\Debug\net9.0-windows10.0.19041.0\win10-x64\intermediatexaml\WinRT.SourceGenerator\Generator.WinRTAotSourceGenerator\_5e_Randomiser.MainPage.WinRTVtable.g.cs(4,2,4,121): error CS1729: 'WinRTExposedTypeAttribute' does not contain a constructor that takes 3 arguments
1>C:\Users\115al\Documents\GitHub\5e-Monster-Randomiser-.NET-Maui-App\5e Randomiser\obj\Debug\net9.0-windows10.0.19041.0\win10-x64\intermediatexaml\WinRT.SourceGenerator\Generator.WinRTAotSourceGenerator\_5e_Randomiser.AppShell.WinRTVtable.g.cs(4,40,4,53): error CS0118: 'global::WinRT' is a namespace but is used like a type
1>C:\Users\115al\Documents\GitHub\5e-Monster-Randomiser-.NET-Maui-App\5e Randomiser\obj\Debug\net9.0-windows10.0.19041.0\win10-x64\intermediatexaml\WinRT.SourceGenerator\Generator.WinRTAotSourceGenerator\_5e_Randomiser.AppShell.WinRTVtable.g.cs(4,57,4,80): error CS0103: The name 'RandomiserVtableClasses' does not exist in the current context
1>C:\Users\115al\Documents\GitHub\5e-Monster-Randomiser-.NET-Maui-App\5e Randomiser\obj\Debug\net9.0-windows10.0.19041.0\win10-x64\intermediatexaml\WinRT.SourceGenerator\Generator.WinRTAotSourceGenerator\_5e_Randomiser.AppShell.WinRTVtable.g.cs(4,2,4,121): error CS1729: 'WinRTExposedTypeAttribute' does not contain a constructor that takes 3 arguments
1>Done building project "5e Randomiser.csproj"  -- FAILED.
Ich habe die folgenden Korrekturen versucht:

Code: Select all

dotnet clean
dotnet build

Code: Select all

dotnet workload install maui-windows

Code: Select all

Re-Creating a new project

Code: Select all

dotnet restore
dotnet build

Code: Select all

Installing .NET 9.0 through - [link][1]

[1]: https://dotnet.microsoft.com/en-us/download/dotnet/thank-you/sdk-9.0.101-windows-x64-installer

Ich weiß nicht wirklich, was ich sonst noch tun könnte, um das Problem zu beheben, da mir nicht einmal KI helfen konnte.

Quick Reply

Change Text Case: 
   
  • Similar Topics
    Replies
    Views
    Last post