I am having an issue with the Elasticsearch.Net Nuget package.
I am not very familiar with the .Net environment and more with development, and after i followed the quick start for Nest (http://nest.azurewebsites.net/elasticsearch-net/quick-start.html) i cannot install the Elasticsearch.Net package but the Nest Nuget is installed.
The error i am getting is:
Install-Package : Unable to find package 'Elasticsearch.Net'.
At line:1 char:16
+ Install-Package <<<< Elasticsearch.Net
+ CategoryInfo : NotSpecified: (:) [Install-Package], InvalidOperationException
+ FullyQualifiedErrorId :NuGetCmdletUnhandledException,NuGet.PowerShell.Commands.InstallPackageCommand
Even though the documentation has been updated, the initial release of the Elasticsearch.Net 1.0 client has not been published on NuGet yet. NEST is available on NuGet as you found, but is still at version 0.12.0. Version 1.0 of Elasticsearch.Net and NEST should be released shortly. In the meantime, you can continue to use NEST 0.12.0. The 1.0 documentation is still pretty accurate for most of the basic operations and querying. Alternately, you could get the latest source for Elasticsearch.Net and NEST from the Elasticsearch.Net GitHub site, compile it locally and manually reference it your project.
Related
I'm trying to write a simple phone app using UWP that will insert an image from a Windows folder location into a table on SQLite and view it on the Windows phone.
I found this article on technet forum that I am using for a reference:
https://social.technet.microsoft.com/wiki/contents/articles/37975.save-and-load-images-in-universal-windows-app-with-sqlite-and-entity-framework-core.aspx
While following the instructions, I ran into an issue in installing the package Microsoft.EntityFrameworkCore.Tools (latest stable ver.2.0.1):
PM> Install-Package Microsoft.EntityFrameworkCore.Tools
GET https://api.nuget.org/v3/registration3-gz/microsoft.entityframeworkcore.tools/index.json
OK https://api.nuget.org/v3/registration3-gz/microsoft.entityframeworkcore.tools/index.json 74ms
Restoring packages for c:\users\intui\documents\visual studio 2017\Projects\PicturesApp\PicturesApp\PicturesApp.csproj...
Install-Package : Package Microsoft.EntityFrameworkCore.Tools 2.0.1 is not compatible with uap10.0.10586 (UAP,Version=v10.0.10586). Package
Microsoft.EntityFrameworkCore.Tools 2.0.1 supports: netstandard2.0 (.NETStandard,Version=v2.0)
At line:1 char:2
+ Install-Package Microsoft.EntityFrameworkCore.Tools
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Install-Package], Exception
+ FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand
Same issue also occured with the previous version (2.0.0), but the next previous version (1.1.4) was installed successfully.
However, I found that the "DbContextOptionsBuilder" class used in the code "PictureAppContext" class does not recognize the method "UseSqlite":
Severity Code Description Project File Line Suppression State Error CS1061 'DbContextOptionsBuilder' does not contain a definition for 'UseSqlite' and no extension method 'UseSqlite' accepting a first argument of type "DbContextOptionsBuilder' could be found (are you missing a using directive or an assembly reference?) PicturesApp c:\users\intui\documents\visual studio 2017\Projects\PicturesApp\PicturesApp\PictureAppContext.cs 16 Active
Anyone knows how resolve this issue?
Thanks!
I ran into this same issue using dotnet sdk 2.1.1 which was supposed to have all basic dependencies wrapped in Microsoft.AspnetCore.App. All i needed to do was run dotnet add package Microsoft.EntityFrameworkCore.Sqlite in a terminal window in the project directory (The directory that contains the Program.cs, Startup.cs, and
.csproj files)
For .NET 5, I had to install the package Microsoft.EntityFrameworkCore.Sqlite.Core
Check the link
I solved the issue by uninstalling the Nuget package Microsoft Entity Framework Core and installing Entity.Framework.Core.Sqlite.Design. I don't know why it solved the issue but the error is gone, I'm happy and that's all that matters.
I added using Microsoft.EntityFrameworkCore; as suggested in the GitHub issue (https://github.com/dotnet/AspNetCore.Docs/issues/7486#issuecomment-403117359)
I'm trying to install MVC 6 beta in a regular .NET 4.5.2 web project (not DNX). It gives me an error. Is this possible? Or will it eventually be supported?
PM> install-package Microsoft.AspNet.Mvc -pre
Attempting to gather dependencies information for package 'Microsoft.AspNet.Mvc.6.0.0-beta5' with respect to project '6 - Entry Points\Sample.Web', targeting '.NETFramework,Version=v4.5.1'
Attempting to resolve dependencies for package 'Microsoft.AspNet.Mvc.6.0.0-beta5' with DependencyBehavior 'Lowest'
Resolving actions to install package 'Microsoft.AspNet.Mvc.6.0.0-beta5'
Resolved actions to install package 'Microsoft.AspNet.Mvc.6.0.0-beta5'
Install failed. Rolling back...
Package 'Microsoft.AspNet.Mvc 6.0.0-beta5' does not exist in project 'Sample.Web'
Package 'Microsoft.AspNet.Mvc 6.0.0-beta5' does not exist in folder 'C:\Dev\Sample\packages'
Install-Package : Could not install package 'Microsoft.AspNet.Mvc 6.0.0-beta5'. You are trying to install this
package into a project that targets '.NETFramework,Version=v4.5.1', 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 Microsoft.AspNet.Mvc -pre
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Install-Package], Exception
+ FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackage
Command
No, you can't. And no, it won't be eventually supported.
I'm a newbie and creating an ASP.Net empty web application (C#) project. But I got this error when installing nuget package Microsoft.AspNet.Identity.Owin -Version 2.1.0.
I don't know what's seemed to be the problem bcoz I'm using the newer version VS 2012 .Net Framework 4.5 and not VS 2010.
Tried install and uninstalling nuget packages but to no avail.
Error result:
Error loading type library/DLL. (Exception from HRESULT: 0x80029C4A (TYPE_E_CANTLOADLIBRARY))
Uninstalling 'Microsoft.AspNet.Identity.Core 2.1.0'.
Successfully uninstalled 'Microsoft.AspNet.Identity.Core 2.1.0'.
Install failed. Rolling back...
Install-Package : Failed to add reference to 'Microsoft.AspNet.Identity.Core'.
At line:1 char:16
+ Install-Package <<<< Microsoft.AspNet.Identity.Owin -Version 2.1.0
+ CategoryInfo : NotSpecified: (:) [Install-Package], InvalidOperationException
+ FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PowerShell.Commands.InstallPackageCommand
What's seemed to be the problem?
N.B: For reasons unknown, I had the same problem with installing nuget Package EntityFramework Version 6.1.1 but managed to resolve it by adding package.config file to the project.
Many thanks indeed.
I'd the same problem as did you,I don't know what was wrong.I created a couple of projects to check it and nothing worked, I thought the issue was with my frame work as It targets only above 4.0 and VS 12 and above. But that wasn't the problem.
After some time I tried to install them again and out of the blue I don't know How they just got installed. I will suggest to restart the VS or system that might be helpful
Starting Visual Studio as Administrator in combination with using the Package Manager Console seems to help.
I believe that you have to change the package source in the Package Manager Console, then you can type your command. I faced the same problem, and I wondered why I can't install the package by typing the command.
I have tried installing the ServiceStack Framework on both .Net 4.0 and .Net 4.5 applications. I have gotten the same error both times:
Install failed. Rolling back...
Install-Package : Could not install package 'ServiceStack.Interfaces 4.0.31'. 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 that are compatible with that framework. For more information, contact the package author.
At line:1 char:1
+ Install-Package Servicestack
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Install-Package], InvalidOperationException
+ FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PowerShell.Commands.InstallPackageCommand
and
Install failed. Rolling back...
Install-Package : Could not install package 'ServiceStack.Interfaces 4.0.31'. 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 that are compatible with that framework. For more information, contact the package author.
At line:1 char:1
+ Install-Package Servicestack
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Install-Package], InvalidOperationException
+ FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PowerShell.Commands.InstallPackageCommand
What gives?
The major change to happen to ServiceStack.Interfaces is that it's now a portable library as of v4.0.30 supporting most supported platforms (Profile136):
.NET 4.0+
Xamarin.iOS
Xamarin.Android
Windows Store
Silverlight 5
If NuGet is reporting that it can't find the necessary assembly references for a supported platform than it's likely that you're using an older version of NuGet that doesn't include PCL support, which can be resolved by upgrading to the latest NuGet.
The "upgrade Nuget" option was not working for me. Turns out that versions of ServiceStack do have .NET limits. Our application is .NET 4.0, so ServiceStack.Interfaces 4.062 was the highest version we could install.
I create a new PCL project, select Store app + Phone 8 + .Net 4.5
Then, from pakage manager console, I do:
Install-Package Portable.MvvmLightLibs -Pre
but it is not installed, I get an error. What I am doing wrong?
Thank you
The error message is:
Install-Package : Could not install package 'Portable.MvvmLightLibs 4.1.24-beta3'. 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 that are compatible with that
framework. For more information, contact the package author.
At line:1 char:1
+ Install-Package Portable.MvvmLightLibs -Pre
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Install-Package], InvalidOperationException
+ FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PowerShell.Commands.InstallPackageCommand
I had the same problem, but upgrading NuGet (currently 2.2) seems to have done the trick.