Bug 55601 - Cannot add .NET 1.4 Standard based Nuget package that depend on Microsoft.Rest.ClientRuntime
Summary: Cannot add .NET 1.4 Standard based Nuget package that depend on Microsoft.Res...
Alias: None
Product: Android
Classification: Xamarin
Component: General ()
Version: 7.1 (C9)
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Jonathan Pryor
Depends on:
Reported: 2017-04-25 23:35 UTC by hvusr5
Modified: 2017-08-25 22:50 UTC (History)
3 users (show)

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

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:

Description hvusr5 2017-04-25 23:35:41 UTC
Our .NET standard library depend on AutoRest (https://github.com/Azure/autorest) generated classes. And as such have a dependency on Microsoft.Rest.ClientRuntime Nuget package. When we try to restore the Nuget package in our Xamarin Android app we are getting - "Unable to find a version of 'Microsoft.NETCore.Runtime' that is compatible with 'Microsoft.Rest.ClientRuntime 3.0.3 constraint: Microsoft.NETCore.Runtime (>= 1.0.2-rc2-24027)'", and the Nuget package doesn't get installed.

Repro steps-

1. Create a test library based on .NET standard 1.4
2. Include "Microsoft.Rest.ClientRuntime" nuget package
3. Create Nuspec for test library
4. Create a Nuget package from Nuget CLI
5. Create a Xamarin Android based app
6. Try to install the Nuget package that was just created in the Xamarin android app

Actual result-

Severity	Code	Description	Project	File	Line	Suppression State
Error		Unable to find a version of 'Microsoft.NETCore.Runtime' that is compatible with 'Microsoft.Rest.ClientRuntime 3.0.3 constraint: Microsoft.NETCore.Runtime (>= 1.0.2-rc2-24027)'.			0

Expected result-
Nuget gets installed with no issues
Comment 1 Jon Douglas [MSFT] 2017-04-27 22:33:30 UTC
Non-engineering team preliminary quick review

## Suspected to be a regression or a problem with a new feature?

I do not suspect a regression or problem with Xamarin. I believe the issue is within the source code of the https://www.nuget.org/packages/Microsoft.Rest.ClientRuntime/ nuget. Previous stable works.  

## Includes clear steps to reproduce the problem and a clear description of the actual vs. expected behavior?

The steps are clear, however the reproduction NuGet link and other various version information is lacking. Actual vs. expected behavior is not reproducible with given information.

## Considers the relevant log files for the part(s) of the process where something goes wrong (IDE editing, MSBuild building, deploying, launching, attaching the debugger, an in-app error, or something else), and has them attached?

There is an error message attached, but no formal NuGet Package Manager Output logs. This would be extremely helpful in this case.

## Comments

I attempted to repro these steps and was not successful with the referenced project. I was actually able to add this package based on the repro steps in https://bugzilla.xamarin.com/show_bug.cgi?id=55601#c0

Adding package 'Microsoft.NETCore.Platforms.1.1.0' to folder 'C:\Users\dougl\documents\visual studio 2017\Projects\ClassLibrary7\packages'
Added package 'Microsoft.NETCore.Platforms.1.1.0' to folder 'C:\Users\dougl\documents\visual studio 2017\Projects\ClassLibrary7\packages'
Added package 'Microsoft.NETCore.Platforms.1.1.0' to 'packages.config'
Successfully installed 'Microsoft.NETCore.Platforms 1.1.0' to App1

Unfortunately I believe this issue is because the only stable `Microsoft.Rest.ClientRuntime` is 2.3.6. In your logs it shows 3.0.3 as the version. Where can one get that version of the package?

I checked https://www.nuget.org/packages/Microsoft.Rest.ClientRuntime/ however there's no preview package available.

Attempted Reproduction Steps:

1. Create a .NET standard 1.4 class library
2. Include "Microsoft.Rest.ClientRuntime" NuGet package (Version 2.3.6 as it's the latest on NuGet)
3. Create Nuspec/Nupkg for .net standard library (Right click project and "Pack")
4. Create a Xamarin Android Blank Application
5. Try to install the NuGet package into the Xamarin.Android project(Via adding a local package source of the nupkg)

Package Successfully Installs:

Successfully installed 'ClassLibrary7 1.0.0' to App1
Executing nuget actions took 31.83 sec
Time Elapsed: 00:00:36.5366608
========== Finished ==========

## Next Steps

Please provide the following information:

1. NuGet Link to Microsoft.Rest.ClientRuntime 3.0.3
2. NuGet Package Manager Output
3. Clear and concise reproduction steps (As much detail as possible)
4. Visual Studio Information (Help -> About VS)

Thus I am marking this bug as "NEEDINFO".
Comment 2 Jimmy [MSFT] 2017-08-25 22:50:40 UTC
Because we have not received a reply to our request for more information we are closing this issue. If you are still encountering this issue with the latest version of Xamarin, please reopen the ticket with the requested information. Thanks!