Closed nicolasjinchereau closed 9 years ago
"Access to the path "/lib" is denied." The leading slash shouldn't be there for a relative path.. is this within the scope of Mono-D, or is this a monodevelop problem?
Could this happen if ToRelative is called a second time on an OutputPath which is already relative? Will ToRelative() on a relative Output path against the project base dir make the output path relative to the root?
sry for the late answer, the problem is mono-d's fault. It should be easy to fix.
Awesome, thanks =)
This ugly-ass addins publishing system from MonoDevelop still isn't working again.. meh :/ Please get mono-d from here for now http://mono-d.alexanderbothe.com/repo/MonoDevelop.D_2.11.2.mpack
Xamarin Studio 5.9.427
When I tried to install MonoDevelop.D_2.11.2.mpack, I got this error: "The installation failed! Could not read addin description."
After the above error, I restarted XS, and the plugin seemed to have installed anyways, but building my project gave the same error as before.
Then, I downloaded Mono-D source, and ran it myself (pushing play in XS) and things seemed to be working.
totally confused.
Please excuse the extra circumstances. It's currently a rather complicated situation with a new major release of Xamarin Studio being rolled out (slowly). When building Mono-D on your own, you need to put the MonoDevelop.D.dll and D_Parser.dll somewhere into the Addins-folder of XamarinStudio. Otherwise it won't take the custom build.
I tried copying MonoDevelop.D.dll, and all dependancies into /Applications/Xamarin Studio.app/Contents/Resources/lib/monodevelop/AddIns/MonoDevelop.D/
Now, it seems to be installed, but still giving the same error.
"Access to the path "/lib" is denied."
you have to edit the project settings once again, so leading and traling slashs will be stripped off.
I did, and the box now reads "lib/macosx/Debug" which is correct
so has the problem been solved then? :)
Not sure... I'm just gonna wait until the published version comes out. I still don't have an answer for why it works when I run it with XS attached, but then fails when I build/install the addin..
Anyways, thanks for the help!
https://bugzilla.xamarin.com/show_bug.cgi?id=28945 I already filed an issue report a couple of weeks ago, so they will hopefully fix the publishing issue soon. Thanks for your patience! :)
It's ok. They have to run out of things to break sooner or later ;)
I'm looking at ProjectBuilder.cs right now, but I don't see any code responsible for creating the output path..does XS create it for you?
I guess I should take your silence as RTMF? ;)
Oh, I read the notification mail but forgot to answer. Well, the output path is generated by the project's configuration that is used for building - there, the base path and the relative output path are combined and then used e.g. in ProjectBuilder :)
I meant the actually directory on the HD. I did a search for "Directory.Create" and found only the code for creating the Objects directory. I checked CBinding too, which also has no such code, so I'm gonna assume XS "tries" to create it for you.
Not sure, perhaps even dmd is responsible for this. Or XS itself. I didn't spend a look on the code for too long now, so I can't remember anymore.
Ok, thanks again.
Ok, Sorry to keep bothering you, but I think I found a fix.
Basically, I'm assigning an absolute path to ProjectOptions.OutputDirectory.
When XS saves the project to file, it automatically makes the path relative to SolutionDir, and when the project is loaded from file, the relative path is converted back into absolution and stored in ProjectOptions.OutputDirectory.
So I changed to this, and now everything is working again:
Load() { text_BinDirectory.Text = config.OutputDirectory.ToRelative(proj.BaseDirectory); ...
Store() { configuration.OutputDirectory = new FilePath(text_BinDirectory.Text).ToAbsolute(project.BaseDirectory);
Is it? Okay nice, didn't expect something like this (although it makes more than sense that XS does this on its own)
Seems to be the case on OSX. Ill check on windows to make sure.
Ok, tested on windows, and it works too. Windows 8.1, OSX Yosemite, XS 5.9, git head + my changes
What did you change to get it working (my changes
)?
I did a pull for it. It seems that your original code should behave exactly the same, but the current version of mono-D breaks for me.
I did the very same you did. Thanks for the recommendations though!
Ok, I guess I'll just put this bug report on my resume ;) Thanks
I think I may close this issue then.
2.10.8 In project properties for a static library project, I set the "Output directory" on "Linking" page to an absolution path. Project builds fine. When I open project properties again, "Output directory" has been converted to a relative path. If I push "OK" to save the settings again, project will not build.
Error:
Build failed. Can't create project output directory lib/macosx/Debug original exception: System.UnauthorizedAccessException: Access to the path "/lib" is denied. at System.IO.Directory.CreateDirectoriesInternal (System.String path) [0x00000] in:0
at System.IO.Directory.CreateDirectory (System.String path) [0x00000] in :0
at System.IO.DirectoryInfo.Create () [0x00000] in :0
at (wrapper remoting-invoke-with-check) System.IO.DirectoryInfo:Create ()
at System.IO.Directory.CreateDirectoriesInternal (System.String path) [0x00000] in :0
at System.IO.Directory.CreateDirectory (System.String path) [0x00000] in :0
at System.IO.DirectoryInfo.Create () [0x00000] in :0
at (wrapper remoting-invoke-with-check) System.IO.DirectoryInfo:Create ()
at System.IO.Directory.CreateDirectoriesInternal (System.String path) [0x00000] in :0
at System.IO.Directory.CreateDirectory (System.String path) [0x00000] in :0
at System.IO.DirectoryInfo.Create () [0x00000] in :0
at (wrapper remoting-invoke-with-check) System.IO.DirectoryInfo:Create ()
at MonoDevelop.Projects.Project.OnBuild (IProgressMonitor monitor, MonoDevelop.Projects.ConfigurationSelector configuration) [0x00092] in /Users/builder/data/lanes/1494/04666fd4/source/monodevelop/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/Project.cs:447
Build: 1 error, 0 warnings