Hi,
after a VS2017C update I made yesterday, I get the following error when packaging my plugin (multiple times for each pch):
D:\UE4\MyProjects\EOC\RTSPluginV194\RTS\HostProject\Plugins\RTS\Intermediate\Build\Win64\UE4Editor\Development\RTS\Module.RTS.gen.2_of_4.cpp: fatal error C1853: ‘D:\Programs\Epic Games\UE_4.21\Engine\Intermediate\Build\Win64\UE4Editor\Development\Engine\SharedPCH.Engine.h.pch’ precompiled header file is from a previous version of the compiler, or the precompiled header is C++ and you are using it from C (or vice versa)
I have tried to clean everything, deleting all project and plugin .vs, Binary, Intermediate, Saved folders, regenerating solution, then rebuilding, but no help…
Beside the VS update, I have also created a Git source control previously, but in theory it cannot disturb anything…
Of course just in the worst possible moment, I should add it to a new project within days…
we’re having the same issue over here. Updated visual studio today and it compiled fine. But when we go to package the plugin we get the same error. We tried the same stuff you did and nada.
using UE 4.21.1, and visual studio 2017 v15.9.4
Any solutions yet? Honestly haven’t even been able to narrow down whether it’s an unreal issue or a visual studio issue. It’s been rough lol
[USER=“434”]BrUnO XaVIeR[/USER] it worked fine previously with UE4.21.1 1 week ago. Only VS was updated, now reinstalling, maybe something went wrong with update and a fresh install could help, no other ideas, really…
Problem solved, imo no full reinstall needed, just modify VS installation, and keep only the latest Win10 SDK (uncheck old version, apparently UE4 uses it for pch creation somehow, but the latest for everything else, but I’m not a pro, just guessing)
Thx for mentioning Today I made the VS Update to 2017.15.9.11 and I couldn´t packaging any Plugin I wanted to update. Only a full Re-Install of VS2017 did the trick.
Sooooo I had visual studio 2019 installed which also installed Windows SDK 10.0.18362.0, I had to uninstall it and then it all worked as Unreal defaulted to the right SDK.
I can confirm the solution to only have the latest Windows 10 SDK checked in the Visual Studio Installer worked for me.
I feel better information to the developer is needed. The information provided by the error is misleading: "**precompiled header file is from a previous version of the compiler, or the precompiled header is C++ and you are using it from C (or vice versa)". In this particular case, Visual Studio is updated, and for some reason, Unreal can compile projects the same, but cannot continue to package plugins, even a simple templated plugin with no changes to the original auto-created code.
Thank you, this fixed the same error for me :)! I didn’t delete Saved, because in my case, that gave me an error when right-clicking .uproject, Generate Visual Studio Project Files.
After that, in visual studio 2017, I right-clicked the game project, Set as Startup Project, Ctrl+F5, Packaged from the editor and it worked :D!