This question already has an answer here:
Closed 10 years ago.
Possible Duplicate:
Adding NuGet ndef library to windows phone 8 project
While trying to install the WPtoolkit i get the following error...
PM> Install-Package WPtoolkit
Successfully installed 'WPtoolkit 4.2012.10.30'.
Successfully uninstalled 'WPtoolkit 4.2012.10.30'.
Install failed. Rolling back...
Install-Package : Could not install package 'WPtoolkit 4.2012.10.30'. You are trying to install this package into a project that targets 'WindowsPhone,Version=v8.0', but the packag
e does not contain any assembly references that are compatible with that framework. For more information, contact the package author.
At line:1 char:1
Is there something that am i missing?
The NuGet is updated to the latest version too...
A ha!
At the FAQ's section...
Q - I have WP8 SDK and I installed the NuGet package, it is still installing the 7.1 version of the toolkit assembly, or I get an error – “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.”
A – You have an older version of NuGet.
Install the latest NuGet from www.NuGet.org . Close and restart all the
instances of Visual Studio.
Now install the package. It will install correctly.
WP8 projects are supported from Nuget 2.1 onwards.
After that go to xaml page type
Related
I have added 2 custom package sources. If I search in nuget package manager, I find my package. If I install the package it fails with the following error:
Restoring packages for .NETStandard,Version=v2.1...
GET https://api.nuget.org/v3-flatcontainer/mypackage.test/index.json
NotFound https://api.nuget.org/v3-flatcontainer/mypackage.test/index.json 125ms
Resolving conflicts for .NETStandard,Version=v2.1...
Unable to find package mypackage.test. No packages exist with this id in source(s): nuget.org
Package restore failed. Rolling back package changes for 'FormsApp1'.
In the logging I see that package manager only searches in nuget.org and not in my custom sources.
I am using VS for mac 17.4.2, Nuget 6.4.0.117
Questions:
How do I tell package manager to also search in my custom sources?
How do I install a specific version of nuget on Mac? I would like to try version 6.3.1.1.
I solved this issue by installing VS2019.
When installing VS2019 it replaces VS2022. But you can install VS2022 Preview alongside. After installing VS2019, the package manager works correctly in VS2019 as well as VS2022 Preview.
So I guess the installation of VS2022 is broken as it was a fresh install on a new laptop.
I am trying to install a version of a package that is not the latest on the public Nuget repository. (because each version requires blessings from the corporate technology controls department) With the Package Manager UI in Visual Studio 2012, I did not find an option to install an older version. With the commandline tool, I don't see an option to save the package version and its dependency versions into packages.config (which the UI does automatically). The package has 50 dependencies and sub-dependencies. Is there a way to achieve both older version and save to packages.config?
I am trying to install package Microsoft.CodeAnalysis using Nuget
It does download a lot of packages and then it rolls back every thing and gives me the following error
An error occurred while downloading package 'System.Reflection.Metadata 1.2.0' from source 'https://www.nuget.org/api/v2/'
Does someone have any solution for this ?
I was able to temporary workaround it by installing beta version of this package:
Install-Package System.Reflection.Metadata -Pre
I am attempting to update my program but installing Windows Azure Storage 3.0.3.0 via NuGet but when I do this I get the following:
Attempting to resolve dependency 'Microsoft.Data.OData (≥ 5.6.0)'.
Attempting to resolve dependency 'System.Spatial (= 5.6.1)'.
Attempting to resolve dependency 'Microsoft.Data.Edm (= 5.6.1)'.
Attempting to resolve dependency 'Newtonsoft.Json (≥ 5.0.6)'.
Attempting to resolve dependency 'Microsoft.Data.Services.Client (≥ 5.6.0)'.
Attempting to resolve dependency 'Microsoft.Data.OData (= 5.6.0)'.
Already referencing a newer version of 'Microsoft.Data.OData'.
To be honest I think this an issue with the released package as I know it is new.
As anyone seen this before? If so how have you resolved this problem?
I know I could just rollback OData to the version that is supported but wondered if there were other options?
From the your comments it looks like they already had a version of Odata greater than 5.6.1 installed in your project.
Therefore:
Since the dependency graph generated on install would dictate the Odata be 5.6.0
And the you already has a higher version of Odata installed in your project
The installation of the package should fail, as we will not downgrade any package during an install-package or update-package
For how to fix this, first make sure you have at least the 2.8 version of NuGet installed. Then you should use the Package Manager Console and enter:
Update-package Microsoft.data.odata –version 5.6.0
Then either:
Install-package windowsazure.storage –version 3.0.3
Or:
Update-package windowsazure.storage –version 3.0.3
Depending on whether it’s an upgrade or an install of the Windows Azure storage libraries.
I fixed the exact same problem by downgrading these to 5.6.0:
Microsoft.Data.OData
Microsoft.Data.Edm
System.Spatial
After updating Windows Azure Storage to 3.0.3.0 I was able to re-update them to 5.6.1.
I found this command useful to downgrade:
uninstall-package <package> -force
-force will continue regardless of dependencies, but in this case we are adding them back so that should be fine.
Microsoft.Data.Services.Client is looking for Microsoft.Data.OData version equal to 5.6.0. However as per the dependency of Windows Azure Storage 3.0.3.0 it looks for Microsoft.Data.OData version >= 5.6.0, so latest version of Microsoft.Data.OData gets installed which is higher than 5.6.0.
So while installing Microsoft.Data.Services.Client it finds that there is already higher incompatible version of Microsoft.Data.OData installed and fails to update the nuget package.
Easiest solution to this problem is as below:
If you are updating the Windows Azure Storage nuget package please follow below steps:
Update the Microsoft.Data.OData version to 5.6.0 using nuget package
manager command Update-Package Microsoft.Data.OData -Version 5.6.0
Update the nuget package Windows Azure Storage to 3.0.3.0
If you are installing the Windows Azure Storage nuget package, follow below steps:
Install the Microsoft.Data.OData version to 5.6.0 using nuget
package manager command Install-Package Microsoft.Data.OData
-Version 5.6.0
Install the nuget package Windows Azure Storage 3.0.3.0
Just type in the below command in Package Manager Console.
PM> Install-package windowsazure.storage –version 3.0.3
I am trying to install the MvvmCross nuget package into a PCL but am having no luck. I am trying to sift through the noise but everything I try does not seem to work.
I have the PCL profiles setup as per: http://slodge.blogspot.co.uk/2013/04/my-current-pcl-setup-in-visual-studio.html (and a number of existing stackoverflow pages)
I am trying to install:
MvvmCross.HotTuna.StartPack Version: 3.0.10
Using Package Manager Version 2.7.40808.167
But this is the error I get:
Package Manager Console Host Version 2.7.40808.167
Type 'get-help NuGet' to see all available NuGet commands.
PM> install-package MvvmCross
Attempting to resolve dependency 'MvvmCross.HotTuna.StarterPack (≥ 3.0.10)'.
Attempting to resolve dependency 'MvvmCross.HotTuna.MvvmCrossLibraries (≥ 3.0.10)'.
Attempting to resolve dependency 'MvvmCross.HotTuna.CrossCore (≥ 3.0.10)'.
Attempting to resolve dependency 'MvvmCross.PortableSupport (≥ 3.0.10)'.
Installing 'MvvmCross.PortableSupport 3.0.10'.
Successfully installed 'MvvmCross.PortableSupport 3.0.10'.
Installing 'MvvmCross.HotTuna.CrossCore 3.0.10'.
Successfully installed 'MvvmCross.HotTuna.CrossCore 3.0.10'.
Installing 'MvvmCross.HotTuna.MvvmCrossLibraries 3.0.10'.
Successfully installed 'MvvmCross.HotTuna.MvvmCrossLibraries 3.0.10'.
Installing 'MvvmCross.HotTuna.StarterPack 3.0.10'.
Successfully installed 'MvvmCross.HotTuna.StarterPack 3.0.10'.
Installing 'MvvmCross 3.0.10'.
Successfully installed 'MvvmCross 3.0.10'.
Adding 'MvvmCross.PortableSupport 3.0.10' to PortableClassLibrary4.
Uninstalling 'MvvmCross.PortableSupport 3.0.10'.
Successfully uninstalled 'MvvmCross.PortableSupport 3.0.10'.
Install failed. Rolling back...
install-package : Could not install package 'MvvmCross.PortableSupport 3.0.10'. You are trying to > install this package into a project that targets 'portable-net45+MonoAndroid16+MonoTouch10+sl40+wp71+win', 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.
At line:1 char:1
+ install-package MvvmCross
+ ~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Install-Package], InvalidOperationException
+ FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PowerShell.Commands.InstallPackageCommand
Any suggestions??
you don't need to tweak the profiles anymore. Go to your profiles folder where you have put those xml files and delete the custom files.
You will see that you won't be able to create references to PCLs in droid or iOS projects using VS normal methods, but fear not. The new way to do it is by editing the csproj file in order to manually add the needed references.
You will be able to see the warning symbol into the references pseudo-folder in your vs project but it will work flawlessly.
Now try to install the nuget package. It should work. At least is working for me.
Please, watch this great video tutorial from #CheeseBaron if you want to know more: http://www.youtube.com/watch?v=8Q5kcW1rhB8
Cheers!
#Newton_W
I have similar problem with MvvmCross Nuget package. Once I upgraded and installed the latest version of Nuget in VS studio. This problem resolved for me. You may give it a try.