Commit 7418105
[Xamarin.Android.Build.Tasks] Use full path to create designer output directory. (#1542)
Fixes: #1541
We missed one area in the changes where we worked around the
WorkingDirectory issues (45efffe): we were not using the full path
to create the directory where the java `R.java` files are output.
As a result we ended up with the following error:
Error Access to the path 'obj\Debug\monoandroid81\android\src' is denied.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.Directory.InternalCreateDirectory(String fullPath, String path, Object dirSecurityObj, Boolean checkHost)
at System.IO.Directory.InternalCreateDirectoryHelper(String path, Boolean checkHost)
at System.IO.Directory.CreateDirectory(String path)
at Xamarin.Android.Tasks.Aapt.GenerateCommandLineCommands(String ManifestFile, String currentAbi, String currentResourceOutputFile)
at Xamarin.Android.Tasks.Aapt.ProcessManifest(ITaskItem manifestFile)
Once again this is due to the working directory changing in the
thread that we are using.
So the solution is to use the full path to create the folder. In
theory because we use the `WorkingDirectory` on the process we should
NOT need to pass the full path as the command line argument. While
that might be a safer option we might well run into issues were we
exceed the max path or max command line length on Windows.1 parent 3f7eca4 commit 7418105
1 file changed
+2
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
330 | 330 | | |
331 | 331 | | |
332 | 332 | | |
333 | | - | |
| 333 | + | |
| 334 | + | |
334 | 335 | | |
335 | 336 | | |
336 | 337 | | |
| |||
0 commit comments