jamesmontemagno / DeviceInfoPlugin

Device Information Plugin for Xamarin and Windows
Other
145 stars 44 forks source link

Won't install in my .Net Standard 2.0 project #50

Closed stesvis closed 6 years ago

stesvis commented 6 years ago

Bug Information

Version Number of Plugin: 3.1.0 Device Tested On: Samsung S5 Neo Simulator Tested On: Version of VS: 2017 15.5.7 Version of Xamarin: 4.8.0.760 Versions of other things you are using: Xamarin Forms app with .NET Standard 2.0

Steps to reproduce the Behavior

Expected Behavior

Package installed

Actual Behavior

It installs on the Android and iOS project, but not in the .Net Standard 2.0 project

Install-Package Xam.Plugin.DeviceInfo -Version 3.1.0 GET https://api.nuget.org/v3/registration3-gz-semver2/xam.plugin.deviceinfo/index.json OK https://api.nuget.org/v3/registration3-gz-semver2/xam.plugin.deviceinfo/index.json 250ms GET https://dotnet.myget.org/F/aspnetcore-dev/Packages(Id='Xam.Plugin.DeviceInfo',Version='3.1.0') GET http://nuget.syncfusion.com/nuget_xamarin/nuget/getsyncfusionpackages/xamarin/Packages(Id='Xam.Plugin.DeviceInfo',Version='3.1.0') Error finding repository for 'https://www.myget.org/F/aspnetvnext/': An error occurred while retrieving package metadata for 'Xam.Plugin.DeviceInfo.3.1.0' from source 'AspnetVnext'. A task was canceled. Error finding repository for 'http://nuget.syncfusion.com/nuget_xamarin/nuget/getsyncfusionpackages/xamarin': An error occurred while retrieving package metadata for 'Xam.Plugin.DeviceInfo.3.1.0' from source 'Syncfusion_Xamarin'. A task was canceled. Restoring packages for R:\VeloGuide\VeloGuideApp\VeloGuideApp\VeloGuideApp\VeloGuideApp.csproj... Installing NuGet package Xam.Plugin.DeviceInfo 3.1.0. Committing restore... Writing lock file to disk. Path: R:\VeloGuide\VeloGuideApp\VeloGuideApp\VeloGuideApp\obj\project.assets.json Restore completed in 258.04 ms for R:\VeloGuide\VeloGuideApp\VeloGuideApp\VeloGuideApp\VeloGuideApp.csproj. Committing restore... Assets file has not changed. Skipping assets file writing. Path: R:\VeloGuide\VeloGuideApp\VeloGuideApp\VeloGuideApp.iOS\obj\project.assets.json Restore completed in 23.87 ms for R:\VeloGuide\VeloGuideApp\VeloGuideApp\VeloGuideApp.iOS\VeloGuideApp.iOS.csproj. Committing restore... Assets file has not changed. Skipping assets file writing. Path: R:\VeloGuide\VeloGuideApp\VeloGuideApp\VeloGuideApp.Android\obj\project.assets.json Restore completed in 35.46 ms for R:\VeloGuide\VeloGuideApp\VeloGuideApp\VeloGuideApp.Android\VeloGuideApp.Android.csproj.

NuGet Config files used: C:\Users\stesv\AppData\Roaming\NuGet\NuGet.Config C:\Program Files (x86)\NuGet\Config\Microsoft.VisualStudio.Offline.config C:\Program Files (x86)\NuGet\Config\Microsoft.VisualStudio.Offline.Fallback.config

Feeds used: C:\Program Files (x86)\Microsoft SDKs\NuGetPackages\ http://nuget.syncfusion.com/nuget_xamarin/nuget/getsyncfusionpackages/xamarin https://api.nuget.org/v3/index.json https://www.myget.org/F/aspnetvnext/ Executing nuget actions took 171.52 ms Time Elapsed: 00:00:01.8669523

Code snippet

var appVersion = CrossDeviceInfo.Current.AppVersion;

Screenshotst

image

jamesmontemagno commented 6 years ago

Looks like your nuget configs are confused. Just edit the csproj. Installs for me just fine.