xunit / devices.xunit

xUnit.net Runners for Devices
Other
73 stars 36 forks source link

Cannot install for Xamarin.Android #42

Closed 304NotModified closed 7 years ago

304NotModified commented 8 years ago

Installation of the Nuget packages gives an error and rolls back. What am I doing wrong?

I tried also the '2.0.0-build0007' version, same error.

Could not install package 'xunit.runner.utility 2.1.0'. You are trying to install this package into a project that targets 'MonoAndroid,Version=v5.0', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author.

Full log:

PM> Install-Package xunit.runner.devices
Attempting to resolve dependency 'xunit.core (≥ 2.1.0)'.
Attempting to resolve dependency 'xunit.extensibility.core (= 2.1.0)'.
Attempting to resolve dependency 'xunit.abstractions (= 2.0.0)'.
Attempting to resolve dependency 'xunit.extensibility.execution (= 2.1.0)'.
Attempting to resolve dependency 'xunit.runner.utility (≥ 2.1.0)'.
Attempting to resolve dependency 'Xamarin.Forms (≥ 1.5.1.6471)'.
Attempting to resolve dependency 'Xamarin.Android.Support.v4 (≥ 23.0.1.1)'.
Attempting to resolve dependency 'Xamarin.Android.Support.Design (≥ 23.0.1.1)'.
Attempting to resolve dependency 'Xamarin.Android.Support.v7.AppCompat (≥ 23.0.1.1)'.
Attempting to resolve dependency 'Xamarin.Android.Support.v7.CardView (≥ 23.0.1.1)'.
Attempting to resolve dependency 'Xamarin.Android.Support.v7.MediaRouter (≥ 23.0.1.1)'.
Installing 'xunit.runner.utility 2.1.0'.
Successfully installed 'xunit.runner.utility 2.1.0'.
Installing 'Xamarin.Android.Support.v4 23.0.1.1'.
Successfully installed 'Xamarin.Android.Support.v4 23.0.1.1'.
Installing 'Xamarin.Android.Support.v7.AppCompat 23.0.1.1'.
Successfully installed 'Xamarin.Android.Support.v7.AppCompat 23.0.1.1'.
Installing 'Xamarin.Android.Support.Design 23.0.1.1'.
Successfully installed 'Xamarin.Android.Support.Design 23.0.1.1'.
Installing 'Xamarin.Android.Support.v7.CardView 23.0.1.1'.
Successfully installed 'Xamarin.Android.Support.v7.CardView 23.0.1.1'.
Installing 'Xamarin.Android.Support.v7.MediaRouter 23.0.1.1'.
Successfully installed 'Xamarin.Android.Support.v7.MediaRouter 23.0.1.1'.
Installing 'Xamarin.Forms 1.5.1.6471'.
Successfully installed 'Xamarin.Forms 1.5.1.6471'.
Installing 'xunit.runner.devices 1.3.2'.
Successfully installed 'xunit.runner.devices 1.3.2'.
Adding 'xunit.runner.utility 2.1.0' to NLog.UnitTests.Xamarin.Android.
Uninstalling 'xunit.runner.utility 2.1.0'.
Successfully uninstalled 'xunit.runner.utility 2.1.0'.
Install failed. Rolling back...
Install-Package : Could not install package 'xunit.runner.utility 2.1.0'. You are trying to install this package into a project that targets 'MonoAndroid,Version=v5.0', but the package does not contain any assembly references or content files that are compatible with that framew
ork. For more information, contact the package author.
At line:1 char:1
+ Install-Package xunit.runner.devices
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Install-Package], InvalidOperationException
    + FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PowerShell.Commands.InstallPackageCommand

PM> 
clairernovotny commented 8 years ago

What version of VS and what version of NuGet do you have installed there? xunit.runner.utility contains a PCL 259 and is compatible with Xamarin.Android.

304NotModified commented 8 years ago

VS2013, NuGet 2.8.6

clairernovotny commented 8 years ago

Hmm...what version of Xamarin do you have installed? Do you have VS 2013 Update 5 installed?

I have the Update 5 for VS 2013 and the latest stable Xamarin installed. The Extensions and Updates shows NuGet as 2.8.60723.765.

I went to file -> new blank Android application, then in the NuGet UI, added xunit.runner.devices. It all installed ok.

304NotModified commented 8 years ago

Thanks for testing. It's also VS2013 Update 5 here.

I will try from the GUI

304NotModified commented 8 years ago

image

Same steps (new blank app) and also NuGet 2.8.60723.765

I will try now with update of Xamarin.

clairernovotny commented 8 years ago

Did the Xamarin update resolve this?

304NotModified commented 8 years ago

Sorry, has a small holiday.

No it did not. I tried reinstalling xunit, and also failed with the same error:

install-package : Could not install package 'xunit.extensibility.core 2.1.0'. You are trying to install this package into a project that targets 'MonoAndroid,Version=v5.0', but the package does not contain any assembly references or content files that are com
patible with that framework. For more information, contact the package author.
At line:1 char:1

It seems to be working in VS2015, but I really like to have it working in VS2013

clairernovotny commented 8 years ago

It's probably a NuGet bug....just curious why VS 2013 though if 2015 work?

bradwilson commented 8 years ago

curious why VS 2013 though if 2015 work?

Because VS 2013 uses NuGet 2.x, and 2015 uses NuGet 3.x.

clairernovotny commented 8 years ago

No, I get that. I'm curious as to why the need to continue using VS 2013 here. There definitely seems to be a bug with NuGet's compatible frameworks list that has since been fixed.

304NotModified commented 8 years ago

Well I don't like to force the community to use vs2015 and also I have seen enough issues in vs2015 already (crashes VS, crashes compiler, performance issues) .

I have used every version of visual studio since VS 2003, and my experience is that every new version has (big) issues at the start. So I'm a bit defense with upgrading.

siwakornapichit commented 7 years ago

Xamarin has big issue about update package in visual studio. If I update package in nuget manager It always have problem about remove and update System.Runtime or System.Runtime.InteropServices 4.0.0.