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.
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.
My goal is to write a C# program to test with Cassandra database.
In VS2013, I've tried .NET 4.51, 4.5, 4.0, and even 3.5. With 4.5 this is the error I get:
PM> Install-Package CassandraCSharpDriver Attempting to resolve
dependency 'lz4net (≥ 1.0.10.93)'. Attempting to resolve dependency
'Microsoft.Extensions.Logging (≥ 1.0.0)'. Attempting to resolve
dependency 'Microsoft.Extensions.Logging.Abstractions (≥ 1.0.0)'.
Installing 'lz4net 1.0.15.93'. Successfully installed 'lz4net
1.0.15.93'. Installing 'Microsoft.Extensions.Logging 1.0.2'. You are downloading Microsoft.Extensions.Logging from
Microsoft.Extensions.Logging, the license agreement to which is
available at
http://www.microsoft.com/web/webpi/eula/net_library_eula_enu.htm.
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
'Microsoft.Extensions.Logging 1.0.2'. Installing
'Microsoft.Extensions.Logging.Abstractions 1.0.2'. You are downloading
Microsoft.Extensions.Logging.Abstractions from
Microsoft.Extensions.Logging.Abstractions, the license agreement to
which is available at
http://www.microsoft.com/web/webpi/eula/net_library_eula_enu.htm.
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
'Microsoft.Extensions.Logging.Abstractions 1.0.2'. Installing
'CassandraCSharpDriver 3.2.1'. Successfully installed
'CassandraCSharpDriver 3.2.1'. Adding 'lz4net 1.0.15.93' to
CassandraTester. Successfully added 'lz4net 1.0.15.93' to
CassandraTester. Adding 'Microsoft.Extensions.Logging 1.0.2' to
CassandraTester. Uninstalling 'Microsoft.Extensions.Logging 1.0.2'.
Successfully uninstalled 'Microsoft.Extensions.Logging 1.0.2'.
Uninstalling 'lz4net 1.0.15.93'. Successfully uninstalled 'lz4net
1.0.15.93'. Install failed. Rolling back... Install-Package : Could not install package 'Microsoft.Extensions.Logging 1.0.2'. You are
trying to install this package into a project that targets
'.NETFramework,Version=v4.5', 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 CassandraCSharpDriver
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Install-Package], InvalidOperationException
+ FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PowerShell.Commands.InstallPackageCommand
PM>
So far my get-around has been to go back to a prior version:
Install-Package CassandraCSharpDriver -Version 3.1.0
I found the version history here: https://www.nuget.org/packages/CassandraCSharpDriver
At least it installed now.
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
When I try to install MvvmCross into a new PCL I receive an error. The console log is below:
Package Manager Console Host Version 2.5.40416.9020
Type 'get-help NuGet' to see all available NuGet commands.
PM> install-package MvvmCross
Attempting to resolve dependency 'MvvmCross.HotTuna.StarterPack (≥ 3.0.6)'.
Attempting to resolve dependency 'MvvmCross.HotTuna.CrossCore (≥ 3.0.6)'.
``Attempting to resolve dependency 'MvvmCross.PortableSupport (≥ 3.0.6)'.
Installing 'MvvmCross.PortableSupport 3.0.6'.
Successfully installed 'MvvmCross.PortableSupport 3.0.6'.
Installing 'MvvmCross.HotTuna.CrossCore 3.0.6'.
Successfully installed 'MvvmCross.HotTuna.CrossCore 3.0.6'.
Installing 'MvvmCross.HotTuna.StarterPack 3.0.6'.
Successfully installed 'MvvmCross.HotTuna.StarterPack 3.0.6'.
Installing 'MvvmCross 3.0.6'.
Successfully installed 'MvvmCross 3.0.6'.
Adding 'MvvmCross.PortableSupport 3.0.6' to Clevermed.Badger.Mobile.Core.
Uninstalling 'MvvmCross.PortableSupport 3.0.6'.
Successfully uninstalled 'MvvmCross.PortableSupport 3.0.6'.
Install failed. Rolling back...
install-package : Specified argument was out of the range of valid values.
Parameter name: supportedFrameworks
At line:1 char:1
+ install-package MvvmCross
+ ~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Install-Package], ArgumentOutOfRangeException
+ FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PowerShell.Commands.InstallPackageCommand
I'm using Profile104 as described in http://slodge.blogspot.com/2013/04/my-current-pcl-setup-in-visual-studio.html
This is a similar but separate error to MvvMCross 3.0.6 Nuget package installation issue
Furthermore, if I right click on the solution and 'Manage NuGet packages' I receive the error 'Specified argument was out of the range of valid values. Parameter name: supportedFrameworks'.
Any ideas how I can debug this further?
I had similar issue while installing MvvMCross 3.0.6 Nuget package. I had raised a similar question MvvMCross 3.0.6 Nuget package installation issue
So I followed Stuarts suggestion and referred the MvvmCross dll's directly in the project which worked like a charm. You can download the MvvMCross code from https://github.com/slodge/MvvmCross.
I'm not sure, but what version of NuGet are you running?
To get the MonoTouch and MonoAndroid support (and some of the Portable support) you will need Nuget 2.5 installed
Just as a side note (and dunno if it's going to fix this): you can check your nuget version in Tools > Extensions and Updates. Here you can view the list of your installed packages, as well as their version.
Also, if you nuget package manager is out of date, it will show up under the 'Updates' category.
... on the other hand, you package manager console says it's version 2.5.something, so I'm guessing you're up to date on that one.
I'm not sure how, but I had an empty Profile104 folder in C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETPortable\v4.5\Profile
Probably a left over form my first attempts.
Removing this empty directory allowed the installation to complete without error.
Not sure, but could there be an issue with the NuGet package MvvmCross.PortableSupport ?
Click the image to see it in full resolution...
Also check the NuGet docs for details on the supported Target Framework variables: http://docs.nuget.org/docs/creating-packages/creating-and-publishing-a-package#Matching_Assembly_Version_to_the_Target_Framework_of_a_Project
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