Skip to content

[Windows] Build failed without clalify error if asset file not exist  #97065

@ivk1800

Description

@ivk1800

Steps to Reproduce

  1. create new project flutter create myapp
  2. add to pubspec not exit asset file:
flutter:
  assets:
    - assets/somefile.txt
  1. check warning in your IDE
  2. run app

actual result:
build failed with error:

C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(240,5): error MSB8066: пользовательская сборка для "..\myapp\build\windows\CMakeFiles\2dc32e292af62a6e4b8b352773afe775\flutter_windows.dll.rule;..\myapp\build\windows\CMakeFiles\469176a6d3b8459cb97902e5168c5d4b\flutter_assemble.rule" завершила работу с кодом 1. [..\myapp\build\windows\flutter\flutter_assemble.vcxproj]
Exception: Build process failed.

expected result:
the error clarify the asset is missing

flutter doctor

[✓] Flutter (Channel stable, 2.8.1, on Microsoft Windows [Version 10.0.19042.1466], locale ru-RU)
• Flutter version 2.8.1 at [some_path]
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 77d935a (5 weeks ago), 2021-12-16 08:37:33 -0800
• Engine revision 890a5fca2e
• Dart version 2.15.1

[✓] Visual Studio - develop for Windows (Visual Studio Community 2019 16.9.2)
• Visual Studio at C:\Program Files (x86)\Microsoft Visual Studio\2019\Community
• Visual Studio Community 2019 version 16.9.31112.23
• Windows 10 SDK version 10.0.19041.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work lista: buildBuilding flutter applications with the toola: desktopRunning on desktopgood first issueRelatively approachable for first-time contributorsplatform-windowsBuilding on or for Windows specificallyteam-windowsOwned by the Windows platform teamtoolAffects the "flutter" command-line tool. See also t: labels.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions