Search Issue Tracker
Not Reproducible
Votes
2
Found in
5.2.2p3
Issue ID
744338
Regression
Yes
Switching platforms "DirectoryNotFoundException" error occurs in the console
Switching platforms "DirectoryNotFoundException" error occurs in the console. Error is NOT HARMFUL, likely doesn't affect anything.
Reproducible on 5.2, 5.3 versions. On 5.1 not reproducible.
This happens when Unity is installed in non default location
default - c:\program files\Unity...
not default - d:\Unity...
1. What happened
Switching platforms I get such error:
DirectoryNotFoundException: Could not find a part of the path "C:\Users\WinUser\Documents\New Unity Project\Library\UnityAssemblies\version.txt".
System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean anonymous, FileOptions options) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.IO/FileStream.cs:292)
System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share)
(wrapper remoting-invoke-with-check) System.IO.FileStream:.ctor (string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare)
System.IO.StreamWriter..ctor (System.String path, Boolean append, System.Text.Encoding encoding, Int32 bufferSize) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.IO/StreamWriter.cs:124)
System.IO.StreamWriter..ctor (System.String path, Boolean append)
(wrapper remoting-invoke-with-check) System.IO.StreamWriter:.ctor (string,bool)
System.IO.File.CreateText (System.String path) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.IO/File.cs:159)
SyntaxTree.VisualStudio.Unity.Bridge.ProjectFilesGenerator.CreateVersionFile (System.String[] assemblies)
SyntaxTree.VisualStudio.Unity.Bridge.ProjectFilesGenerator.DeployUnityAssemblies (SyntaxTree.VisualStudio.Unity.Bridge.ProjectSystem.UnitySolution solution)
SyntaxTree.VisualStudio.Unity.Bridge.ProjectFilesGenerator.GenerateProject ()
UnityEditor.EditorUserBuildSettings.Internal_ActiveBuildTargetChanged () (at C:/buildslave/unity/build/artifacts/generated/common/editor/InternalUtilityBindings.gen.cs:536)
UnityEditor.HostView:OnGUI()
2. How we can reproduce it using the example you attached
Must be related to a fact, that error only occurs, when Unity editor is installed at custom directory (not default c:\program files\Unity.....).
I have installed editor in "D:\Unity 5.2.2\Editor" path.
Repro steps:
Error can be reproduced by opening new empty project and switching platforms (PC -> Android / Android -> iOS / iOS -> PC).
Comments (1)
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Editor Perforce login fails when Perforce shows a license expiry warning
- Assertion failed error in HDRP builds when enabling STP via script
- FBX Resamples Curves incorrectly when importing FBX files
- ProBuilder GameObject Faces disappear when increasing the Sides Count value
- FileUtil.CopyFileOrDirectory throws IOException when destination parent folder does not exist
Numli
Dec 06, 2015 18:10
I only get this error with an empty project, if I create a script in the assets folder (an empty one seems sufficient) then the error goes away. I also have Unity installed on a secondary drive. The only affect of this bug is that the Game window doesn't show the platform specific resolutions as it should.