So I tried to add the NDEF library for proximity application in Visual Studio 2012 for a Windows Phone 8 app. In Package Manager I checked Allow NuGet to download missing packages during build and in the Solution Explorer I selected Enable NuGet Package Restore.
So far so good, but when i try to install the package I get the following error:
Could not install package 'NdefLibrary 0.9.0.1'. You are trying to install this package into a project that targets 'WindowsPhone,Version=v8.0', but the package does not contain any assembly references that are compatible with that framework. For more information, contact the package author.
This works fine on my dev box. Here's the output from my NuGet package manager on a WP8 project:
PM> Install-Package NdefLibrary
You are downloading NdefLibrary from Andreas Jakl, the license agreement to which is available at https://ndef.codeplex.com/license. Check the package for additional dependencies, which may come with their own license agreement(s). Your use of the package and dependencies constitutes your acceptance of their license agreements. If you do not accept the license agreement(s), then delete the relevant components from your device.
Successfully installed 'NdefLibrary 0.9.0.1'.
Successfully added 'NdefLibrary 0.9.0.1' to Wp8TestApp.
What you're probably missing is to update your NuGet package manager to the latest version. Go to Visual Studio File Menu --> Tools --> Extensions and Updates --> Updates --> Visual Studio Gallery --> NuGet --> Update and finally you'll need to restart. The reason why this update is needed is that the NuGet version that ships with VS2012 RTM doesn't support WP8 since WP8 didn't RTM before VS2012 did.
Related
I've created a simple package, only consisting of a couple of binaries in the
tools folder. The package is created with NuGet version 4.4.1.4656.
A local folder has been initialized with nuget init and contains said package. VS2017 Package Manager shows the package as expected, whereas VS2012 does not.
There are no available updates for the Package Manager in VS2012, which is at version 2.8.60318.667.
How do I get the feed to work with VS2012, so I can install the package in one of our older solutions? Is this a compatibilty issue?
Any pointers are welcome!
I have updated xamarin ios from classic api to unified api.
When i trying to add Mvvmcross nuget package it shows following error
Could not install package 'MvvmCross.PortableSupport 3.2.2'. You are trying to install
this package into a project that targets 'Xamarin.iOS,Version=v1.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.
Please help.
The MvvmCross.PortableSupport 3.2.2 NuGet package contains an empty Portable Class Library folder and can be installed into a Xamarin.iOS project if you have the Portable Class Libraries installed for Xamarin and if you have the latest version of NuGet installed.
So you may not have the PCLs installed for Xamarin or, if you are using Visual Studio, then your NuGet version may be too old and need to be updated.
To get the Portable Class Libraries:
If you are on the Mac you should install the Mono Development Kit (MDK).
If you are on Windows then things are can be more complicated. The simplest way is to install Visual Studio 2013 (full or Express) Update 2 or higher. The more complicated way is to install the Portable Library Tools and the Portable Library Reference Assemblies 4.6. The Portable Library Reference assemblies installs a PortableReferenceAssemblies.zip file which contains three directories (4.0, 4.5 and 4.6). These three directories need to be extracted and copied into the PCLs directory:
C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETPortable
Finally on Windows you would then need to reinstall Xamarin. The easiest way to do this is to find Xamarin in the Control panel's Programs and Features and select the option to Repair it.
It's a provider hosted project. It used to work until very recently.
If I create a completely new project/solution, then it works.
If I start the old one, or redownload it from source control, I get the following error:
NuGet Package restore failed for project LocalTheaterWeb: Unable to find version '3.0.1' of package 'AppForSharePoint16WebToolkit'
I tried Update-Package -Reinstall but the problem stays.
Any ideas?
The solution of Scott Hillier did it for me:
http://www.shillier.com/archive/2014/08/05/nuget-package-restore-fails-for-sharepoint-2013-provider-hosted-apps.aspx
I often take advantage of the NuGet Package Restore capability to
reduce the size of my projects when saving or sharing them. Today, I
discovered an issue with this process when building SharePoint 2013
Provider-Hosted Apps against SharePoint Online. Here are the steps to
reproduce and the fix:
Create a Provider-Hosted App in Visual Studio 2013 using a SharePoint Online site for debugging.
Right click solution and "Enable NuGet Package Restore"
Save and Close Project
Delete the “packages” folder from project directory
Open Project in Visual Studio 2013
Rebuild, receive error “Unable to find AppForSharePoint16WebToolkit”
Open Packages.config file
Change “AppForSharePoint16WebToolkit” to “AppForSharePointWebToolkit”
Rebuild – successfully this time. Apparently, the "AppForSharePoint16WebToolkit" package is not available through the
NuGet Package Manager, but the older "AppForSharePointWebToolkit"
package is available.
The error message suggests that NuGet cannot find the AppForSharePoint16WebToolkit package in your package sources. So check the following:
The correct package source is selected whilst doing the Update-Package -Reinstall.
Check the package source that hosts the NuGet package is enabled. If you are using a recent version of NuGet the package restore should use all the enabled package sources.
See if the solution or project has its own NuGet.config which is overriding the package sources.
Without further information my guess is 3. since you say it works for a new project.
You can also run Fiddler to see what package sources NuGet is using as it tries to restore.
For older "locked down" projects with specific package version numbers that you can't update, un-check "Automatically check for missing packages during build in Visual Studio" which is found via:
Nuget Package Manager > Package Manager Settings
This means that if you toggle between newer projects and older projects you need to check and un-check this setting
I have the same problem as in topic: Can not install NuGet package . I suppose that I should update my NuGet Package Manager. I try to make it as described here: https://docs.nuget.org/docs/start-here/installing-nuget . But in updates I have not items. Thus my question is how can I update my NuGet Manager? I can not find good instructions. I am using Visual Studio 2012 (Express edition for Windows Desktop).
I tried to add the AdDuplex AdControl in Visual Studio 2012 for a Windows Phone 8 app by following this Link.
But it shows the error in the image.
How could i install this Adduplex pack into the project.
In Your VS 2012 Tools => library package manager => CLick package manager console
Now Enter
PM>Install-Package AdDuplexWindows
The issue (most likely) is that you are adding this to a project that used to be a Windows Phone 7.x project, right? In this case nuget gets confused and displays this error.
A fix is to remove all the nuget references from your project and re-add them.
I had the same issue. Fixed it by updating NuGet first:
http://docs.nuget.org/docs/start-here/installing-nuget
"Updating NuGet in Visual Studio"
After updating NuGet I was able to install AdDuplex.