Run into error MSB6006: "clang-cl.exe" while building on Windows
I often use Rive and for the first time I encounter this error that occurs when building on WIndows 11. Previously, this error did not occur, because after i build a new project, the following appears:
Launching lib\main.dart on Windows in debug mode...
lib\main.dart:1
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Microsoft\VC\v160\Microsoft.Cpp.ClangCl.Common.targets(255,5): error MSB6006: "clang-cl.exe" �����訫��� � ����� 1. [C:\Programming\flutterprojects\diploma\build\windows\plugins\rive_common\rive_common_plugin.vcxproj]
Exception: Build process failed.
It fixes, when i delete rive package from pubspec.yaml.
Here info about my config.
[√] Flutter (Channel stable, 3.7.0, on Microsoft Windows [Version 10.0.22000.1455], locale ru-RU)
• Flutter version 3.7.0 on channel stable at C:\Programming\flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision b06b8b2710 (6 days ago), 2023-01-23 16:55:55 -0800
• Engine revision b24591ed32
• Dart version 2.19.0
• DevTools version 2.20.1
[X] Windows Version (Unable to confirm if installed Windows version is 10 or greater)
[√] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
• Android SDK at C:\Users\Jpgmooder\AppData\Local\Android\sdk
• Platform android-33, build-tools 33.0.0
• Java binary at: C:\Programming\Android Studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)
• All Android licenses accepted.
[√] Chrome - develop for the web
• Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe
[√] Visual Studio - develop for Windows (Visual Studio Community 2019 16.11.9)
• Visual Studio at C:\Program Files (x86)\Microsoft Visual Studio\2019\Community
• Visual Studio Community 2019 version 16.11.32106.194
• Windows 10 SDK version 10.0.19041.0
[√] Android Studio (version 2020.3)
• Android Studio at C:\Programming\Android Studio
• Flutter plugin can be installed from:
https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)
[√] Connected device (4 available)
• RMX1921 (mobile) • 58a99ef9 • android-arm64 • Android 11 (API 30)
• Windows (desktop) • windows • windows-x64 • Microsoft Windows [Version 10.0.22000.1455]
• Chrome (web) • chrome • web-javascript • Google Chrome 109.0.5414.120
• Edge (web) • edge • web-javascript • Microsoft Edge 109.0.1518.70
[√] HTTP Host Availability
• All required HTTP hosts are available
Same issue for me right now after creating a new project and adding rive into it :), error didn't solved even after updating VS2022.
https://learn.microsoft.com/en-us/cpp/build/clang-support-msbuild?view=msvc-170
My net speed is limited I can't check it out right now. Check this link and if you don't have Clang/LLVM on VS then download it from Visual Studio Installer/Modify section
Clang is currently required to build Rive on Windows. Some more Rive platform-specific details are available on this page: https://github.com/rive-app/rive-flutter/blob/master/platform_considerations.md#windows
This has been a requirement since version 0.10.x where we've added some of the groundwork for our upcoming text feature.
Clang is currently required to build Rive on Windows. Some more Rive platform-specific details are available on this page: https://github.com/rive-app/rive-flutter/blob/master/platform_considerations.md#windows
This has been a requirement since version 0.10.x where we've added some of the groundwork for our upcoming text feature.
After adding these libraries in the Visual Studio installer, the same error occurs while building the project in VSCode. Maybe I can somehow show the VSCode compiler the path to Clang?
Clang is currently required to build Rive on Windows. Some more Rive platform-specific details are available on this page: https://github.com/rive-app/rive-flutter/blob/master/platform_considerations.md#windows This has been a requirement since version 0.10.x where we've added some of the groundwork for our upcoming text feature.
After adding these libraries in the Visual Studio installer, the same error occurs while building the project in VSCode. Maybe I can somehow show the VSCode compiler the path to Clang?
In my case error has been solved. Did you let flutter to build completely? most of error is about deprecated API, which means it will show you some red warning but at the end of this process, application will get build same as other.
Clang is currently required to build Rive on Windows. Some more Rive platform-specific details are available on this page: https://github.com/rive-app/rive-flutter/blob/master/platform_considerations.md#windows This has been a requirement since version 0.10.x where we've added some of the groundwork for our upcoming text feature.
After adding these libraries in the Visual Studio installer, the same error occurs while building the project in VSCode. Maybe I can somehow show the VSCode compiler the path to Clang?
In my case error has been solved. Did you let flutter to build completely? most of error is about deprecated API, which means it will show you some red warning but at the end of this process, application will get build same as other.
I did, there are no red warnings at all other than the one discussed, it just throw following error even after reinstalling all the components from the Visual Studio installer.
error MSB6006: "clang-cl.exe" �����訫��� � ����� 1. [C:\Programming\flutterprojects\diploma\build\windows\plugins\rive_common\rive_common_plugin.vcxproj]
P.S. rive_common platform toolset already set to LLVM (didnt help)

@JPGmooder which version of VS and Clang are you using. It appears that the issue was resolved for someone else after they updated, see here: https://github.com/rive-app/rive-flutter/issues/279#issuecomment-1370748762
I faced the same issue:
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.Cpp.ClangCl.Common.targets(255,5): error MSB6006: "clang-cl.exe" exited with code 1. [D:\CodeOnSunday\hybrid_flutter_ide\build\windows\x64\plugins\rive_common\rive_common_plugin.vcxproj]
Error: Build process failed.
I already had Clang 15.0.1 and VS 2022. Then I upgraded the VS to the latest version (17.9.5). The issue was gone.
Closing this as there have been many updates since and the underlying problem appeared to be clang version related. Future versions of the Rive Flutter runtime will provide prebuilt libraries, instead of requiring the build process to happen locally. This should prevent similar issues in the future.
Please reopen if you're still encountering difficulties with the current version of Rive Flutter.