-
Notifications
You must be signed in to change notification settings - Fork 526
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Subsequent XABuild do not run #4306
Comments
Ok. I think I miss one important details.
I strongly suspect that this can cause issue like that when symlink point to another physical drive |
@kant2002 do you have "Developer Mode" enabled? https://github.com/xamarin/xamarin-android/blob/f9f5b6cd120484b13df74e94638e07411d8693fa/Documentation/workflow/UsingYourBuild.md#using-your-xamarinandroid-build I don't know if Windows symlinks work across drives, I have a single 2 TB drive. |
Yes. I do have |
@kant2002 you can try the https://docs.microsoft.com/windows-server/administration/windows-commands/mklink Let me know if that works across drives, in general, thanks! You might also try an elevated cmd to see if that works. Developer mode should work without elevation, though. |
For some reasons `Path.GetFullPath (path)` and `GetRealPath (path)` has values which was different case and it reports `bin\Debug\lib\xamarin.android\xbuild\Microsoft` as symlink. Example difference in cases: ``` d:\xamarin-android\bin\Debug\lib\xamarin.android\xbuild\Microsoft <-> D:\xamarin-android\bin\Debug\lib\xamarin.android\xbuild\Microsoft ``` Fix dotnet#4306
I have a feling that there slight misunderstanding. I have no problem create symlink, the problem with removing existing symlink by XABuild. But real cause is more then funny. see upcoming PR |
Fixes: #4306 Context: c36229c [`Path.GetFullPath()`][0] and [`GetFinalPathNameByHandleW()`][1] may return paths with different cases, in particular the file system drive character may be lower-case with `GetFinalPathNameByHandleW()` and upper-case with `Path.GetFullPath()`: * Path.GetFullPath(): D:\xamarin-android\bin\Debug\lib\xamarin.android\xbuild\Microsoft * GetFinalPathNameByHandleW(): d:\xamarin-android\bin\Debug\lib\xamarin.android\xbuild\Microsoft This case difference could cause `xabuild` to attempt to remove a directory when it didn't otherwise need to, which would cause build failures when building within a non-elevated command prompt as the directories -- which were actually symbolic links -- could not be removed by a non-administrative user. [0]: https://docs.microsoft.com/en-us/dotnet/api/system.io.path.getfullpath?view=netframework-4.8 [1]: https://docs.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-getfinalpathnamebyhandlew
Steps to Reproduce
In non-admin console.
Expected Behavior
Symlinks removed
Actual Behavior
First run is ok.
On second run
The text was updated successfully, but these errors were encountered: