I run Xamarin (4.0.10 build 5) on Mac OS X (10.9). I created ASP.NET MVC 3 project. First run gave error with Microsoft.AspNet.WebPages. I solved this issue following this article and fixed it. Now when I run it gives another error:
System.UnauthorizedAccessException Access to the path "/Library/Frameworks/Mono.framework/Versions/3.2.0/etc/mono/registry" is denied.
Stack trace:
at System.IO.Directory.CreateDirectoriesInternal (System.String path) [0x00064] in /private/tmp/source/bockbuild-xamarin/profiles/mono-mac-xamarin-no-pcl/build-root/mono-3.2.0/mcs/class/corlib/System.IO/Directory.cs:113 at System.IO.Directory.CreateDirectory (System.String path) [0x000a4] in /private/tmp/source/bockbuild-xamarin/profiles/mono-mac-xamarin-no-pcl/build-root/mono-3.2.0/mcs/class/corlib/System.IO/Directory.cs:80 at System.IO.DirectoryInfo.Create () [0x00000] in /private/tmp/source/bockbuild-xamarin/profiles/mono-mac-xamarin-no-pcl/build-root/mono-3.2.0/mcs/class/corlib/System.IO/DirectoryInfo.cs:141 at (wrapper remoting-invoke-with-check) System.IO.DirectoryInfo:Create () at System.IO.Directory.CreateDirectoriesInternal (System.String path) [0x00039] in /private/tmp/source/bockbuild-xamarin/profiles/mono-mac-xamarin-no-pcl/build-root/mono-3.2.0/mcs/class/corlib/System.IO/Directory.cs:98 at System.IO.Directory.CreateDirectory (System.String path) [0x000a4] in /private/tmp/source/bockbuild-xamarin/profiles/mono-mac-xamarin-no-pcl/build-root/mono-3.2.0/mcs/class/corlib/System.IO/Directory.cs:80 at Microsoft.Win32.KeyHandler..ctor (Microsoft.Win32.RegistryKey rkey, System.String basedir, Boolean is_volatile) [0x0004a] in /private/tmp/source/bockbuild-xamarin/profiles/mono-mac-xamarin-no-pcl/build-root/mono-3.2.0/mcs/class/corlib/Microsoft.Win32/UnixRegistryApi.cs:136
Please help me to solve this issue.
On a Linux machine running Arch distribution I made the following changes to make the security issue work:
sudo mkdir /etc/mono/registry
sudo mkdir /etc/mono/registry/LocalMachine
sudo chmod g+rwx /etc/mono/registry/
sudo chmod g+rwx /etc/mono/registry/LocalMachine
See if this blog post helps you.
(a crack at a solution)
sudo mkdir /Library/Frameworks/Mono.framework/Versions/Current/etc/mono/registry
sudo chmod g+rwx /Library/Frameworks/Mono.framework/Versions/Current/etc/mono/registry
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With