Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Flutter windows build: Nuget is not installed

I uninstalled Visual Studio 2019 and installed it as 2022.

I reinstalled Flutter. When building Flutter desktop, the following problem is repeated.

If I run it in another project, it works without any problem.

Launching lib\main.dart on Windows in debug mode...
Building Windows application...
Nuget is not installed.
Nuget.exe not found, trying to download or use cached version.
like image 674
Patrick SINT Avatar asked Aug 31 '25 17:08

Patrick SINT


2 Answers

try this, worked for me

  1. (Windows 10 v1709 or greater) Run "winget install Microsoft.NuGet" as administrator and restart VSCode
  2. if didn't work yet download nugget.exe from https://www.nuget.org/downloads and then put it in your windows/system32 folder and restart VSCode
like image 58
Andre Nogueira Avatar answered Sep 02 '25 10:09

Andre Nogueira


1- make sure you have installed Visual Studio

2-

NuGet Package Manager (PM UI and PM Console) is included with Visual Studio. The latest NuGet releases are delivered as part of Visual Studio updates.

HOWEVER: nuget.exe itself is not included with any version of Visual Studio.

so you need to download the latest NuGet Windows x86 Commandline from https://www.nuget.org/downloads

3- put it inside the flutter sdk folder or any folder you like

4- copy the folder path

5- in windows serach, search for env so you can put it as system variables. edit path with a new line and past the folder path

6- restart android studio

7- congrats

there's a video on youtube for the exact steps: https://www.youtube.com/watch?v=J5b5sj6mG8M

like image 41
mhdjazmati Avatar answered Sep 02 '25 09:09

mhdjazmati