dotnet / Comet

Comet is an MVU UIToolkit written in C#
MIT License
1.65k stars 117 forks source link

Build Errors on new Comet Project #239

Closed StuartFerguson closed 2 years ago

StuartFerguson commented 2 years ago

I have created a new Windows VM with Windows 10 Pro, Latest VS 2022 Preview and Latest .Net code installation to run through the tutorial in the Getting started page (https://github.com/dotnet/Comet/wiki/Getting-Started),

The project is created fine under VS Code but when i buuld it with 'dotnet build -t:Run -f net6.0-android' I get the following errors:

C:\Program Files\dotnet\sdk\6.0.200-preview.22055.15\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(356,5): error NETSDK1127: The targeting pack Microsoft.Maui.Core is not installed. Please restore and try again. [C:\Users\Stuart Ferguson\source\repos\cometdemo\HelloComet\HelloComet\HelloComet.csproj]
C:\Program Files\dotnet\sdk\6.0.200-preview.22055.15\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(356,5): error NETSDK1127: The targeting pack Microsoft.Maui.Controls is not installed. Please restore and try again. [C:\Users\Stuart Ferguson\source\repos\cometdemo\HelloComet\HelloComet\HelloComet.csproj]
C:\Program Files\dotnet\sdk\6.0.200-preview.22055.15\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(356,5): error NETSDK1127: The targeting pack Microsoft.Maui.Essentials is not installed. Please restore and try again. [C:\Users\Stuart Ferguson\source\repos\cometdemo\HelloComet\HelloComet\HelloComet.csproj]
    0 Warning(s)
    3 Error(s)

I have installed the follwing workloads via a CLI

maui maui-android maui-ios maui-maccatalyst maui-windows

Any help on this would be appreciated.

Clancey commented 2 years ago

Comet is not compatible with preview 12, you need to install preview 11

dotnet workload install maui ` --from-rollback-file https://aka.ms/dotnet/maui/preview.11.json ` --source https://aka.ms/dotnet6/nuget/index.json ` --source https://api.nuget.org/v3/index.json

prashantvc commented 2 years ago

Is it compatible with .NET and Maui RC release? I am getting the same issue

Clancey commented 2 years ago

Yes, you will need to follow the install instructions for the RC : https://devblogs.microsoft.com/dotnet/dotnet-maui-rc-1/ I also just updated the readme, so it installs the right bits:

``dotnet workload install maui --from-rollback-file https://aka.ms/dotnet/maui/6.0.300/rc.1.json ` --source https://api.nuget.org/v3/index.json

1w1f commented 2 years ago

I use the command from https://github.com/dotnet/maui/blob/main/.github/DEVELOPMENT.md

1w1f commented 2 years ago

I use this dotnet workload install maui --skip-sign-check --from-rollback-file https://aka.ms/dotnet/maui/net6.0.json --source https://pkgs.dev.azure.com/dnceng/public/_packaging/darc-pub-dotnet-runtime-531f715f/nuget/v3/index.json --source https://pkgs.dev.azure.com/dnceng/public/_packaging/darc-pub-dotnet-emsdk-3f6c45a2/nuget/v3/index.json --source https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet6/nuget/v3/index.json --source https://api.nuget.org/v3/index.json

here is the error C:\Program Files\dotnet\sdk\6.0.400\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.FrameworkR eferenceResolution.targets(358,5): error NETSDK1127: 未安装目标包 Microsoft.Maui.Core。请还原并重试。 [C:\Use rs\user1\Desktop\测试项目\cometTest\RideTheComet\RideTheComet\RideTheComet.csproj] C:\Program Files\dotnet\sdk\6.0.400\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.FrameworkR eferenceResolution.targets(358,5): error NETSDK1127: 未安装目标包 Microsoft.Maui.Controls。请还原并重试。 [C: \Users\user1\Desktop\测试项目\cometTest\RideTheComet\RideTheComet\RideTheComet.csproj] C:\Program Files\dotnet\sdk\6.0.400\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.FrameworkR eferenceResolution.targets(358,5): error NETSDK1127: 未安装目标包 Microsoft.Maui.Essentials。请还原并重试。 [ C:\Users\user1\Desktop\测试项目\cometTest\RideTheComet\RideTheComet\RideTheComet.csproj] 0 个警告 3 个错误

my sdk version is 6.0.400

Ferenesht commented 2 years ago

Hey! Any updates on this? Trying to run the command for installing right bits give me an other error:

Workload installation failed: Failed to install manifest microsoft.net.sdk.android version 32.0.301: microsoft.net.sdk.android.manifest-6.0.400::32.0.301 is not found in NuGet feeds https://api.nuget.org/v3/index.json"

Sorry for hijacking but I'm so hyped for Comet!