Can not install SignalR client nuget package for MonoDroid - xamarin.android

I was trying to install Nuget package for MonoDroid project (Visual Studio 2015):
Microsoft.AspNet.SignalR.Client
And I got this error:
Could not install package 'Microsoft.AspNet.SignalR.Client 2.2.0'. You are trying to install this package into a project that targets 'MonoAndroid,Version=v4.3', but the package does not contain any assembly references or content files that are compatible with that framework.
Any idea to sort this out?

Related

EntityFramework.Core.Tools nuget package installation error: "The process cannot access the file ef.exe because it is being used by another process"

While installing the package Microsoft.EntityFrameworkCore.Tools for using EF in my project using Nuget, I'm persistently running into the below error. Notice I didn't get any error while installing other related packages used for EF core
Microsoft.EntityFrameworkCore
Microsoft.EntityFrameworkCore.Relational
Microsoft.EntityFrameworkCore.SqlServer
Here is the location of the file ef.exe
Basically the intention behind installing this package is to use EF command-line tools. I'm currently on Windows 10 and the .NET SDK installed on my machine is 3.1. I had previously 2 SDK's installed on my system(3.1 & 5.0). As per microsoft's documentaion, "The .NET CLI must choose an SDK version for every dotnet command. It uses the latest SDK installed on the machine by default." Therefore I went ahead and uninstalled .NET 5.0 SDK
Here are some of the solutions that I tried:
Deleting the package folder from '.nuget/packages/microsoft.entityframeworkcore.tools' & thereby the executable i.e. 'ef.exe' and reinstalling the same.
Installing the same package using dotnet cli.
Running Visual Studio 2019 as admin.
Deleted the folder "C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions"
I have also tried some of the steps mentioned here on github: https://github.com/NuGet/Home/issues/1138
. Any kind of help would be really appreciated.
I have answered the detailed description of the solution here on microsoft's .NET Q&A platform.
'EntityFramework.Core.Tools' nuget package installation error

Install Scandit fail. The package does not contain any assembly references or content files that are compatible with that framework

I am trying to install nuget package "Scandit" to my project.
IDE: Visual studio Mac(Xamarin.Forms 4.6.0.726)
The following is the error message.
Attempting to gather dependency information for package 'Scandit.BarcodePicker.Xamarin.5.14.5.10' with respect to project 'Modbusbutton3', targeting '.NETPortable,Version=v4.5,Profile=Profile78'
CACHE https://api.nuget.org/v3/registration5-gz-semver2/scandit.barcodepicker.xamarin/index.json
Total number of results gathered : 52
Gathering dependency information took 217.67 ms
Summary of time taken to gather dependencies per source :
https://api.nuget.org/v3/index.json - 5.27 ms
Attempting to resolve dependencies for package 'Scandit.BarcodePicker.Xamarin.5.14.5.10' with DependencyBehavior 'Lowest'
Resolving dependency information took 0 ms
Resolving actions to install package 'Scandit.BarcodePicker.Xamarin.5.14.5.10'
Resolved actions to install package 'Scandit.BarcodePicker.Xamarin.5.14.5.10'
Found package 'Scandit.BarcodePicker.Xamarin 5.14.5.10' in '/Users/dej.pvi/Downloads/20200506-WiFi Solution for iOS/packages'.
For adding package 'Scandit.BarcodePicker.Xamarin.5.14.5.10' to project 'Modbusbutton3' that targets 'portable45-net45+win8+wp8'.
Install failed. Rolling back...
Package 'Scandit.BarcodePicker.Xamarin.5.14.5.10' does not exist in project 'Modbusbutton3'
Executing nuget actions took 15.64 ms
Could not install package 'Scandit.BarcodePicker.Xamarin 5.14.5.10'. You are trying to install this package into a project that targets '.NETPortable,Version=v4.5,Profile=Profile78', 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.
Can any one help how to solve this? Thank you!
As I checked Scandit.BarcodePicker github sample they are using two different packages.
Scandit.BarcodePicker.Xamarin
This package is installed only in Android and iOS project.
Scandit.BarcodePicker.Unified
This package is installed in every project.
According to your log Target Framework of your project is PCL. You might consider to convert you project to .NETStandard 2.0, because this might be other issue why you are not able to install this package. Check the link here.

How to install FSharp.xUnit?

I've installed Visual Studio 2017 and included the test package and the F# package. I'm trying to run a simple test using xUnit but it says xUnit is not found.
module HelloWorldTest
open FsUnit.xUnit
open Xunit
open System.Diagnostics
[<Fact>]
let ``Say Hello`` () =
Assert.True(true)
Error
The namespace or module 'FsUnit' is not defined.
I tried installing the package with dotnet but that produces an error.
> dotnet add package FSharp.xUnit
Writing C:\Temp\tmp8DAB.tmp
info : Adding PackageReference for package 'FSharp.xUnit' into project 'C:\Users\mjohn\workspace\fsharp\hello-world\HelloWorld.fsproj'.
log : Restoring packages for C:\Users\mjohn\workspace\fsharp\hello-world\HelloWorld.fsproj
...
error: Unable to find package FSharp.Core. No packages exist with this id in source(s): Microsoft Visual Studio Offline Packages
error: Unable to find package FsUnit.xUnit. No packages exist with this id in source(s): Microsoft Visual Studio Offline Packages
error: Unable to find package xunit. No packages exist with this id in source(s): Microsoft Visual Studio Offline Packages
error: Unable to find package xunit.runner.visualstudio. No packages exist with this id in source(s): Microsoft Visual Studio Offline Packages
error: Unable to find package FSharp.xUnit. No packages exist with this id in source(s): Microsoft Visual Studio Offline Packages
error: Unable to find package Microsoft.NET.Test.Sdk with version (>= 16.0.0)
error: - Found 1 version(s) in Microsoft Visual Studio Offline Packages [ Nearest version: 15.9.0]
error: Package 'FSharp.xUnit' is incompatible with 'all' frameworks in project 'C:\Users\mjohn\workspace\fsharp\hello-world\HelloWorld.fsproj'.
So how can I install xUnit for F#? This guide from MS unfortunately is lacking any of this information.
https://learn.microsoft.com/en-us/dotnet/core/testing/unit-testing-fsharp-with-dotnet-test
EDIT:
After adding the NuGet package source
> dotnet add package FsUnit.xUnit
Writing C:\Temp\tmp5BA6.tmp
info : Adding PackageReference for package 'FsUnit.xUnit' into project 'C:\Users\mjohn\workspace\fsharp\hello-world\HelloWorld.fsproj'.
log : Restoring packages for C:\Users\mjohn\workspace\fsharp\hello-world\HelloWorld.fsproj
...
info : CACHE https://api.nuget.org/v3-flatcontainer/fsunit.xunit/index.json
info : Package 'FsUnit.xUnit' is compatible with all the specified frameworks in project 'C:\Users\mjohn\workspace\fsharp\hello-world\HelloWorld.fsproj'.
info : PackageReference for package 'FsUnit.xUnit' version '3.4.0' updated in file 'C:\Users\mjohn\workspace\fsharp\hello-world\HelloWorld.fsproj'.

Asp .Net Core - cannot install Microsoft.AspNet.Mvc nuget package

In my Asp .Net Core Web Application (started with empty template) I cannot install Microsoft.AspNet.Mvc nuget package.
After pressing Install in Nuget manager I get this error message:
Package restore failed. Rolling back package changes for 'WebApplication1'.
I tried to solve it on my own, but:
1) My project doesn't have project.json
2) Clearing nuget cache like in this answer didn't help:
Netstandard1.x Nuget packages cannot be installed for netstandard1.x projects
Project target framework: .NetCoreApp1.0 (also tried 1.1)
Ide: VS2017 RC
I didn't have problems so far with installing other packages.
Is there a workaround to install mvc package?
Btw. I have to start with empty project template.
Thanks in advance for your support.
I looked harder in nuget package name and discovered that correct package to install should be Microsoft.AspNetCore.Mvc and not Microsoft.AspNet.Mvc.
Silly mistake, I chose most popular package by typing "mvc" in search box.

Can't install Websharper nuget

When i'm trying to create a sitelet project, nuget fails on installing
NuGet Package restore failed for project To2a1.PublicSite.WebSharper: Could not find file 'C:\Users\Michakun\AppData\Local\Temp\nuget\atxvmxdn.eba\tools\net40\IntelliFactory.WebSharper.Web.dll'
Anyone knows why? I'm using visual studio 2013 update 4

Resources