Bug 29088 - Custom NuGet feed package operations fail.
Summary: Custom NuGet feed package operations fail.
Status: RESOLVED DUPLICATE of bug 28984
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: NuGet ()
Version: 5.9
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: 5.9
Assignee: Matt Ward
URL:
Depends on:
Blocks:
 
Reported: 2015-04-14 12:57 UTC by Jon Douglas [MSFT]
Modified: 2015-04-23 05:06 UTC (History)
3 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
NuGet (115.79 KB, image/png)
2015-04-14 12:57 UTC, Jon Douglas [MSFT]
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED DUPLICATE of bug 28984

Description Jon Douglas [MSFT] 2015-04-14 12:57:32 UTC
Created attachment 10753 [details]
NuGet

*Description

This is a possible regression issue as Custom NuGet feeds work just fine in XS 5.8.2 and 5.8.3. However in XS 5.9, custom nuget feeds seem to not work as intended. It seems that all operations on packages that come from the custom feed fail, see attached screenshot regarding more information.

*Replication

1. Install XS 5.9(Currently on Alpha)
2. Xamarin Studio -> Preferences -> NuGet -> Sources -> Add(Custom NuGet Feed Information)
EX: Mobile Essentials / http://gallery.mobileessentials.org/feed.atom

Note: This is not 100% reproducible, but has happened to myself a couple times while playing around with various custom NuGet feeds using XS 5.9.

Please let me know if anything else is needed.
Comment 1 Michael Teper 2015-04-14 13:11:21 UTC
This is 100% reproducible for every member of my team against our TeamCity NuGet feed.
Comment 2 Matt Ward 2015-04-14 13:20:23 UTC
Please can you provide the IDE log?
Comment 3 Matt Ward 2015-04-14 13:36:32 UTC
I can repro with Team City. It looks to be a Mono 4.0 installer problem. The Mono 4.0 installer is not creating the directory:

/Library/Frameworks/Mono.framework/Versions/4.0.0/etc/mono/registry

The workaround is to create the above directory. The registry subdirectory is missing.

Exception callstack:

ex	{System.Security.SecurityException: No access to the given key ---> System.UnauthorizedAccessException: Access to the path "/Library/Frameworks/Mono.framework/Versions/4.0.0/etc/mono/registry" is denied.   at System.IO.Directory.CreateDirectoriesInternal (System.String path) [0x00064] in /private/tmp/source-mono-mac-4.0.0-branch/bockbuild-mono-4.0.0-branch/profiles/mono-mac-xamarin/build-root/mono-4.0.0/mcs/class/corlib/System.IO/Directory.cs:111    at System.IO.Directory.CreateDirectory (System.String path) [0x000a4] in /private/tmp/source-mono-mac-4.0.0-branch/bockbuild-mono-4.0.0-branch/profiles/mono-mac-xamarin/build-root/mono-4.0.0/mcs/class/corlib/System.IO/Directory.cs:78    at System.IO.DirectoryInfo.Create () [0x00000] in /private/tmp/source-mono-mac-4.0.0-branch/bockbuild-mono-4.0.0-branch/profiles/mono-mac-xamarin/build-root/mono-4.0.0/mcs/class/corlib/System.IO/DirectoryInfo.cs:143    at (wrapper remoting-invoke-with-check) System.IO.DirectoryInfo:Create ()   at System.IO.Directory.CreateDirectoriesInternal (System.String path) [0x00039] in /private/tmp/source-mono-mac-4.0.0-branch/bockbuild-mono-4.0.0-branch/profiles/mono-mac-xamarin/build-root/mono-4.0.0/mcs/class/corlib/System.IO/Directory.cs:96    at System.IO.Directory.CreateDirectory (System.String path) [0x000a4] in /private/tmp/source-mono-mac-4.0.0-branch/bockbuild-mono-4.0.0-branch/profiles/mono-mac-xamarin/build-root/mono-4.0.0/mcs/class/corlib/System.IO/Directory.cs:78    at Microsoft.Win32.KeyHandler..ctor (Microsoft.Win32.RegistryKey rkey, System.String basedir, Boolean is_volatile) [0x0004a] in /private/tmp/source-mono-mac-4.0.0-branch/bockbuild-mono-4.0.0-branch/profiles/mono-mac-xamarin/build-root/mono-4.0.0/mcs/class/corlib/Microsoft.Win32/UnixRegistryApi.cs:136    --- End of inner exception stack trace ---   at Microsoft.Win32.KeyHandler..ctor (Microsoft.Win32.RegistryKey rkey, System.String basedir, Boolean is_volatile) [0x00057] in /private/tmp/source-mono-mac-4.0.0-branch/bockbuild-mono-4.0.0-branch/profiles/mono-mac-xamarin/build-root/mono-4.0.0/mcs/class/corlib/Microsoft.Win32/UnixRegistryApi.cs:138    at Microsoft.Win32.KeyHandler..ctor (Microsoft.Win32.RegistryKey rkey, System.String basedir) [0x00000] in /private/tmp/source-mono-mac-4.0.0-branch/bockbuild-mono-4.0.0-branch/profiles/mono-mac-xamarin/build-root/mono-4.0.0/mcs/class/corlib/Microsoft.Win32/UnixRegistryApi.cs:116    at Microsoft.Win32.KeyHandler.Lookup (Microsoft.Win32.RegistryKey rkey, Boolean createNonExisting) [0x000ce] in /private/tmp/source-mono-mac-4.0.0-branch/bockbuild-mono-4.0.0-branch/profiles/mono-mac-xamarin/build-root/mono-4.0.0/mcs/class/corlib/Microsoft.Win32/UnixRegistryApi.cs:412    at Microsoft.Win32.UnixRegistryApi.OpenSubKey (Microsoft.Win32.RegistryKey rkey, System.String keyname, Boolean writable) [0x00000] in /private/tmp/source-mono-mac-4.0.0-branch/bockbuild-mono-4.0.0-branch/profiles/mono-mac-xamarin/build-root/mono-4.0.0/mcs/class/corlib/Microsoft.Win32/UnixRegistryApi.cs:834    at Microsoft.Win32.RegistryKey.OpenSubKey (System.String name, Boolean writable) [0x0001e] in /private/tmp/source-mono-mac-4.0.0-branch/bockbuild-mono-4.0.0-branch/profiles/mono-mac-xamarin/build-root/mono-4.0.0/mcs/class/corlib/Microsoft.Win32/RegistryKey.cs:268    at Microsoft.Win32.RegistryKey.OpenSubKey (System.String name) [0x00000] in /private/tmp/source-mono-mac-4.0.0-branch/bockbuild-mono-4.0.0-branch/profiles/mono-mac-xamarin/build-root/mono-4.0.0/mcs/class/corlib/Microsoft.Win32/RegistryKey.cs:252    at (wrapper remoting-invoke-with-check) Microsoft.Win32.RegistryKey:OpenSubKey (string)   at NuGet.EnvironmentUtility.get_IsNet45Installed () [0x00012] in <filename unknown>:0    at NuGet.RequestHelper.GetResponse () [0x00329] in <filename unknown>:0    at NuGet.HttpClient.GetResponse () [0x00036] in <filename unknown>:0    at MonoDevelop.PackageManagement.PackageSourceViewModelChecker.CheckHttpPackageSource (ICSharpCode.PackageManagement.PackageSourceViewModel packageSource) [0x0000b] in main/src/addins/MonoDevelop.PackageManagement/MonoDevelop.PackageManagement/PackageSourceViewModelChecker.cs:85 }	System.Security.SecurityException
Comment 4 Michael Teper 2015-04-14 14:04:54 UTC
Matt, I created the following folder and it made no difference. Where do I find the log you were interested in?

/Library/Frameworks/Mono.framework/Versions/4.0.0/etc/mono/registry
Comment 5 Matt Ward 2015-04-14 14:09:41 UTC
You can get to the IDE log by opening the Help menu and selecting Open Log Directory. If possible can you reproduce the problem using the Add Packages dialog instead of the Package Sources. That should log a exception callstack.
Comment 6 Michael Teper 2015-04-14 14:28:39 UTC
The log contained a similar access error for

/Library/Frameworks/Mono.framework/Versions/4.0.0/etc/mono/4.5/../registry/LocalMachine

Once I created that folder, I no longer got an error.
Comment 7 Matt Ward 2015-04-15 07:42:17 UTC
I have patched NuGet to not check the registry on Mono. The changes are on a separate branch:

https://github.com/mono/monodevelop/tree/5.9-nuget-disable-registry-check

If the Mono installer is modified to create the registry/LocalMachine directory then the NuGet change would not be required to fix this bug.
Comment 8 Marek Safar 2015-04-16 09:40:30 UTC

*** This bug has been marked as a duplicate of bug 28984 ***
Comment 9 Alexis Christoforides 2015-04-22 16:29:13 UTC
I haven't been able to reproduce the behavior, but the missing directories are now included in the following package for testing:

http://storage.bos.internalx.com/mono-mac-4.0.0-branch/fd/fd35b80befe1c66f6cb580c637dc649aed086bc0/MonoFramework-MDK-4.0.0.145.macos10.xamarin.x86.pkg
Comment 10 Matt Ward 2015-04-23 05:06:52 UTC
@Alexis - The Mono 4.0.0.145 package fixes the problem, thanks.