Could not install package xxx due to compatibility issues with .NETFramework - c#

More specific , i am trying to download a nugget package named "PushBulletSharp 3.1.0"
and keep receiving the following :
Could not install package 'PushBulletSharp 3.1.0'. You are trying to
install this package into a project that targets
'.NETFramework,Version=v4.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.
I have not the permission to upgrade/change my project's NETFramework version , so i have tried everything else that i have found .
I have changed source package folder, config files , all the package versions , i have also tried to install it locally but still nothing . Any ideas ?
I am using the following :
.NETFramework,Version=v4.0
VS 2015
Windows 10

Related

EMGU error when trying to install Emgu.CV.runtime.windows VS 2019 winforms, framework 4.8

I am trying to install EMGU using Nuget. I am using Framework 4.8. WinForms. I'm able to install Emgu.CV but when I try installing Emgu.CV.runtime.windows I get an error saying:
"Could not install package 'Emgu.runtime.windows.msvc.rt.x64 19.28.29336'. You are trying to install this package into a project that targets '.NETFramework,Version=v4.8', 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.
One solution on stackoverflow (Emgu error when trying to install emgu.CV.runtime.windows in VC# 2017) says that "the solution is migrating from package.config to package references" but it didn't work in my case. When I changed migrating I get an error when installing Emgu.CV too. The error is "Unable to find fallback package folder 'C:\Microsoft\Xamarin\NuGet'."
After these I tried manually installing Emgu.runtime and copying dll files but I got a problem related to cvextern.dll. It says that the file is not accessible. I tried registering it rgsvr32 it didn't work. So working manually didn't help either.
How am I supposed to install EMGU.
.netFramework version is not compatible with the package that you are trying to install.
1-Uninstall the packages completely from your project. 2-downgrade
your project's .netFramework version from Properties of the project
3-Reinstall the packages.

Emgu error when trying to install emgu.CV.runtime.windows in VC# 2017

I'm trying to install emgu.CV.runtime.windows from within Visual Studio 2017, and installing by the recommeded method of right-clicking references and installing via NuGet.
However I am getting the error below.
Could not install package 'Emgu.runtime.windows.msvc.rt.x64 19.28.29336'. You are trying to install this package into a project that targets .NETFramework,Version=v4.7.2, 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.
According to the package information, its dependencies are
enter code here.NetStandardVersion=2.0
enter code here.Engu.CV (> 4.5.1 && < 4.5.2)
enter code here.Engu.runtime.windows.msvc.rt.x86 (= 19.28.29336)
enter code here.Engu.runtime.windows.msvc.rt.x64 (= 19.28.29336)
I checked and c:\windows\Microsoft.NET\Framework contains a folder for v2.0.50727, so it seem .net 2.0 is installed (as is v3.0, v3.5, v4.0.30319)
I have emgu.CV 4.5.1.4349 installed.
I need this library so that I can have the enter code herebitmap.ToImage<Bgr, byte>(); function.
Why am I getting this error?
Any help would be greatly appreciated.
The solution is migrating from package.config to package references for every project you have. Simply right click on package.config and click "migrate package.config to PackageReference".
Then, install the runtime package again and it will work.
For the new Emgu Nuget package you do need to use PackageReference instead of the traditional package.config.
What worked for me on Visual Studio 2017:
Uninstall all NuGet Packages [This removes the package.config file]
Go to Tools --> Options --> NuGet Package Manager --> General
Change the default package management format to "PackageReference"
Check "allow format selection on first package install"
Click OK
Install Emgu.CV, Emgu.CV.Bitmap, Emgu.CV.UI and Emgu.CV.runtime.windows
These Emgu packages should now appear under your references and you should not see a package.config file.
Nuget Options Image
I encountered the same error. I don't know why we're getting it, but I was able to find a workaround.
Visit the nuget page for the package.
Click "Download Package" to download the nuget package directly.
Open the downloaded file using your archive utility of choice and navigate to the "\runtimes\win-x64\native" folder.
Copy both dll files into the output directory of your project.
After doing this, my code executed without error. Make sure to install emgu.CV.Bitmap as well.
I changed my projects Target Framework to ".NET Framework 4.6" and then went to "Manage NuGet Packages", selected "Browse", typed in "emgu.cv.runtime" then installed version 4.5.1.4349 and it worked.
Here is how I solved it,
1- downgrade .Net framework to 4.6 from project properties
2- Uninstall Emgu.CV and related ones (you will see which ones needed to be uninstalled in Errors List)
3- Install Emgu.CV.runtime.windows from Solution Nuget Manager ( it should install fine now)
3- upgrade .Net framework to 4.8
4- install Emgu.CV 4.5.1 (latest)
5- install Emgu.CV.UI 4.5.1 (Emgu.CV.Bitmwp was installed automatically for me)
and that's it, now you can use bitmap.ToImage<Bgr,Byte>(), note that the Image<Bgr,byte>(bitmap) doesn't work anymore.

Couldn't install package, project targets Framework without assembly references

When I try to install Firebase Messaging Nuget package on the solution it gives me this error -
"Could not install package 'Xamarin.Firebase.Messaging 42.1021.1'. 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."
And for the android installation it says
"Could not install package 'Xamarin.Firebase.Messaging 42.1021.1'. You are trying to install this package into a project that targets '.NETPortable,Version=v4.6,Profile=Profile44', 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."
How do I get it to install?
The solution is to use the latest stable Xamarin.Forms and have your project's compileSdkVersion (so Target Framework) set to 7.0 or higher. You will then be able to install newer versions of Android Support and therefore Google Play Services packages.
Happy coding!!

Nuget package would install before I reinstalled windows but now it will not

I am trying to install the NuGet package Xamarin.Firebase.Auth and every time I do I get an error saying
Could not install package 'Xamarin.Firebase.Auth 42.1001.0'. You are trying to install this package into a project that targets 'MonoAndroid,Version=v6.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.
The catch is that about a week ago I was working on this same project and had the package installed with no problems. Then my laptop's install of windows was corrupted and I had to reinstall. I lost that day's work and now the package gives the aforementioned error. I can't find anything else that has changed, any ideas?

Monogames can't add SharpDx Dll

Yo,
I have follow this tuto step by step : http://developer.nokia.com/Community/Wiki/XNA_Games_On_Windows_Phone_8_with_Monogame
But still not working.
errors message : Warning 8 The referenced component 'SharpDX' could not be found. MonoGame.Framework.WindowsPhone
or
Warning 4 The referenced component 'SharpDX.WP8' could not be found. MonoGame.Framework.WindowsPhone
i have deduce SharpDx was missing (obvious), but when i try to add the reference using Nuggetsmanagepacket; I have the following message :
Installing 'SharpDX 2.5.0'.
Successfully installed 'SharpDX 2.5.0'.
Adding 'SharpDX 2.5.0' to MonoGame.Framework.WindowsPhone.
Uninstalling 'SharpDX 2.5.0'.
Successfully uninstalled 'SharpDX 2.5.0'.
Install failed. Rolling back...
Could not install package 'SharpDX 2.5.0'. 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 or content files that are compatible with that framework. For more information, contact the package author.
Any Idea about what the problem, no awnser on Wiki_nokia website.
I have WP8 Sdk, and i'm using full version of Visual studio express 2012 (on Windows 8 )
Unfortunately nuget packages don't support platform specific builds of SharpDX. You need to add all references manually.

Categories

Resources