2

I tried to run/debug my application on the desktop (after installing visual studio 2019 with all defaults) but I can't :) and this error occurred:

D:\Visual Studio IDE\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(240,5): error MSB8066: Custom build for 'D:\Location\Some Location\MyFlutterAppLocation\build\windows\CMakeFiles\a50fa560346c71769b697565b5a2d59b\flutter_windows.dll.rule;D:\Location\MyFlutterAppLocation\build\windows\CMakeFiles\eb8cecdef0b53de6eb232004d53dfd8a\flutter_assemble.rule' exited with code 1. [D:\Location\Some Location\MyFlutterAppLocation\build\windows\flutter\flutter_assemble.vcxproj]
Exception: Build process failed.
Wai Ha Lee
  • 8,598
  • 83
  • 57
  • 92
Soheil_PFP
  • 121
  • 1
  • 3
  • 7

1 Answers1

4
  • Few times when I faced a .vcxproj error, I had a previously built .exe process running, even after closing it. I ended the .exe via task manager and the issue was solved. You can spot the running build using the flutter icon or the supplied app icon.

  • In another instance, I faced a similar error after I interrupted previous flutter run. In this case, I wasn't able to spot the .exe as it wasn't completely built. I don't know which process is specifically using .vcxproj. Hence I resorted to a cleaning of the project:

    flutter clean
    flutter create --platforms=windows,web,android .
    flutter run
    

    Though this second case doesn't pinpoint the source of the error, I was happy to have solved it without restarting VSCode or signing out of windows.

Melvin Calvin
  • 143
  • 10