Problems at Build the sample

Well it took me long enough to get there but now when i press the “Build Game” button in the Project Tools Window following errors are showing up. I made this text green so you can easily tell wich is not Part of the posted errors.

bei Burst.Compiler.IL.Aot.AotCompiler.CallLinkerProcess(TargetPlatform platform, TargetCpu targetCpu, List`1 plugins, List`1 inputFiles, String outputFile)
bei Burst.Compiler.IL.Aot.AotCompiler.Link(Module module, AotCompilerOptions compilerOptions)
bei Burst.Bcl.Program.Main(String[ ] args)
Failed running C:\Users\Public\Documents\Unity Projects\FPSSample\Library\PackageCache\com.unity.burst@0.2.4-preview.33\.Runtime\bcl.exe @C:\Users\Sorko\AppData\Local\Temp\tmp36c7be5a.tmp
stdout:
System.Exception: No MSVC installations were found on the machine!
bei Unity.IL2CPP.Building.ToolChains.MsvcVersions.MsvcInstallation.GetLatestFunctionalInstallation(Architecture architecture)
bei Unity.IL2CPP.Building.ToolChains.MsvcDesktopToolChain.get_MsvcInstallation()
bei Unity.IL2CPP.Building.ToolChains.MsvcToolChain.GetToolchainInfoForOutput()
bei Burst.Compiler.IL.Aot.AotLinker.Link(IEnumerable`1 objFiles, String outPath)
bei Burst.Linker.Program.Main(String[ ] args)
Usage: blink.exe [options] <input .o/.obj/.ll files...>
--help Show Help
--platform=VALUE Target Platform <Windows|macOS|Linux|Android|iOS|
PS4|XboxOne|Wasm|UWP>
--target=VALUE Target CPU <Auto|X86_SSE2|X86_SSE4|X64_SSE2|X64_
SSE4|AVX|AVX2|AVX512|WASM32|ARMV7A_NEON32|ARMV8A_
AARCH64|THUMB2_NEON32>
--il2cpp-plugin-folder=VALUE
Plugin folder
--output=VALUE Output shared library file
An unexpected exception occurred: 
stderr:
System.InvalidOperationException: The linker failed. Check previous exception in the log
bei Burst.Compiler.IL.Aot.AotCompiler.CallLinkerProcess(TargetPlatform platform, TargetCpu targetCpu, List`1 plugins, List`1 inputFiles, String outputFile)
bei Burst.Compiler.IL.Aot.AotCompiler.Link(Module module, AotCompilerOptions compilerOptions)
bei Burst.Bcl.Program.Main(String[ ] args)
UnityEngine.Debug:LogError(Object)
UnityEditorInternal.Runner:RunProgram(Program, String, String, String, CompilerOutputParserBase) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:128)
UnityEditorInternal.Runner:RunManagedProgram(String, String, String, CompilerOutputParserBase, Action`1) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:73)
Unity.Burst.Editor.BurstAotCompiler:OnPostBuildPlayerScriptDLLs(BuildReport) (at Library/PackageCache/com.unity.burst@0.2.4-preview.33/Editor/BurstAotCompiler.cs:220)
UnityEditor.BuildPipeline:BuildPlayer(String[ ], String, BuildTarget, BuildOptions)
BuildTools:BuildGame(String, String, BuildTarget, BuildOptions, String, Boolean) (at Assets/Scripts/EditorTools/Editor/BuildTools.cs:113)
BuildWindow:smile:rawBuildTools() (at Assets/Scripts/EditorTools/Editor/BuildWindow.cs:334)
BuildWindow:OnGUI() (at Assets/Scripts/EditorTools/Editor/BuildWindow.cs:132)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
Exception: C:\Users\Public\Documents\Unity Projects\FPSSample\Library\PackageCache\com.unity.burst@0.2.4-preview.33\.Runtime\bcl.exe did not run properly!
UnityEditorInternal.Runner.RunProgram (UnityEditor.Utils.Program p, System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:130)
UnityEditorInternal.Runner.RunManagedProgram (System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser, System.Action`1[T] setupStartInfo) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:73)
Unity.Burst.Editor.BurstAotCompiler.OnPostBuildPlayerScriptDLLs (UnityEditor.Build.Reporting.BuildReport report) (at Library/PackageCache/com.unity.burst@0.2.4-preview.33/Editor/BurstAotCompiler.cs:220)
UnityEditor.Build.BuildPipelineInterfaces.OnPostBuildPlayerScriptDLLs (UnityEditor.Build.Reporting.BuildReport report) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildPipelineInterfaces.cs:452)
UnityEditor.BuildPipeline:BuildPlayer(String[ ], String, BuildTarget, BuildOptions)
BuildTools:BuildGame(String, String, BuildTarget, BuildOptions, String, Boolean) (at Assets/Scripts/EditorTools/Editor/BuildTools.cs:113)
BuildWindow:smile:rawBuildTools() (at Assets/Scripts/EditorTools/Editor/BuildWindow.cs:334)
BuildWindow:OnGUI() (at Assets/Scripts/EditorTools/Editor/BuildWindow.cs:132)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)```

First i thought that i didnt have this Windows Build Support (IL2CPP) Component installed.
I checked and i have it on the b12 version.
It seems to be Burst related, simmilar errors are found on https://discussions.unity.com/t/707571 but i cant solve the problem with that information.
There is a checkbox labeled IL2CPP i tried to check this but it leads to even more errors like this:

```Failed running C:\Program Files\Unity\Hub\Editor\2018.3.0b12\Editor\Data\il2cpp/build/il2cpp.exe --convert-to-cpp --emit-null-checks --enable-array-bounds-check --dotnetprofile="unityaot" --compile-cpp --libil2cpp-static --platform="WindowsDesktop" --architecture="x64" --configuration="Release" --outputpath="C:\Users\Public\Documents\Unity Projects\FPSSample\Temp/StagingArea/Data\Native\GameAssembly.dll" --cachedirectory="C:\Users\Public\Documents\Unity Projects\FPSSample\Assets\..\Library/il2cpp_cache" --map-file-parser="C:\Program Files\Unity\Hub\Editor\2018.3.0b12\Editor\Data\Tools\MapFileParser\MapFileParser.exe" --directory="C:\Users\Public\Documents\Unity Projects\FPSSample\Temp\StagingArea\Data\Managed" --generatedcppdir="C:\Users\Public\Documents\Unity Projects\FPSSample\Temp\StagingArea\Data\il2cppOutput" --extra-types-file="C:\Users\Public\Documents\Unity Projects\FPSSample\Temp\StagingArea\Data\extra-types.txt" 
stdout:
WARNING: Cannot add extra type Unity.Entities.JobProcessComponentDataExtensions+JobStruct_Process2`3[Unity.Rendering.LODGroupSystem+LODGroupJob,Unity.Rendering.MeshLODGroupComponent,Unity.Rendering.ActiveLODGroupMask]. Skipping.
WARNING: Cannot add extra type Unity.Entities.JobProcessComponentDataExtensions+JobStruct_Process2`3[Unity.Rendering.LODGroupSystem+HLODGroupJob,Unity.Rendering.MeshLODGroupComponent,Unity.Rendering.ActiveLODGroupMask]. Skipping.
WARNING: Cannot add extra type Unity.Entities.JobProcessComponentDataExtensions+JobStruct_Process3`4[Unity.Rendering.MeshRenderBoundsUpdateSystem+BoundsJob,Unity.Rendering.MeshRenderBounds,Unity.Transforms.LocalToWorld,Unity.Rendering.WorldMeshRenderBounds]. Skipping.
il2cpp.exe didn't catch exception: System.InvalidOperationException: C++ code builder is unable to build C++ code. In order to build C++ code for Windows Desktop, you must have one of these installed:
Visual Studio 2010 with C++ compilers and Windows 7 SDK (it cannot build C++ code because it is not installed)
Visual Studio 2010 installation is found by looking at "SOFTWARE\Microsoft\VisualStudio\10.0_Config\InstallDir" in the registry
Windows 7 SDK is found by looking at "SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\Windows\v7.0A\InstallationFolder" in the registry
Visual Studio 2013 with C++ compilers and Windows 8.1 SDK (it cannot build C++ code because it is not installed)
Visual Studio 2013 installation is found by looking at "SOFTWARE\Microsoft\VisualStudio\12.0_Config\InstallDir" in the registry
Windows 8.1 SDK is found by looking at "SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\Windows\v8.1\InstallationFolder" in the registry
Visual Studio 2015 with C++ compilers and Windows 10 SDK (it cannot build C++ code because it is not installed)
Visual Studio 2015 installation is found by looking at "SOFTWARE\Microsoft\VisualStudio\14.0_Config\InstallDir" in the registry
Windows 10 SDK is found by looking at "SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\Windows\v10.0\InstallationFolder" in the registry
Visual Studio 2017 with C++ compilers and Windows 10 SDK (it cannot build C++ code because it is not installed)
Visual Studio 2017 installation is found using Microsoft.VisualStudio.Setup.Configuration COM APIs
Windows 10 SDK is found by looking at "SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\Windows\v10.0\InstallationFolder" in the registry
bei Unity.IL2CPP.Building.CppProgramBuilder.ThrowIfCannotBuildInCurrentEnvironment()
bei Unity.IL2CPP.Building.CppProgramBuilder.Build(IBuildStatistics& statistics)
bei il2cpp.Program.DoRun(String[ ] args)
bei il2cpp.Program.Run(String[ ] args)
bei il2cpp.Program.Main(String[ ] args)
stderr:
Unbehandelte Ausnahme: System.InvalidOperationException: C++ code builder is unable to build C++ code. In order to build C++ code for Windows Desktop, you must have one of these installed:
Visual Studio 2010 with C++ compilers and Windows 7 SDK (it cannot build C++ code because it is not installed)
Visual Studio 2010 installation is found by looking at "SOFTWARE\Microsoft\VisualStudio\10.0_Config\InstallDir" in the registry
Windows 7 SDK is found by looking at "SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\Windows\v7.0A\InstallationFolder" in the registry
Visual Studio 2013 with C++ compilers and Windows 8.1 SDK (it cannot build C++ code because it is not installed)
Visual Studio 2013 installation is found by looking at "SOFTWARE\Microsoft\VisualStudio\12.0_Config\InstallDir" in the registry
Windows 8.1 SDK is found by looking at "SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\Windows\v8.1\InstallationFolder" in the registry
Visual Studio 2015 with C++ compilers and Windows 10 SDK (it cannot build C++ code because it is not installed)
Visual Studio 2015 installation is found by looking at "SOFTWARE\Microsoft\VisualStudio\14.0_Config\InstallDir" in the registry
Windows 10 SDK is found by looking at "SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\Windows\v10.0\InstallationFolder" in the registry
Visual Studio 2017 with C++ compilers and Windows 10 SDK (it cannot build C++ code because it is not installed)
Visual Studio 2017 installation is found using Microsoft.VisualStudio.Setup.Configuration COM APIs
Windows 10 SDK is found by looking at "SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\Windows\v10.0\InstallationFolder" in the registry
bei Unity.IL2CPP.Building.CppProgramBuilder.ThrowIfCannotBuildInCurrentEnvironment()
bei Unity.IL2CPP.Building.CppProgramBuilder.Build(IBuildStatistics& statistics)
bei il2cpp.Program.DoRun(String[ ] args)
bei il2cpp.Program.Run(String[ ] args)
bei il2cpp.Program.Main(String[ ] args)
UnityEngine.Debug:LogError(Object)
UnityEditorInternal.Runner:RunProgram(Program, String, String, String, CompilerOutputParserBase) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:128)
UnityEditorInternal.Runner:RunManagedProgram(String, String, String, CompilerOutputParserBase, Action`1) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:73)
UnityEditorInternal.IL2CPPBuilder:RunIl2CppWithArguments(List`1, Action`1, String) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:368)
UnityEditorInternal.IL2CPPBuilder:ConvertPlayerDlltoCpp(String, String, String, Boolean) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:349)
UnityEditorInternal.IL2CPPBuilder:Run() (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:211)
UnityEditorInternal.IL2CPPUtils:RunIl2Cpp(String, IIl2CppPlatformProvider, Action`1, RuntimeClassRegistry) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:42)
DesktopStandalonePostProcessor:SetupStagingArea(BuildPostProcessArgs, HashSet`1) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/DesktopStandalonePostProcessor.cs:245)
DesktopStandalonePostProcessor:PostProcess(BuildPostProcessArgs) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/DesktopStandalonePostProcessor.cs:46)
UnityEditor.BuildPipeline:BuildPlayer(String[ ], String, BuildTarget, BuildOptions)
BuildTools:BuildGame(String, String, BuildTarget, BuildOptions, String, Boolean) (at Assets/Scripts/EditorTools/Editor/BuildTools.cs:113)
BuildWindow:smile:rawBuildTools() (at Assets/Scripts/EditorTools/Editor/BuildWindow.cs:334)
BuildWindow:OnGUI() (at Assets/Scripts/EditorTools/Editor/BuildWindow.cs:132)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)```

So why are these errors ocurring? What i have to do to fix that?

I know on my first compile I got a ton of errors, but it still compiled into a playable game. Some are expected for the burst compiler aka bcl.exe

Be sure you are compiling using the FPS Sample Project Tools and NOT UNITY COMPILE/BUILD.

I assume you are using this screen, if so, after the compile, even with the errors, you will need to generate a “boot.cfg” with a command of “load level_menu” and save that in your main build folder with the build game.exe so that when you execute the game, it loads the menu…

Here are two pictures of the correct window to use to compile, and also the placement and contents of a basic boot.cfg you will need to create to load the menu by default when you start the game.

Project Tools aka Compile Window for FPS SAMPLE:

A boot.cfg example you would need to craft:
4021885--347911--bootcfg.PNG

I don’t think you need to do anything with IL2CPP, so roll back whatever you did there…

Well yea first i have to say that i got it running somehow.
When i try to connect to the server on localhost the server commandline says client 0 disconnected immediately.

Yes iam using the “Build Game” button in the Project Tools Window.

I noticed the build folder, same i can open by the button underneath the build button, was almost empty.
There was only the folder AssetBundles showing up and no .exe, .log or .dll.
I droped a file named boot.cfg, ignored the extensions warning and typed in the command.

This Build button isnt affected by changing the level i think.
Because i got curious what is in Bootstrapper and i opened it and browsed through the hierarchey before i pressed Build Game this time. Was this Bootstrapper there before?

Anyway my AutoBuild folder is now populated as i would expect it.

Ok fine now can you and are you willing to explain why this now is running as intended and before not?

Anyway lets Tackle the next problem.
Here is the log of my first runn of the server:(file highlighted in explorer)

0: GameDebug initialized. Logging to ./game_20181220_185955_935.log
0: cmd: exec -s user.cfg
0: cmd: exec -s boot.cfg
0: FPS Sample initialized
0: Build type: release
0: BuildID: AutoBuild
0: Cwd: C:\Users\Public\Documents\Unity Projects\FPSSample\AutoBuild
0: SimpleBundleManager initialized
0: LevelManager initialized
0: InputSystem initialized
0: Loaded game config
0: cmd: serve Terrain_Test_A
1: loading:AssetBundles/level_menu
1: loading:AssetBundles/level_menu
1: Loading Assets/Scenes/Level_Menu/Level_Menu_Background.unity
1: Game loop ServerGameLoop requested
2: Switching state: null -> Idle
2: Listening on 192.168.0.59 on port 7913
2: Network server initialized
2: loading:AssetBundles/Terrain_Test_A
[ERR] Unable to open archive file: AssetBundles/Terrain_Test_A
2: ERROR : Cannot load level : Terrain_Test_A
2: Server initialized
3: Stripping code for Server (DevBuild)
3: Stripping 0 game object(s) and 6 behavior(s)
3: Scene level_menu loaded
207: cmd: menu 1 3
209: NullReferenceException: Object reference not set to an instance of an object
13820: Client 0 disconnected
13820: Last package sent : 4518 . Last package received 1777 28 ms ago
14296: Client 0 disconnected
14296: Last package sent : 157 . Last package received 79 5 ms ago
14845: Client 0 disconnected
14845: Last package sent : 181 . Last package received 91 3 ms ago
15593: Client 0 disconnected
15593: Last package sent : 247 . Last package received 125 4 ms ago
18194: Client 0 disconnected
18194: Last package sent : 864 . Last package received 423 4 ms ago
18830: Client 0 disconnected
18830: Last package sent : 210 . Last package received 104 3 ms ago
19042: Client 0 disconnected
19042: Last package sent : 69 . Last package received 34 3 ms ago
19196: Client 0 disconnected
19196: Last package sent : 50 . Last package received 25 19 ms ago
20594: cmd: quit
20594: Farewell, cruel world...

I somehow cant connect the client and server says oh client 0 disconnected on each attempt.
This for shure is not intended. Any hint what is wrong this time?

2: loading:AssetBundles/Terrain_Test_A
[ERR] Unable to open archive file: AssetBundles/Terrain_Test_A
2: ERROR : Cannot load level : Terrain_Test_A
2: Server initialized
3: Stripping code for Server (DevBuild)
3: Stripping 0 game object(s) and 6 behavior(s)
3: Scene level_menu loaded
207: cmd: menu 1 3
209: NullReferenceException: Object reference not set to an instance of an object

I don’t think you have the full clone of the project from github, or at least these errors are showing not everything compiled, and initial inconsistent compiles lead to these types of errors “unable to find” “null reference” meaning the files are being pointed to, but they don’t exist (aka didn’t get compiled, or perhaps even downloaded.)

Command line GIT with LFS (Large File Support) command should be this:

mkdir c:\where_you_want_the_clone
git clone GitHub - Unity-Technologies/FPSSample: A first person multiplayer shooter example project in Unity c:\where_you_want_the_clone

Then re-import, re-do all the stuff (t:models re-import, firstperson script reimport) and recompile everything. The Burst Compiler errors should remain, but the missing content should resolve.

I have the full project and had some trouble before as you can see here Problem at opening the project for the first time - Learn Content & Certification - Unity Discussions where you also gave the information i needed.

I think i found the error because the log says Terrain_Test_A but i think i want Level_00.
Under Quick start section Level is set wrong but i thought there might be a problem with the levels and hit the Levels force button and have to wait until i can test this.

Nope this is making it worse. Now the Game isnt even showing a server on localhost.

0: GameDebug initialized. Logging to ./game_20181220_202522_668.log
0: cmd: exec -s user.cfg
0: cmd: exec -s boot.cfg
0: FPS Sample initialized
0: Build type: release
0: BuildID: AutoBuild
0: Cwd: C:\Users\Public\Documents\Unity Projects\FPSSample\AutoBuild
0: SimpleBundleManager initialized
0: LevelManager initialized
0: InputSystem initialized
0: Loaded game config
0: cmd: serve Level_00
1: loading:AssetBundles/level_menu
1: loading:AssetBundles/level_menu
1: Loading Assets/Scenes/Level_Menu/Level_Menu_Background.unity
1: Game loop ServerGameLoop requested
2: Switching state: null -> Idle
2: Listening on 192.168.0.59 on port 7913
2: Network server initialized
2: loading:AssetBundles/Level_00
2: Game loop initialization threw exception : (TODO : Implement unload during load)
at LevelManager.UnloadLevel () [0x00016] in <362d3c068bcc482290460c42e244529e>:0 
at LevelManager.LoadLevel (System.String name) [0x00008] in <362d3c068bcc482290460c42e244529e>:0 
at ServerGameLoop.LoadLevel (System.String levelname, System.String gamemode) [0x0002a] in <362d3c068bcc482290460c42e244529e>:0 
at ServerGameLoop.CmdLoad (System.String[ ] args) [0x00006] in <362d3c068bcc482290460c42e244529e>:0 
at ServerGameLoop.Init (System.String[ ] args) [0x00349] in <362d3c068bcc482290460c42e244529e>:0 
at Game.Update () [0x00189] in <362d3c068bcc482290460c42e244529e>:0 
2: Game loop initialization failed ... reverting to boot loop
3: Stripping code for Default (DevBuild)
3: Stripping 0 game object(s) and 0 behavior(s)
3: Scene level_menu loaded
240: cmd: menu 1 3
242: NullReferenceException: Object reference not set to an instance of an object
6542: cmd: quit
6542: Farewell, cruel world...

This nullRefExcep is also showing up again but without any further hints where it occured or what type of object.

to give a small update…
I thought it would be best to start from beginning again. I deleted the whole folder and got a new clone.
Setup is finished and the build running (maybe) as intended. The server starts and the client connects and you can fire up 2 clients to actually play the game.

The 3 compile errors are not gone, blc.exe still fails to runn.
I got some additional out of keywords errors but iam shure they will vanish after 1 or 2 more builds.

When i place the boot.cfg inside the folder iam back at where i was before.
The game then is not directly connecting and spawning my player in the level, instead it is showing the menu but i cannot connect to the server from there because it dont show it in the list.

My conclusion nothing has changed compared to yesterday except i my knowledge off this Project.
I thought about why the server fails when i have the boot.cfg in the folder. I wonder if the server also is trying to open the menu and fails because of that. So maybe this command should only bee applied to the client.
I dont know maybe someone here have some god leads for me.

It would also be nice if someone can explain why these compiler errors are occuring and how they can be fixed.