dotnet / Comet

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

Failed when running : dotnet build RideTheComet -t:Run -f net6.0-android #261

Closed gfmoore closed 2 years ago

gfmoore commented 2 years ago
C:\Users\Gordon\Documents\Applications\Comet                                                  
λ dotnet build RideTheComet -t:Run -f net6.0-android                                          
Microsoft (R) Build Engine version 17.2.0+41abc5629 for .NET                                  
Copyright (C) Microsoft Corporation. All rights reserved.                                     

  Determining projects to restore...                                                          
  Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/dnceng/9ee6d478-d28 
  8-47f7-aacc-f6e6d082ae6d/_packaging/825db618-e3eb-4426-ba54-b1d6e6c944d8/nuget/v3/flat2/xam 
  arin.androidx.navigation.ui/index.json'.                                                    
  The SSL connection could not be established, see inner exception.                           
    Unable to read data from the transport connection: An existing connection was forcibly cl 
  osed by the remote host..                                                                   
    An existing connection was forcibly closed by the remote host.                            
  Restored C:\Users\Gordon\Documents\Applications\Comet\RideTheComet\RideTheComet\RideTheCome 
  t.csproj (in 16.3 sec).                                                                     
C:\Program Files\dotnet\packs\Microsoft.Android.Sdk.Windows\32.0.301\tools\Xamarin.Android.Co 
mmon.targets(521,3): error XA1018: Specified AndroidManifest file does not exist: C:\Users\Go 
rdon\Documents\Applications\Comet\RideTheComet\RideTheComet\AndroidManifest.xml. [C:\Users\Go 
rdon\Documents\Applications\Comet\RideTheComet\RideTheComet\RideTheComet.csproj]              

Build FAILED.                                                                                 

C:\Program Files\dotnet\packs\Microsoft.Android.Sdk.Windows\32.0.301\tools\Xamarin.Android.Co 
mmon.targets(521,3): error XA1018: Specified AndroidManifest file does not exist: C:\Users\Go 
rdon\Documents\Applications\Comet\RideTheComet\RideTheComet\AndroidManifest.xml. [C:\Users\Go 
rdon\Documents\Applications\Comet\RideTheComet\RideTheComet\RideTheComet.csproj]              
    0 Warning(s)                                                                              
    1 Error(s)                                                                                

Why does it ask projects to restore? I don't have any?

gfmoore commented 2 years ago

Oh I'm on either Maui preview 3 or hopefully more likely the GA but who knows?

Clancey commented 2 years ago

So versions matter, the latest nuget requires the GA. Also, the nuget restore failing is the real issue. The android manifest is generated. It needs the nugets to generate.

gfmoore commented 2 years ago

Ok, so er, what do I need to do? :)

Clancey commented 2 years ago

Make sure your on GA version of Maui. Also, check the nuget.config. Something is sending it to 'https://pkgs.dev.azure.com/dnceng/9ee6d478-d28 8-47f7-aacc-f6e6d082ae6d/_packaging/825db618-e3eb-4426-ba54-b1d6e6c944d8/nuget/v3/flat2/xam arin.androidx.navigation.ui/index.json' I am pretty sure you don't need any of the preview things in the nuget.config anymore.

gfmoore commented 2 years ago

I have just abefore I saw Comet opened a stackoverflow post to find out how to work out what version of Maui I'm on. Thanks for your insanely quick replies, but here in the UK it's now the weekend... AND BEER :)

Clancey commented 2 years ago

So you have something wrong with your nuget setup, I would delete the nuget.config if there is one, or remove some of your preview bits from the nuget sources.

Upgrade to the latest Maui, and you should be good.

gfmoore commented 2 years ago

Okay, two what seem to be obvious questions but for which I cannot find the answer.

How do I check the Maui version I'm on?

How do I upgrade?

I use Visual Studio and I'm on 2022 community edition 17.3.0 Preview 1.1. I use Visual Studio Installer to check things, but all seems good.

Sorry, but probably a noob question, but I am new to this and just feeling my way around :)

Clancey commented 2 years ago

@Redth ^^

saint4eva commented 2 years ago

Okay, two what seem to be obvious questions but for which I cannot find the answer.

How do I check the Maui version I'm on?

How do I upgrade?

I use Visual Studio and I'm on 2022 community edition 17.3.0 Preview 1.1. I use Visual Studio Installer to check things, but all seems good.

Sorry, but probably a noob question, but I am new to this and just feeling my way around :)

dotnet workload update

gfmoore commented 2 years ago

Ok so λ dotnet workload update

No workloads installed for this feature band. To update workloads installed with earlier SDK versions, include the --from-previous-sdk option.
Skipping NuGet package signature verification.
Updated advertising manifest microsoft.net.sdk.macos.
Updated advertising manifest microsoft.net.workload.emscripten.
Updated advertising manifest microsoft.net.sdk.maccatalyst.
Updated advertising manifest microsoft.net.sdk.android.
Updated advertising manifest microsoft.net.sdk.tvos.
Updated advertising manifest microsoft.net.sdk.maui.
Updated advertising manifest microsoft.net.sdk.ios.
Updated advertising manifest microsoft.net.workload.mono.toolchain.
No workloads installed for this feature band. To update workloads installed with earlier SDK versions, include the --from-previous-sdk option.

Successfully updated workload(s): .

Then

 dotnet new -i Clancey.Comet.Templates.Multiplatform
The following template packages will be installed:
   Clancey.Comet.Templates.Multiplatform

Clancey.Comet.Templates.Multiplatform is already installed, version: 0.4.344-beta, it will be replaced with version .
Clancey.Comet.Templates.Multiplatform::0.4.344-beta was successfully uninstalled.
Success: Clancey.Comet.Templates.Multiplatform::0.3.45-beta installed the following templates:
Template Name        Short Name  Language  Tags
-------------------  ----------  --------  -----------------------------------------------
.NET MAUI Comet App  comet       [C#]      Comet/MAUI/Android/iOS/macOS/Mac Catalyst/WinUI

Then

λ dotnet new --install Clancey.Comet.Templates.Multiplatform::0.4.344-beta
The following template packages will be installed:
   Clancey.Comet.Templates.Multiplatform::0.4.344-beta

Clancey.Comet.Templates.Multiplatform is already installed, version: 0.3.45-beta, it will be replaced with version 0.4.344-beta.
Clancey.Comet.Templates.Multiplatform::0.3.45-beta was successfully uninstalled.
Success: Clancey.Comet.Templates.Multiplatform::0.4.344-beta installed the following templates:
Template Name        Short Name  Language  Tags
-------------------  ----------  --------  -----------------------------------------------
.NET MAUI Comet App  comet       [C#]      Comet/MAUI/Android/iOS/macOS/Mac Catalyst/WinUI

Then

λ dotnet new comet -n RideTheComet --force
The template ".NET MAUI Comet App" was created successfully.

Yay, I'm away for the ride - when I get a mo :)

Thanks all