hello everyone,
im getting an error when building for standalone.
BuildFailedException: Burst compiler (1.2.0-preview.8) failed running
stdout:
Burst requires Visual Studio (installable via Add Component in the Unity Installer) & the C++ build tools for Visual Studio, along with the Windows 10 SDK in order to build a standalone player for Windows with X64_SSE4
Unable to determine tools version of MSVC Linker, please ensure you have visual studio installed correctly!
stderr:
Unity.Burst.Editor.BurstAotCompiler+BclRunner.RunProgram (UnityEditor.Utils.Program p, System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser, UnityEditor.Build.Reporting.BuildReport report) (at Library/PackageCache/com.unity.burst@1.2.0-preview.8/Editor/BurstAotCompiler.cs:725)
Unity.Burst.Editor.BurstAotCompiler+BclRunner.RunManagedProgram (System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser, UnityEditor.Build.Reporting.BuildReport report) (at Library/PackageCache/com.unity.burst@1.2.0-preview.8/Editor/BurstAotCompiler.cs:663)
Unity.Burst.Editor.BurstAotCompiler+BclRunner.RunManagedProgram (System.String exe, System.String args, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser, UnityEditor.Build.Reporting.BuildReport report) (at Library/PackageCache/com.unity.burst@1.2.0-preview.8/Editor/BurstAotCompiler.cs:637)
Unity.Burst.Editor.BurstAotCompiler.OnPostBuildPlayerScriptDLLsImpl (UnityEditor.Build.Reporting.BuildReport report) (at Library/PackageCache/com.unity.burst@1.2.0-preview.8/Editor/BurstAotCompiler.cs:332)
Unity.Burst.Editor.BurstAotCompiler.OnPostBuildPlayerScriptDLLs (UnityEditor.Build.Reporting.BuildReport report) (at Library/PackageCache/com.unity.burst@1.2.0-preview.8/Editor/BurstAotCompiler.cs:90)
UnityEditor.Build.BuildPipelineInterfaces.OnPostBuildPlayerScriptDLLs (UnityEditor.Build.Reporting.BuildReport report) (at <8fdb511b120d4b249e3a836bb395bfee>:0)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
You need to install Visual Studio with the C++ build tools, along with the Windows 10 SDK.
In the Add Modules there is an option to install the Visual Studio, the other stuff (if not installed by default) you should install through the Visual Studio itself.
im not using the Visual Studio but the JetBrains Rider.
XD the most awesome thing on this is fixed it by commenting the [BurstCompile] Attribute on a new Job i created.
//[BurstCompile]
private struct ProcessReceivedMessagesJob : IJob
{
public DataStreamWriter ServerBuffer;
public ComponentDataFromEntity<MovementInput> MovementInputFromEntity;
public ComponentDataFromEntity<AimInput> AimInputFromEntity;
[ReadOnly] public NativeArray<Entity> AllPlayersEntities;
public void Execute()
{
if (ServerBuffer.Length == 0)
return;
var streamReader = new DataStreamReader(ServerBuffer,0, ServerBuffer.Length);
// Iterates over all Messages From Server
var readerCtx = default(DataStreamReader.Context);
while (streamReader.GetBytesRead(ref readerCtx) < streamReader.Length)
{
var messageId = streamReader.ReadByte(ref readerCtx);
switch (messageId)
{
// Set Inputs to All Concerned Players
case MessageBufferIndexes.Server_PlayersJoySticksInputs:
Debug.Log("Client:Players JoySticks Inputs Server Received ");
var concernedPlayersMask = streamReader.ReadUInt(ref readerCtx);
for (var playerId = 0; playerId < 32; playerId++)
{
// Continue Player not int Message
if (!NetworkingUtils.BitByIndex(concernedPlayersMask, playerId)) continue;
var joystickInput = new JoystickInputs { };
//Read Construct and set MovementInputs
joystickInput.Deserialize(streamReader, ref readerCtx);
MovementInputFromEntity[AllPlayersEntities[playerId]].FromJoystickInput(joystickInput);
//Read Construct and set AimInputs
joystickInput.Deserialize(streamReader, ref readerCtx);
AimInputFromEntity[AllPlayersEntities[playerId]].FromJoystickInput(joystickInput);
}
break;
default:
Debug.Log("Client: Oops Unknown Message");
//TODO: Handle Unknown Messages From Server
break;
}
}
ServerBuffer.Clear();
}
}
So your solution to getting burst to work in standalone build is turning burst off?
As your error quite plainly states burst requires c++ build tools. Technically I don’t believe you need visual studios installed just the tools but it’s easier if you just install it all.
at the end i found out i forgot to comment the Debug.log lines and that’s why the job cant be bursted, but the error shown had nothing to do with the build problem.
Oh, that is unfortunate, the error message should only be shown if we detect the pre-required components are missing at the start of compilation, not if there is an error during compilation. I`ll try and recreate that locally and log an issue.
I am running into this exact same problem. Visual Studio 2019 was installed separately from Unity Hub (As part of writing down Docker step by step instruction). Both C++ Development for Windows and Universal Platform tools were also manually installed separately. I’m already pulling my hair out trying to figure out what’s the missing piece to bundle all of this together.
Using Unity 2019.4.21f1
Visual Studio 2019
Windows 10 Enterprise
Burst v1.4.8 (Since I cannot upgrade to a newer version of burst if Unity does not have xbox one or PS5 build target. )
Already have both Desktop development with C++ and Universal Windows Platform Development installed from Visual Studio Installer.
I was getting this error. Just want to share my findings. Everything was working well on a game i had made which i come back to every now and then to make small updates, I am using an older version of Unity that I don’t want to upgrade due to possilby breaking my game. then i suddenly was getting this error when building. (as well as performance spikes from Vegetation Studio Pro)
It turns out because I had installed a newer version of Visual Studio to work on a new game, as well as keeping the older one that was originally tied to my game, I was getting these performance issues and this burst error when building.
I solved my problem by uninstalling the newer version of Visual Studio and things automatically improved. I couldn’t believe it. anyway, just posting here in case someone else has the same error