-
Notifications
You must be signed in to change notification settings - Fork 1.9k
"dotnet build" complains about missing nuget packages #12762
Description
Description
I tried to build maui main branch with dotnet cake --target=VS --pack and tried with the opening Visual Studio in version 17.4.4 to build an already existing maui application and end up in this situation like here #3923. I am right now not sure if manual install the workload fixed it (BTW
the weird part is that also if you remove the android target from csproj and remove the android platform folder it still requires it). Anyway I end up now having issue that basic nuget packages could not be found:
VS log:
1>------ Erstellen gestartet: Projekt: MauiApp3, Konfiguration: Debug Any CPU ------
Fehler beim Wiederherstellen des NuGet-Pakets. Detaillierte Warnungen und Fehler finden Sie im Fenster mit der Fehlerliste.
Fehler beim Wiederherstellen von "C:\Users\trivalik\source\repos\MauiApp3\MauiApp3\MauiApp3.csproj" (in "2,28 sec").
1>C:\Users\trivalik\source\repos\MauiApp3\MauiApp3\MauiApp3.csproj : error NU1102: Das Paket "Microsoft.AspNetCore.App.Runtime.win-x64" der Version (= 7.0.0-rtm.22512.1) wurde nicht gefunden.
1>C:\Users\trivalik\source\repos\MauiApp3\MauiApp3\MauiApp3.csproj : error NU1102: - 110 Version(en) gefunden in "nuget.org" [ Nächste Version: 7.0.0 ]
1>C:\Users\trivalik\source\repos\MauiApp3\MauiApp3\MauiApp3.csproj : error NU1102: - 0 Version(en) gefunden in C:\Users\trivalik\source\repos\maui\bin\dotnet\library-packs.
1>C:\Users\trivalik\source\repos\MauiApp3\MauiApp3\MauiApp3.csproj : error NU1102: Das Paket "Microsoft.NETCore.App.Runtime.win-x64" der Version (= 7.0.0-rtm.22511.4) wurde nicht gefunden.
1>C:\Users\trivalik\source\repos\MauiApp3\MauiApp3\MauiApp3.csproj : error NU1102: - 109 Version(en) gefunden in "nuget.org" [ Nächste Version: 7.0.0 ]
1>C:\Users\trivalik\source\repos\MauiApp3\MauiApp3\MauiApp3.csproj : error NU1102: - 0 Version(en) gefunden in C:\Users\trivalik\source\repos\maui\bin\dotnet\library-packs.
1>Die Erstellung des Projekts "MauiApp3.csproj" ist abgeschlossen -- FEHLER.
dotnet build log (with set environment variables
Line 95 in cb2014b
| void SetDotNetEnvironmentVariables(string dotnetDir) |
C:\Users\trivalik\source\repos\MauiApp3>dotnet build
MSBuild version 17.5.0-preview-22507-04+9e6f1455a for .NET
Wiederherzustellende Projekte werden ermittelt...
C:\Users\trivalik\source\repos\MauiApp3\MauiApp3\MauiApp3.csproj : error NU1102: Das Paket "Microsoft.NETCore.App.Runtime.w
in-x64" der Version (= 7.0.0-rtm.22511.4) wurde nicht gefunden. [C:\Users\trivalik\source\repos\MauiApp3\MauiApp3.sln]
C:\Users\trivalik\source\repos\MauiApp3\MauiApp3\MauiApp3.csproj : error NU1102: - 109 Version(en) gefunden in "nuget.org
" [ Nächste Version: 7.0.0 ] [C:\Users\trivalik\source\repos\MauiApp3\MauiApp3.sln]
C:\Users\trivalik\source\repos\MauiApp3\MauiApp3\MauiApp3.csproj : error NU1102: - 0 Version(en) gefunden in C:\Users\rob
o\source\repos\maui\bin\dotnet\library-packs. [C:\Users\trivalik\source\repos\MauiApp3\MauiApp3.sln]
C:\Users\trivalik\source\repos\MauiApp3\MauiApp3\MauiApp3.csproj : error NU1102: Das Paket "Microsoft.AspNetCore.App.Runtim
e.win-x64" der Version (= 7.0.0-rtm.22512.1) wurde nicht gefunden. [C:\Users\trivalik\source\repos\MauiApp3\MauiApp3.sln]
C:\Users\trivalik\source\repos\MauiApp3\MauiApp3\MauiApp3.csproj : error NU1102: - 110 Version(en) gefunden in "nuget.org
" [ Nächste Version: 7.0.0 ] [C:\Users\trivalik\source\repos\MauiApp3\MauiApp3.sln]
C:\Users\trivalik\source\repos\MauiApp3\MauiApp3\MauiApp3.csproj : error NU1102: - 0 Version(en) gefunden in C:\Users\rob
o\source\repos\maui\bin\dotnet\library-packs. [C:\Users\trivalik\source\repos\MauiApp3\MauiApp3.sln]
Fehler beim Wiederherstellen von "C:\Users\trivalik\source\repos\MauiApp3\MauiApp3\MauiApp3.csproj" (in "2,21 sec").
Fehler beim Buildvorgang.
C:\Users\trivalik\source\repos\MauiApp3\MauiApp3\MauiApp3.csproj : error NU1102: Das Paket "Microsoft.NETCore.App.Runtime.w
in-x64" der Version (= 7.0.0-rtm.22511.4) wurde nicht gefunden. [C:\Users\trivalik\source\repos\MauiApp3\MauiApp3.sln]
C:\Users\trivalik\source\repos\MauiApp3\MauiApp3\MauiApp3.csproj : error NU1102: - 109 Version(en) gefunden in "nuget.org
" [ Nächste Version: 7.0.0 ] [C:\Users\trivalik\source\repos\MauiApp3\MauiApp3.sln]
C:\Users\trivalik\source\repos\MauiApp3\MauiApp3\MauiApp3.csproj : error NU1102: - 0 Version(en) gefunden in C:\Users\rob
o\source\repos\maui\bin\dotnet\library-packs. [C:\Users\trivalik\source\repos\MauiApp3\MauiApp3.sln]
C:\Users\trivalik\source\repos\MauiApp3\MauiApp3\MauiApp3.csproj : error NU1102: Das Paket "Microsoft.AspNetCore.App.Runtim
e.win-x64" der Version (= 7.0.0-rtm.22512.1) wurde nicht gefunden. [C:\Users\trivalik\source\repos\MauiApp3\MauiApp3.sln]
C:\Users\trivalik\source\repos\MauiApp3\MauiApp3\MauiApp3.csproj : error NU1102: - 110 Version(en) gefunden in "nuget.org
" [ Nächste Version: 7.0.0 ] [C:\Users\trivalik\source\repos\MauiApp3\MauiApp3.sln]
C:\Users\trivalik\source\repos\MauiApp3\MauiApp3\MauiApp3.csproj : error NU1102: - 0 Version(en) gefunden in C:\Users\rob
o\source\repos\maui\bin\dotnet\library-packs. [C:\Users\trivalik\source\repos\MauiApp3\MauiApp3.sln]
0 Warnung(en)
2 Fehler
Verstrichene Zeit 00:00:05.64
Workloadupdates sind verfügbar. Führen Sie "dotnet workload list" aus, um weitere Informationen zu erhalten.
C:\Users\trivalik\source\repos\MauiApp3>dotnet workload list
Installierte Workload-ID Manifestversion Installationsquelle
-------------------------------------------------------------------------------------
android 33.0.4/7.0.100 SDK 7.0.100, VS 17.4.33213.308
ios 16.2.1004/7.0.100 SDK 7.0.100, VS 17.4.33213.308
maccatalyst 16.2.1004/7.0.100 SDK 7.0.100, VS 17.4.33213.308
macos 13.1.1004/7.0.100 SDK 7.0.100
tizen 7.0.100/7.0.100 SDK 7.0.100
tvos 16.1.1501/7.0.100 SDK 7.0.100
maui-windows 7.0.100-dev/7.0.100 VS 17.4.33213.308
maui-maccatalyst 7.0.100-dev/7.0.100 VS 17.4.33213.308
maui-ios 7.0.100-dev/7.0.100 VS 17.4.33213.308
maui-android 7.0.100-dev/7.0.100 VS 17.4.33213.308
Verwenden Sie "dotnet workload search", um zusätzliche zu installierende Workloads zu finden.
Updates sind für die folgenden Workloads verfügbar: android ios maccatalyst macos tizen tvos. Führen Sie "dotnet workload update" aus, um die neueste Updates zu erhalten.
C:\Users\trivalik\source\repos\MauiApp3>where dotnet
C:\Users\trivalik\source\repos\maui\bin\dotnet\dotnet.exe
C:\Program Files\dotnet\dotnet.exe
Steps to Reproduce
- get main branch (41553e1)
- open cmd and start
dotnet cake --target=VS --pack(restore seems not necessary after once done?) - wait until VS opened and close the Micorosft.Maui solution (stucks some times and VS reports sometimes some exceptions about loading the project), on final test I had no such VS exceptions or any other trouble, so that this is not the root cause
- create new maui app and press "Windows Machine" to run --> end up in missing nuget packages
To test manually with dotnet at cmd I used to prepare:
set PATH=C:/Users/trivalik/source/repos/maui/bin/dotnet;%PATH%
set DOTNET_INSTALL_DIR=C:/Users/trivalik/source/repos/maui/bin/dotnet
set DOTNET_MSBUILD_SDK_RESOLVER_CLI_DIR=C:/Users/trivalik/source/repos/maui/bin/dotnet
set DOTNET_MULTILEVEL_LOOKUP=0
set DOTNET_ROOT=C:/Users/trivalik/source/repos/maui/bin/dotnet
set MSBuildEnableWorkloadResolver=true
Link to public reproduction project repository
https://github.com/dotnet/maui/
Version with bug
Unknown/Other (please specify)
Last version that worked well
Unknown/Other
Affected platforms
Android, Windows, I was not able test on other platforms
Affected platform versions
Windows SDK 19041 and 20348 (build number manually changed in csproj)
Did you find any workaround?
No.
Relevant log output
No response