Search Issue Tracker

Fixed in 2018.1.X

Fixed in 2017.2.X, 2017.3.X

Votes

1

Found in

2017.1.0f3

Issue ID

940555

Regression

No

[UWP] Build fails with System.IO.FileNotFoundException thrown after switching Target Version from older to newer in VS

Steps to reproduce:
1. Create a new Unity project
2. Create a new Scene
3. Build for UWP (make sure scripting backend is selected to .NET and SDK - the latest installed)
4. Open VS solution
5. Open project settings(in VS)
6. Change 'Target Version' to 'Windows 10 Anniversary Edition (10.0; Build 14393)'
7. Change 'Target Version' back to 'Windows 10 Creators Update (10.0; Build 15063)'
8. Build & deploy on local machine (Release x86)

Actual result: build fails with System.IO.FileNotFoundException thrown

Reproducible with: 5.6.3f1, 2017.1.0p3, 2017.2.0b6, 2017.3.0a3

Fixed in: 2017.3.0b8, 2018.1.0a2

System.IO.FileNotFoundException: Could not find file 'D:\DOWNLOADS\Fresh\30a3\Fresh\project.lock.json'.
File name: 'D:\DOWNLOADS\Fresh\30a3\Fresh\project.lock.json'
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.StreamReader..ctor(String path, Encoding encoding, Boolean detectEncodingFromByteOrderMarks, Int32 bufferSize, Boolean checkHost)
at System.IO.File.InternalReadAllText(String path, Encoding encoding, Boolean checkHost)
at System.IO.File.ReadAllText(String path)
at UnityEditor.Scripting.Compilers.NuGetPackageResolver.Resolve()
at Unity.UWPAssemblyResolver..ctor(String projectLockFile, String desiredUWPSDKVersion)
at Unity.OperationContext.SetPlatform(Platform platform, String projectLockFile, String uwpSDK)
at Unity.ParseArgsStep.Execute()
at Unity.Step.Execute(OperationContext operationContext, IStepContext previousStepContext)
at Unity.Operation.Execute()
at Unity.Program.Main(String[] args)

Comments (2)

  1. rickomax

    Sep 21, 2017 00:00

    We should not downgrade Visual Studio. Unity should upgrade the compatibility.

  2. sandeepika

    Aug 23, 2017 14:14

    This issue is only for the Visual Studio 2017 15.3 version, downgrading to VS 2017 15.2 or older will resolve the issue

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.