- Home /
Unity not able to "Build and Run"
I have been trying to build and run my project, and I have recently started to run into an error when doing "Build and Run", when Deploying the Player Unity always gives this error:
BuildFailedException: Failed to build Visual Studio project using arguments 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\MSBuild.exe "C:\Users\Person\Desktop\Birbo master of bees\Builds\Birbo Master of Bees.sln" /nologo /maxcpucount /p:Configuration=Release /p:Platform=x64 /p:SolutionDir="C:\\Users\\Person\\Desktop\\Birbo master of bees\\Builds\\" /t:Build /clp:Verbosity=minimal'.
Output: Building GameAssembly.dll with MsvcWinRtToolChain
Msvc Install Version: 15.0
Msvc Install SDK Directory: C:\Program Files (x86)\Windows Kits\10
Msvc Linker Path: C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.25.28610\bin\HostX64\x64\link.exe
Msvc Compiler Path: C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.25.28610\bin\HostX64\x64\cl.exe
Output directory: C:\Users\Person\Desktop\Birbo master of bees\Builds\build\bin\x64\Release
Cache directory: C:\Users\Person\Desktop\Birbo master of bees\Builds\build\obj\il2cppOutputProject\x64\Release
[Many files here]
[Many warnings here]
ApplicationLauncherImpl.RunMSBuild (System.String args, Utility+VisualStudio vs) (at C:/buildslave/unity/build/PlatformDependent/MetroPlayer/Extensions/Managed/ApplicationLauncher.cs:478)
ApplicationLauncherImpl.Build (Utility+VisualStudio vs) (at C:/buildslave/unity/build/PlatformDependent/MetroPlayer/Extensions/Managed/ApplicationLauncher.cs:333)
ApplicationLauncher.BuildAndRunProject (UnityEditor.Modules.BuildLaunchPlayerArgs args, UnityEditor.WSABuildAndRunDeployTarget deployTarget, System.String platform, Utility+VisualStudio vs) (at C:/buildslave/unity/build/PlatformDependent/MetroPlayer/Extensions/Managed/ApplicationLauncher.cs:67)
ApplicationLauncher.BuildAndRun (UnityEditor.Modules.BuildLaunchPlayerArgs args) (at C:/buildslave/unity/build/PlatformDependent/MetroPlayer/Extensions/Managed/ApplicationLauncher.cs:39)
UnityEditor.UWP.BuildPostprocessor.LaunchPlayer (UnityEditor.Modules.BuildLaunchPlayerArgs args) (at C:/buildslave/unity/build/PlatformDependent/MetroPlayer/Extensions/Managed/ExtensionModule.cs:77)
UnityEditor.PostprocessBuildPlayer.Launch (UnityEditor.BuildTargetGroup targetGroup, UnityEditor.BuildTarget buildTarget, System.String path, System.String productName, UnityEditor.BuildOptions options, UnityEditor.Build.Reporting.BuildReport buildReport) (at <6f28216fea9f453abf2e05b770ed3ee4>:0)
UnityEditor.BuildPlayerWindow:BuildPlayerAndRun()
I have shortened the error message though I still cannot find any solution to this error, I have updated Visual Studio and have also installed C++ debugging tools, this only started yesterday, before that, everything was working fine, and I had not changed anything, any help with this would be appreciated.
I have also looked through some other messages and this may help:
UnityEditor.BuildPlayerWindow+BuildMethodException: 2 errors
at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (UnityEditor.BuildPlayerOptions options) [0x00275] in <6f28216fea9f453abf2e05b770ed3ee4>:0
at UnityEditor.BuildPlayerWindow.CallBuildMethods (System.Boolean askForBuildLocation, UnityEditor.BuildOptions defaultBuildOptions) [0x00080] in <6f28216fea9f453abf2e05b770ed3ee4>:0
UnityEditor.BuildPlayerWindow:BuildPlayerAndRun()
Answer by My-Second-Opinions-first · May 11, 2020 at 09:26 PM
I just figured it out, I was building for Windows instead of PC mac and linux
Your answer
Follow this Question
Related Questions
Build & Run doesn't finish 0 Answers
windows store unhandled win32 exception JIT-Debugger? 0 Answers
VSC and Unity 0 Answers
vscode - exclude directories from warnings + code style linter 0 Answers