Unity 2017.1 - Build to PC results in errors

I just downloaded 2017.1, have my project imported and it plays fine no errors. When I go to File>Build and try to build for PC, i hit build and nothing happens, then i proceed to play my scene again and it behaves unplayable now. Also now all the scripts in my hierarchy have a yellow exclamation point that say “The associated script can not be loaded. Please fix any compile errors and assign a valid script”. There are no compile errors. Then i go into VS 2017 and there’s missing references to all Unity libraries. I am unable to fix.

Well i tried with Unity 5.6 and it’s the same. I recently had a team member check in some changes and everything got wonky… The game and scene plays fine until I try to go to build… then even if i restart unity the scripts all remain missing with yellow exclamation points. Does anybody know why this is?

So here’s unity after I try to build for any platform using File>Build. The build selection does not load the normal “compiling” progress bar the program flickers and then loses control back to unity.


Before I build I can play, debug and breakpoint in V.S… after wards I cannot. I have to go to Assets>Reimport All Assets to have a playable scene again.

After i hit build, the breakpoints in visual studio debugger show exclamation points as well, that say when hovered over: “The breakpoint will not currently be hit. Unable to find a corresponding location”

One thing i noted is if i went to build player settings and changed api to .net 2.0 instead of .net 2.0 subset, the scripts are magically found again. Until i try to build to platform…

Heres the end of the editor.log file:

*** Cancelled 'Build.Player.WindowsStandaloneSupport' in 2 seconds (2121 ms)

UnityEditor.BuildPlayerWindow+BuildMethodException: Build failed with errors.
  at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (BuildPlayerOptions options) [0x001b9] in C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindowBuildMethods.cs:162 
  at UnityEditor.BuildPlayerWindow.CallBuildMethods (Boolean askForBuildLocation, BuildOptions defaultBuildOptions) [0x00050] in C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindowBuildMethods.cs:83 
UnityEngine.DebugLogHandler:Internal_Log(LogType, String, Object)
UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
UnityEngine.Logger:Log(LogType, Object)
UnityEngine.Debug:LogError(Object)
UnityEditor.BuildPlayerWindow:CallBuildMethods(Boolean, BuildOptions) (at C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindowBuildMethods.cs:88)
UnityEditor.BuildPlayerWindow:GUIBuildButtons(IBuildWindowExtension, Boolean, Boolean, Boolean, BuildPlatform) (at C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindow.cs:1026)
UnityEditor.BuildPlayerWindow:ShowBuildTargetSettings() (at C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindow.cs:953)
UnityEditor.BuildPlayerWindow:OnGUI() (at C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindow.cs:593)
System.Reflection.MonoMethod:InternalInvoke(Object, Object[], Exception&)
System.Reflection.MonoMethod:Invoke(Object, BindingFlags, Binder, Object[], CultureInfo) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)
System.Reflection.MethodBase:Invoke(Object, Object[]) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MethodBase.cs:115)
UnityEditor.HostView:Invoke(String, Object) (at C:\buildslave\unity\build\Editor\Mono\HostView.cs:272)
UnityEditor.HostView:Invoke(String) (at C:\buildslave\unity\build\Editor\Mono\HostView.cs:265)
UnityEditor.HostView:OnGUI() (at C:\buildslave\unity\build\Editor\Mono\HostView.cs:94)

(Filename: /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs Line: 222)

:roll_eyes:

There was a build error, that apparently makes all the scripts in the scene say associated script is missing along with visual studio errors… strange, but fixed script and done. Do I feel green…