I get the same error:
Running E:/UnrealEngine-4.19/Engine/Binaries/DotNET/UnrealBuildTool.exe -projectfiles -project=“E:/Witches_and_Angels/Witches_and_Angels.uproject” -game -engine -progress
Discovering modules, targets and source code for project…
ERROR: UnrealBuildTool Exception: Expecting to find a type to be declared in a target rules named ‘Witches_And_AngelsServerTarget’. This type must derive from the ‘TargetRules’ type defined by Unreal Build Tool.
The content of my target file:
// Copyright 1998-2017 Epic Games, Inc. All Rights Reserved.
public class Witches_and_AngelsServerTarget : TargetRules // Change this line as shown previously
public Witches_and_AngelsServerTarget(TargetInfo Target) : base(Target) // Change this line as shown previously
Type = TargetType.Server;
ExtraModuleNames.Add(“Witches_and_Angels”); // Change this line as shown previously
I built the engine from source without errors, started my built engine and made a new project. Generating visual studio files wasn’t a problem either.
Then I added the server.tartet.cs file (Witches_and_AngelsServer.Target.cs) , richt clicked on the project file, selected change version and clicked OK without changing anything.
That’s when I got the error above.
I got the same error with a project created with original version 4.20, then changed to either built 4.20 or built 4.19, even built the engines in different drives so engine and project are on the same drive.
When I leave out the server target file I don’t get any errors. (obviously, as the error states it’s from the server target file).
I used the content of a posted server target file for 4.18, since it doesn’t seem to be the same as 4.17. (assuming 4.19 and 4.20 would be the same too)
What do I have to do to make this work?
(visual studio 2017 comunity, windows SDK 8,1 and 10, running windows 10 home 64bit)
*** I used following tutorials with the same results…:
When I actually try to build the project, the development editor builds without problems, but the development server gives the following 3 errors:
Error MSB3075 The command “E:\UnrealEngine-4.19\Engine\Build\BatchFiles\Build.bat Witches_and_Angels Win64 Development “E:\Witches_and_Angels\Witches_and_Angels.uproject” -WaitMutex -FromMsBuild” exited with code 5. Please verify that you have sufficient rights to run this command. Witches_and_Angels D:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.MakeFile.Targets 44
Error C4577 ‘noexcept’ used with no exception handling mode specified; termination on exception is not guaranteed. Specify /EHsc Witches_and_Angels D:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.14.26428\INCLUDE\vcruntime_new.h 67
Error UBT ERROR: Failed to produce item: E:\UnrealEngine-4.19\Engine\Plugins\Media\WmfMedia\Binaries\Win64\Witches_and_Angels-WmfMedia.lib Witches_and_Angels E:\Witches_and_Angels\Intermediate\ProjectFiles\UnrealBuildTool 1
When I run visual studio as administrator, the first error is resolved, but the following error occurs instead:
Error MSB3073 The command “E:\UnrealEngine-4.19\Engine\Build\BatchFiles\Rebuild.bat Witches_and_Angels Win64 Development “E:\Witches_and_Angels\Witches_and_Angels.uproject” -WaitMutex -FromMsBuild” exited with code -1. Witches_and_Angels D:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.MakeFile.Targets 49