I have a problem with Building a Windows Application with Flutter.
I get the following error log (Block of Resource Compiler, where the error occurs):
[ +330 ms] ResourceCompile:
[ +1 ms] C:Program Files (x86)Windows Kits10bin10.0.22621.0x64rc.exe /D _UNICODE /D UNICODE /D WIN32 /D
_WINDOWS /D NDEBUG /D _HAS_EXCEPTIONS=0 /D "FLUTTER_VERSION=\"0.36.15-SNAPSHOT+359\"" /D FLUTTER_VERSION_MAJOR=0 /D
FLUTTER_VERSION_MINOR=36 /D FLUTTER_VERSION_PATCH=15 /D FLUTTER_VERSION_BUILD=359 /D NOMINMAX /D UNICODE /D _UNICODE /D
"CMAKE_INTDIR=\"Release\"" /l"0x0409"
/I"C:Jenkinsworkspaceeature_51-verification-deep-linkflutter_appwindows"
/I"C:Jenkinsworkspaceeature_51-verification-deep-linkflutter_appwindowsflutterephemeral"
/I"C:Jenkinsworkspaceeature_51-verification-deep-linkflutter_appwindowsflutterephemeralcpp_client_wr
apperinclude"
/I"C:Jenkinsworkspaceeature_51-verification-deep-linkflutter_appwindowsflutterephemeral.plugin_symli
nksapp_linkswindowsinclude"
/I"C:Jenkinsworkspaceeature_51-verification-deep-linkflutter_appwindowsflutterephemeral.plugin_symli
nksflutter_secure_storage_windowswindowsinclude" /nologo /fo"flutter_app.dirReleaseRunner.res"
"C:Jenkinsworkspaceeature_51-verification-deep-linkflutter_appwindowsrunnerRunner.rc"
[ +213 ms] C:Jenkinsworkspaceeature_51-verification-deep-linkflutter_appwindowsrunnerRunner.rc(55):
error RC2176: old DIB in resourcesapp_icon.ico; pass it through SDKPAINT
[C:Jenkinsworkspaceeature_51-verification-deep-linkflutter_appbuildwindowsx64runnerflutter_app.vcxp
roj]
[ +15 ms] Done Building Project
"C:Jenkinsworkspaceeature_51-verification-deep-linkflutter_appbuildwindowsx64runnerflutter_app.vcxp
roj" (default targets) -- FAILED.
I already found another Stackoverflow Question with the same error outside of flutter.
But according to that other question the error is related to some compatibilty issue in Visual Studio 2005 and 2008, since I have Visual Studio 2022, and already have tried reexporting the icon according to the solution on that other Question, with no success.
Another thing thats maybe relevant, this error only occurs on my Windows 10 Virtual Machine, on my Windows 11 PC, using the same git-repo it builds fine.
I already tried to repair the Visual Studio Install on the Win 10 VM, and after that didn’t succeed I suspected that something else on the VM Windows 10 install is broken, so I completly reinstalled Windows on that VM. And I still get that same error.
The full Error Build Log