Unreal Engine Build Error (Automation Tool and Target Rules)

When I try to package my Project for Windows 64bit I got the Errors you can see in the end of this post.
I did not modify anything in Visual Studio I just opened and rebuild the solution. I hope I get fast help because this is my Semester Project and I have to finish it until next weeks Wednesday :3

The log file is from the first Error to till the End.

UnrealBuildTool: ERROR: Couldn't find target rules file for target '-Project=D:\Users\Patrick\Documents\Unreal Projects\Test\Test.uproject' in rules assembly 'UE4Rules, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'.
UnrealBuildTool: Location: C:\Program Files (x86)\Epic Games\4.14\Engine\Intermediate\Build\BuildRules\UE4Rules.dll
UnrealBuildTool: Target rules found:
UnrealBuildTool: 	UE4Editor - C:\Program Files (x86)\Epic Games\4.14\Engine\Source\UE4Editor.Target.cs
UnrealBuildTool: 	UE4Game - C:\Program Files (x86)\Epic Games\4.14\Engine\Source\UE4Game.Target.cs
UnrealBuildTool: 	UnrealHeaderTool - C:\Program Files (x86)\Epic Games\4.14\Engine\Source\Programs\UnrealHeaderTool\UnrealHeaderTool.Target.cs
UnrealBuildTool: 
CommandUtils.Run: Run: Took 2,5557753s to run UnrealBuildTool.exe, ExitCode=5
Program.Main: ERROR: AutomationTool terminated with exception: AutomationTool.CommandUtils+CommandFailedException: Command failed (Result:5): C:\Program Files (x86)\Epic Games\4.14\Engine\Binaries\DotNET\UnrealBuildTool.exe Test Win64 Development -Project="D:\Users\Patrick\Documents\Unreal Projects\Test\Test.uproject"  "D:\Users\Patrick\Documents\Unreal Projects\Test\Test.uproject"  -remoteini="D:\Users\Patrick\Documents\Unreal Projects\Test" -noxge -generatemanifest -NoHotReload. See logfile for details: 'UnrealBuildTool-2017.01.28-03.11.46.txt' 
   bei AutomationTool.CommandUtils.RunAndLog(String App, String CommandLine, String Logfile, Int32 MaxSuccessCode, String Input, ERunOptions Options, Dictionary`2 EnvVars, SpewFilterCallbackType SpewFilterCallback)
   bei AutomationTool.CommandUtils.RunAndLog(CommandEnvironment Env, String App, String CommandLine, String LogName, Int32 MaxSuccessCode, String Input, ERunOptions Options, Dictionary`2 EnvVars, SpewFilterCallbackType SpewFilterCallback)
   bei AutomationTool.CommandUtils.RunUBT(CommandEnvironment Env, String UBTExecutable, String CommandLine, String LogName, Dictionary`2 EnvVars)
   bei AutomationTool.CommandUtils.RunUBT(CommandEnvironment Env, String UBTExecutable, FileReference Project, String Target, String Platform, String Config, String AdditionalArgs, String LogName, Dictionary`2 EnvVars)
   bei AutomationTool.UE4Build.BuildWithUBT(String TargetName, UnrealTargetPlatform TargetPlatform, String Config, FileReference UprojectPath, Boolean ForceMonolithic, Boolean ForceNonUnity, Boolean ForceDebugInfo, Boolean ForceFlushMac, Boolean DisableXGE, String InAddArgs, Boolean ForceUnity, Dictionary`2 EnvVars)
   bei AutomationTool.UE4Build.Build(BuildAgenda Agenda, Nullable`1 InDeleteBuildProducts, Boolean InUpdateVersionFiles, Boolean InForceNoXGE, Boolean InUseParallelExecutor, Boolean InForceNonUnity, Boolean InForceUnity, Boolean InShowProgress, Dictionary`2 PlatformEnvVars, Nullable`1 InChangelistNumberOverride, Dictionary`2 InTargetToManifest)
   bei Project.Build(BuildCommand Command, ProjectParams Params, Int32 WorkingCL, ProjectBuildTargets TargetMask)
   bei BuildCookRun.DoBuildCookRun(ProjectParams Params)
   bei BuildCookRun.ExecuteBuild()
   bei AutomationTool.BuildCommand.Execute()
   bei AutomationTool.Automation.Execute(List`1 CommandsToExecute, CaselessDictionary`1 Commands)
   bei AutomationTool.Automation.Process(String[] Arguments)
   bei AutomationTool.Program.MainProc(Object Param)
   bei AutomationTool.InternalUtils.RunSingleInstance(Func`2 Main, Object Param)
   bei AutomationTool.Program.Main()
Program.Main: AutomationTool exiting with ExitCode=5 (5)

Hello 0Poschi0,

Can you try deleting your Intermediate and Saved folders? After doing this, right-click on the .uproject file and select “Generate Visual Studio Project Files” and then compile using Visual Studio. If this doesn’t work, in the project’s directory, under the Source folder, can you provide the code in your Test.Build.cs and Test.Target.cs files?

We haven’t heard from you in a while, 0Poschi0. Are you still experiencing this issue? If so, was my last comment of any help? What were the results? In the meantime, I’ll be marking this issue as resolved for tracking purposes.

I’m sorry that i am answering that late. I tried what you recommended but it didn’t help, so i just created a new project and merged everything. After that everything worked fine again. Maybe it was because i opened visual studio in a non code project and rebuild everything in visual studio? I’m not sure but thanks for your help!