# Can't generate visual studio project files

**URL:** <https://forums.unrealengine.com/t/cant-generate-visual-studio-project-files/1884574>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine, generate-project-fil, Visual-Studio, question\
**Created:** [June 1, 2024, 9:19pm UTC](https://forums.unrealengine.com/t/cant-generate-visual-studio-project-files/1884574 "2024-06-01T21:19:18Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Revelage](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Revelage](https://forums.unrealengine.com/u/Revelage)\
**Post date:** [June 1, 2024, 9:19pm UTC](https://forums.unrealengine.com/t/cant-generate-visual-studio-project-files/1884574/1 "2024-06-01T21:19:18Z")

</div>

Hello,  
I can’t generate the visual studio files after imported the project from UE5.3 to UE5.4.

the error is this:  
C:\Users""\Desktop\LyraStarterGame 5.4\Source\LyraGame.Target.cs(238,13): error CS0246: The type or namespace name ‘JsonParseException’ could not be found (are you missing a using directive or an assembly reference?)

but i don’t understand why it happen, the oldest version don’t have this error. (UE5.2 and UE5.3)

Log files.

Generating VisualStudio project files:  
Discovering modules, targets and source code for project…  
Updating D:\Epic Games\UE\_5.4\Engine\Intermediate\ProjectFiles\PrimaryProjectPath.txt: contents have changed. Saving previous version to D:\Epic Games\UE\_5.4\Engine\Intermediate\ProjectFiles\PrimaryProjectPath.txt.old.  
Found VisualStudio2022 installation: C:\Program Files\Microsoft Visual Studio\2022\Community (Product=Microsoft.VisualStudio.Product.Community, Version=17.10.34928.147)  
Found Visual Studio toolchain: C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.34.31933 (Family=14.34.31933, FamilyRank=4, Version=14.34.31948, Is64Bit=True, ReleaseChannel=Latest, Architecture=x64, Error=False, Redist=C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Redist\MSVC\14.40.33807)  
Found Visual Studio toolchain: C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.36.32532 (Family=14.36.32532, FamilyRank=2, Version=14.36.32545, Is64Bit=True, ReleaseChannel=Latest, Architecture=x64, Error=False, Redist=C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Redist\MSVC\14.36.32532)  
Found Visual Studio toolchain: C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.40.33807 (Family=14.40.33807, FamilyRank=5, Version=14.40.33811, Is64Bit=True, ReleaseChannel=Latest, Architecture=x64, Error=False, Redist=C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Redist\MSVC\14.40.33807)  
Detected supported platforms: Win64  
Skipping D:\Epic Games\UE\_5.4\Engine\Intermediate\Build\BuildRules\UE5Rules.dll: File is installed  
Skipping D:\Epic Games\UE\_5.4\Engine\Intermediate\Build\BuildRules\UE5ProgramRules.dll: File is installed  
Compiling C:\Users\matte\Desktop\LyraStarterGame 5.4\Intermediate\Build\BuildRules\LyraStarterGameModuleRules.dll: Assembly does not exist  
Adding event matcher: CompileEventMatcher  
Adding event matcher: LinkEventMatcher  
Adding event matcher: MicrosoftEventMatcher  
Adding event matcher: XoreaxEventMatcher  
C:\Users"“\Desktop\LyraStarterGame 5.4\Source\LyraGame.Target.cs(83,6): warning CS0618: ‘Log.TraceWarning(string, params object?)’ is obsolete: ‘Use Logger.LogWarning with a message template instead; see [https://tinyurl.com/bp96bk2r.](https://tinyurl.com/bp96bk2r.)’  
C:\Users"”\Desktop\LyraStarterGame 5.4\Source\LyraGame.Target.cs(159,8): warning CS0618: ‘Log.TraceWarning(string, params object?)’ is obsolete: ‘Use Logger.LogWarning with a message template instead; see [https://tinyurl.com/bp96bk2r.](https://tinyurl.com/bp96bk2r.)’  
C:\Users"“\Desktop\LyraStarterGame 5.4\Source\LyraGame.Target.cs(198,9): warning CS0618: ‘Log.TraceVerbose(string, params object?)’ is obsolete: ‘Use Logger.LogDebug with a message template instead; see [https://tinyurl.com/bp96bk2r.](https://tinyurl.com/bp96bk2r.)’  
C:\Users"”\Desktop\LyraStarterGame 5.4\Source\LyraGame.Target.cs(202,9): warning CS0618: ‘Log.TraceVerbose(string, params object?)’ is obsolete: ‘Use Logger.LogDebug with a message template instead; see [https://tinyurl.com/bp96bk2r.](https://tinyurl.com/bp96bk2r.)’  
C:\Users"“\Desktop\LyraStarterGame 5.4\Source\LyraGame.Target.cs(212,8): warning CS0618: ‘Log.TraceVerbose(string, params object?)’ is obsolete: ‘Use Logger.LogDebug with a message template instead; see [https://tinyurl.com/bp96bk2r.](https://tinyurl.com/bp96bk2r.)’  
C:\Users"”\Desktop\LyraStarterGame 5.4\Source\LyraGame.Target.cs(238,13): error CS0246: The type or namespace name ‘JsonParseException’ could not be found (are you missing a using directive or an assembly reference?)  
C:\Users""\Desktop\LyraStarterGame 5.4\Source\LyraGame.Target.cs(251,6): warning CS0618: ‘Log.TraceVerbose(string, params object?)’ is obsolete: ‘Use Logger.LogDebug with a message template instead; see [https://tinyurl.com/bp96bk2r.](https://tinyurl.com/bp96bk2r.)’  
Total execution time: 1.65 seconds  
Expecting to find a type to be declared in a target rules named ‘LyraClientTarget’. This type must derive from the ‘TargetRules’ type defined by UnrealBuildTool.  
CompilationResultException: Expecting to find a type to be declared in a target rules named ‘LyraClientTarget’. This type must derive from the ‘TargetRules’ type defined by UnrealBuildTool.  
at UnrealBuildTool.RulesAssembly.CreateTargetRules(String TargetName, UnrealTargetPlatform Platform, UnrealTargetConfiguration Configuration, UnrealArchitectures Architectures, FileReference ProjectFile, CommandLineArguments Arguments, ILogger Logger, Boolean IsTestTarget, Boolean bSkipValidation, UnrealIntermediateEnvironment IntermediateEnvironment) in D:\build++UE5\Sync\Engine\Saved\CsTools\Engine\Source\Programs\UnrealBuildTool\System\RulesAssembly.cs:line 852  
at UnrealBuildTool.ProjectFileGenerator.AddProjectsForAllTargets(PlatformProjectGeneratorCollection PlatformProjectGenerators, List`1 AllGames, List`1 AllTargetFiles, String Arguments, List`1 EngineProjects, List`1 GameProjects, Dictionary`2 ProjectFileToUProjectFile, Dictionary`2 ProgramProjects, Dictionary`2 RulesAssemblies, ILogger Logger) in D:\build++UE5\Sync\Engine\Saved\CsTools\Engine\Source\Programs\UnrealBuildTool\ProjectFiles\ProjectFileGenerator.cs:line 2782  
at UnrealBuildTool.ProjectFileGenerator.GenerateProjectFiles(PlatformProjectGeneratorCollection PlatformProjectGenerators, String Arguments, Boolean bCacheDataForEditor, ILogger Logger) in D:\build++UE5\Sync\Engine\Saved\CsTools\Engine\Source\Programs\UnrealBuildTool\ProjectFiles\ProjectFileGenerator.cs:line 1038  
at UnrealBuildTool.GenerateProjectFilesMode.ExecuteAsync(CommandLineArguments Arguments, ILogger Logger) in D:\build++UE5\Sync\Engine\Saved\CsTools\Engine\Source\Programs\UnrealBuildTool\Modes\GenerateProjectFilesMode.cs:line 65  
at UnrealBuildTool.UnrealBuildTool.Main(String ArgumentsArray) in D:\build++UE5\Sync\Engine\Saved\CsTools\Engine\Source\Programs\UnrealBuildTool\UnrealBuildTool.cs:line 660  
WriteFileIfChanged() wrote 1 changed files of 2 requested writes.  
Timeline:

---

<div class="post-metadata">

**Author:** ![FrostyJas](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/frostyjas/32/1194640_2.png) [@FrostyJas](https://forums.unrealengine.com/u/FrostyJas)\
**Post date:** [June 2, 2024, 9:30am UTC](https://forums.unrealengine.com/t/cant-generate-visual-studio-project-files/1884574/2 "2024-06-02T09:30:17Z")

</div>

Greetings @Revelage

With that error, I’d start by making sure you’re running the most recent VS and then also get the latest .NET Framework. I’ve saw CS0246 due to outdate framework a number of times and it may be the problem you’re having as well. If it’s not resolved after both of those, post back. I’ll monitor the thread.

---

<div class="post-metadata">

**Author:** ![Revelage](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Revelage](https://forums.unrealengine.com/u/Revelage)\
**Post date:** [June 2, 2024, 9:56am UTC](https://forums.unrealengine.com/t/cant-generate-visual-studio-project-files/1884574/3 "2024-06-02T09:56:41Z")

</div>

i have the latest version of VS and .NET framework.  
Maybe i have to install another .NET framework to resolve, but i don’t know which one.

---

<div class="post-metadata">

**Author:** ![FrostyJas](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/frostyjas/32/1194640_2.png) [@FrostyJas](https://forums.unrealengine.com/u/FrostyJas)\
**Post date:** [June 5, 2024, 9:05am UTC](https://forums.unrealengine.com/t/cant-generate-visual-studio-project-files/1884574/4 "2024-06-05T09:05:23Z")

</div>

There’s a compatibility based on UE version here that may help answer that. [Setting Up Visual Studio Development Environment For C++ Projects In Unreal Engine | Unreal Engine 5.4 Documentation | Epic Developer Community](https://dev.epicgames.com/documentation/en-us/unreal-engine/setting-up-visual-studio-development-environment-for-cplusplus-projects-in-unreal-engine)

---

<div class="post-metadata">

**Author:** ![GridTac1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@GridTac1](https://forums.unrealengine.com/u/GridTac1)\
**Post date:** [June 14, 2024, 6:57pm UTC](https://forums.unrealengine.com/t/cant-generate-visual-studio-project-files/1884574/5 "2024-06-14T18:57:02Z")

</div>

I have the same issue I’m pretty sure. New 5.4.2 build, attempting to upgrade project from 5.3.2. Base code is vanilla, but I have a custom plugin that I was working on. I get the same error as OP.

Generating VisualStudio2022 project files:  
Discovering modules, targets and source code for project…  
D:\Unreal Projects\LyraPlayBranch\Source\LyraGame.Target.cs(248,13): error CS0246: The type or namespace name ‘JsonParseException’ could not be found (are you missing a using directive or an assembly reference?)  
Total execution time: 2.57 seconds  
Expecting to find a type to be declared in a target rules named ‘LyraClientTarget’. This type must derive from the ‘TargetRules’ type defined by UnrealBuildTool.

Here’s the log details:

Generating VisualStudio2022 project files:  
Discovering modules, targets and source code for project…  
Found VisualStudio2022 installation: C:\Program Files\Microsoft Visual Studio\2022\Community (Product=Microsoft.VisualStudio.Product.Community, Version=17.10.34928.147)  
Found Visual Studio toolchain: C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.34.31933 (Family=14.34.31933, FamilyRank=4, Version=14.34.31948, Is64Bit=True, ReleaseChannel=Latest, Architecture=x64, Error=False, Redist=C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Redist\MSVC\14.40.33807)  
Found Visual Studio toolchain: C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.36.32532 (Family=14.36.32532, FamilyRank=2, Version=14.36.32545, Is64Bit=True, ReleaseChannel=Latest, Architecture=x64, Error=False, Redist=C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Redist\MSVC\14.36.32532)  
Found Visual Studio toolchain: C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.38.33130 (Family=14.38.33130, FamilyRank=0, Version=14.38.33138, Is64Bit=True, ReleaseChannel=Latest, Architecture=x64, Error=False, Redist=C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Redist\MSVC\14.40.33807)  
Found Visual Studio toolchain: C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.40.33807 (Family=14.40.33807, FamilyRank=5, Version=14.40.33811, Is64Bit=True, ReleaseChannel=Latest, Architecture=x64, Error=False, Redist=C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Redist\MSVC\14.40.33807)  
Detected supported platforms: Win64  
Skipping D:\Unreal Engine\UE\_5.4\Engine\Intermediate\Build\BuildRules\UE5Rules.dll: File is installed  
Skipping D:\Unreal Engine\UE\_5.4\Engine\Intermediate\Build\BuildRules\UE5ProgramRules.dll: File is installed  
Generating target Editor for D:\Unreal Projects\LyraPlayBranch\Intermediate\ProjectFiles\UE5.vcxproj  
Generating target Game for D:\Unreal Projects\LyraPlayBranch\Intermediate\ProjectFiles\UE5.vcxproj  
Compiling D:\Unreal Projects\LyraPlayBranch\Intermediate\Build\BuildRules\LyraStarterGameModuleRules.dll: Assembly does not exist  
Adding event matcher: CompileEventMatcher  
Adding event matcher: LinkEventMatcher  
Adding event matcher: MicrosoftEventMatcher  
Adding event matcher: XoreaxEventMatcher  
D:\Unreal Projects\LyraPlayBranch\Source\LyraGame.Target.cs(248,13): error CS0246: The type or namespace name ‘JsonParseException’ could not be found (are you missing a using directive or an assembly reference?)  
Total execution time: 1.92 seconds  
Expecting to find a type to be declared in a target rules named ‘LyraClientTarget’. This type must derive from the ‘TargetRules’ type defined by UnrealBuildTool.  
CompilationResultException: Expecting to find a type to be declared in a target rules named ‘LyraClientTarget’. This type must derive from the ‘TargetRules’ type defined by UnrealBuildTool.  
at UnrealBuildTool.RulesAssembly.CreateTargetRules(String TargetName, UnrealTargetPlatform Platform, UnrealTargetConfiguration Configuration, UnrealArchitectures Architectures, FileReference ProjectFile, CommandLineArguments Arguments, ILogger Logger, Boolean IsTestTarget, Boolean bSkipValidation, UnrealIntermediateEnvironment IntermediateEnvironment) in D:\build++UE5\Sync\Engine\Saved\CsTools\Engine\Source\Programs\UnrealBuildTool\System\RulesAssembly.cs:line 852  
at UnrealBuildTool.ProjectFileGenerator.AddProjectsForAllTargets(PlatformProjectGeneratorCollection PlatformProjectGenerators, List`1 AllGames, List`1 AllTargetFiles, String Arguments, List`1 EngineProjects, List`1 GameProjects, Dictionary`2 ProjectFileToUProjectFile, Dictionary`2 ProgramProjects, Dictionary`2 RulesAssemblies, ILogger Logger) in D:\build++UE5\Sync\Engine\Saved\CsTools\Engine\Source\Programs\UnrealBuildTool\ProjectFiles\ProjectFileGenerator.cs:line 2782  
at UnrealBuildTool.ProjectFileGenerator.GenerateProjectFiles(PlatformProjectGeneratorCollection PlatformProjectGenerators, String Arguments, Boolean bCacheDataForEditor, ILogger Logger) in D:\build++UE5\Sync\Engine\Saved\CsTools\Engine\Source\Programs\UnrealBuildTool\ProjectFiles\ProjectFileGenerator.cs:line 1038  
at UnrealBuildTool.GenerateProjectFilesMode.ExecuteAsync(CommandLineArguments Arguments, ILogger Logger) in D:\build++UE5\Sync\Engine\Saved\CsTools\Engine\Source\Programs\UnrealBuildTool\Modes\GenerateProjectFilesMode.cs:line 65  
at UnrealBuildTool.UnrealBuildTool.Main(String ArgumentsArray) in D:\build++UE5\Sync\Engine\Saved\CsTools\Engine\Source\Programs\UnrealBuildTool\UnrealBuildTool.cs:line 660  
WriteFileIfChanged() wrote 0 changed files of 2 requested writes.

---

<div class="post-metadata">

**Author:** ![Zenity](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Zenity](https://forums.unrealengine.com/u/Zenity)\
**Post date:** [July 18, 2024, 5:11am UTC](https://forums.unrealengine.com/t/cant-generate-visual-studio-project-files/1884574/6 "2024-07-18T05:11:16Z")

</div>

I just ran into this, I am not exactly sure what (SDK) change is causing this, but the solution is to change `JsonParseException` to just `Exception` in LyraGame.Target.cs. Apparently the Lyra source already made this change some time ago on GitHub, so it’s not a hack.

---

<div class="post-metadata">

**Author:** ![sfider](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@sfider](https://forums.unrealengine.com/u/sfider)\
**Post date:** [November 22, 2024, 5:15pm UTC](https://forums.unrealengine.com/t/cant-generate-visual-studio-project-files/1884574/7 "2024-11-22T17:15:23Z")

</div>

Doesn’t mean it’s not a hack ^^

---

<div class="post-metadata">

**Author:** ![BossMunc](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@BossMunc](https://forums.unrealengine.com/u/BossMunc)\
**Post date:** [February 13, 2025, 7:35pm UTC](https://forums.unrealengine.com/t/cant-generate-visual-studio-project-files/1884574/8 "2025-02-13T19:35:26Z")

</div>

I removed parse from parse exception and issue still persists…
