I just installed VS2017 Enterprise, attempted to create blank UWP project.
Then I added a class derived from DbContext
using Microsoft.EntityFrameworkCore;
namespace Test
{
public class TestContext : DbContext
{
}
}
The compiler does not like the simple class above and complained that:
Severity Code Description Project File Line Suppression State
Error CS0234 The type or namespace name 'EntityFrameworkCore' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?)
Although I did install the sqlite package
Install-Package Microsoft.EntityFrameworkCore.Sqlite
And the installation was successful.
What have I missed? Maybe I need to add reference to a dll but which dll should I use?
Update:
I tried to install-package Microsoft.EntityFrameworkCore (the main package) as suggested but it seems to be incompatible.
supports: netstandard2.0 (.NETStandard,Version=v2.0)
At line:1 char:1
+ Install-Package Microsoft.EntityFrameworkCore
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Install-Package], Exception
+ FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand
Install-Package : Package Microsoft.EntityFrameworkCore 2.0.1 is not compatible with uap10.0.10240 (UAP,Version=v10.0.10240) / win10-arm. Package
Microsoft.EntityFrameworkCore 2.0.1 supports: netstandard2.0 (.NETStandard,Version=v2.0)
At line:1 char:1
+ Install-Package Microsoft.EntityFrameworkCore
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Install-Package], Exception
+ FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand
Install-Package : Package Microsoft.EntityFrameworkCore 2.0.1 is not compatible with uap10.0.10240 (UAP,Version=v10.0.10240) / win10-arm-aot. Package
Microsoft.EntityFrameworkCore 2.0.1 supports: netstandard2.0 (.NETStandard,Version=v2.0)
At line:1 char:1
+ Install-Package Microsoft.EntityFrameworkCore
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Install-Package], Exception
+ FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand
Install-Package : Package Microsoft.EntityFrameworkCore 2.0.1 is not compatible with uap10.0.10240 (UAP,Version=v10.0.10240) / win10-x64. Package
Microsoft.EntityFrameworkCore 2.0.1 supports: netstandard2.0 (.NETStandard,Version=v2.0)
At line:1 char:1
+ Install-Package Microsoft.EntityFrameworkCore
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Install-Package], Exception
+ FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand
Install-Package : Package Microsoft.EntityFrameworkCore 2.0.1 is not compatible with uap10.0.10240 (UAP,Version=v10.0.10240) / win10-x64-aot. Package
Microsoft.EntityFrameworkCore 2.0.1 supports: netstandard2.0 (.NETStandard,Version=v2.0)
At line:1 char:1
+ Install-Package Microsoft.EntityFrameworkCore
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Install-Package], Exception
+ FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand
Install-Package : Package Microsoft.EntityFrameworkCore 2.0.1 is not compatible with uap10.0.10240 (UAP,Version=v10.0.10240) / win10-x86. Package
Microsoft.EntityFrameworkCore 2.0.1 supports: netstandard2.0 (.NETStandard,Version=v2.0)
At line:1 char:1
+ Install-Package Microsoft.EntityFrameworkCore
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Install-Package], Exception
+ FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand
Install-Package : Package Microsoft.EntityFrameworkCore 2.0.1 is not compatible with uap10.0.10240 (UAP,Version=v10.0.10240) / win10-x86-aot. Package
Microsoft.EntityFrameworkCore 2.0.1 supports: netstandard2.0 (.NETStandard,Version=v2.0)
At line:1 char:1
+ Install-Package Microsoft.EntityFrameworkCore
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Install-Package], Exception
+ FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand
Install-Package : Package restore failed. Rolling back package changes for 'TestEntityFW'.
At line:1 char:1
+ Install-Package Microsoft.EntityFrameworkCore
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Install-Package], Exception
+ FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand
You must install also main package of EF Core
Install-Package Microsoft.EntityFrameworkCore
Microsoft.EntityFrameworkCore.Sqlite is only db provider package for Entity Framework Core like for example Microsoft.EntityFrameworkCore.SqlServer.
Related
I'm using Celery in my django application and when i'm trying to start celery worker with command: 'celery -A <project_name> worker -l info --pool=solo' it shows me an error that module 'celery' is not recognized, despite i've installed all necessary packages...
>: celery worker --app=demo_app.core --pool=solo --loglevel=INFO
: The term 'celery' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path
is correct and try again.
At line:1 char:1
celery worker --app=demo_app.core --pool=solo --loglevel=INFO
~
CategoryInfo : ObjectNotFound: (celery:String) [], CommandNotFoundException
FullyQualifiedErrorId : CommandNotFoundException
I've also tried to add celery's path to PATH variable, but it throws this error anyway.
I am getting this error .I managed to find similar question on stackoverflow Fatal error LNK1104: cannot open file 'libboost_log-vc141-mt-gd-1_64.lib'.
I tried to follow the same steps in visual studio 2019.But I could not figure out how to remove this error .
I have done right click on project name-> properties->linker->general->Additional Library Directories->packages\boost.1.72.0.0\lib\native\include .
Packages are installed in NuGet using the “Install-Package” command.
PM> Install-Package boost
PM> Install-Package boost_date_time-vc141
PM> Install-Package boost_filesystem-vc141
PM> Install-Package boost_log-vc141
PM> Install-Package boost_system-vc141
PM> Install-Package boost_thread-vc141
PM> Install-Package boost_chrono-vc141
PM> Install-Package boost_log_setup-vc141
PM> Install-Package boost_chrono-vc141
PM> Install-Package boost_atomic-vc141
Please someone who can solve this is issue please answer my question.
I have done the same mistake following the instructions on the following page:
GETTING STARTED QUICKLY WITH C++ LOGGING
As your LINK Error 1104 is indicating, I guess you are using Visual Studio 2019 with platform toolset v142, as seen in the image:
In this case, you have to install the boost libraries for platform v142 instead of v141:
PM> Install-Package boost
PM> Install-Package boost_date_time-vc142
PM> Install-Package boost_filesystem-vc142
PM> Install-Package boost_log-vc142
PM> Install-Package boost_system-vc142
PM> Install-Package boost_thread-vc142
PM> Install-Package boost_chrono-vc142
PM> Install-Package boost_log_setup-vc142
PM> Install-Package boost_chrono-vc142
PM> Install-Package boost_atomic-vc142
I have a asp.net core project and it's supporting libraries all in .net core version 2.2. They run, I can debug, they also work in release mode. However when I try to publish them, I get a list of errors. The main cause is shown as the web project:
Error NU1202: Package Microsoft.NETCore.App 2.2.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.NETCore.App 2.2.0 supports: netcoreapp2.2 (.NETCoreApp,Version=v2.2)
after which this error keeps repeating for every project that the web project references/uses in the solution.
I have verified the dependencies and here's what I see in the web project:
and this:
as you can see the project references the latest version 2.2.0. So I have no idea where is it picking this netcoreapp2.1?
if that is the problem with configuration, why this error does not show up during debug and release build or even debugging. Just to note my publish is based on Release build and it uses netcore 2.2 as framework dependent.
This is what I get if I run dotnet --list-runtimes
Microsoft.AspNetCore.All 2.1.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.1.7 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.1.8 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.2.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.2.1 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.2.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.App 2.1.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.1.7 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.1.8 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.2.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.2.1 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.2.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.0.0-preview-18579-0056 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 2.0.9 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.1.7 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.1.8 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.2.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.2.1 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.2.2 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 3.0.0-preview-27122-01 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 3.0.0-alpha-27128-4 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
The issue is likely to do with your publish settings in Visual Studio. You have two ways of fixing the issue.
Option A. Edit the file FolderProfile.pubxml under the folder \Properties\PublishProfiles directly and change the target framework from 2.1 to 2.2 under:
<TargetFramework>netcoreapp2.2</TargetFramework>
or
Option B. Go to publish menu and click Configure... It appears that just going to menu and clicking save will fix the issue since the menu defaults to the the project default 2.2.
Hope this fixes your problem.
I think that your installed runtime is .net core hosting 2.1.
You should download the dotnet runtime 2.2 or higher version.
I have used angularfire2 in an Ionic2 app. ionic serve is working fine, but when i use sudo ionic cordova build android --prod it gives error Module not found: Error: Can't resolve '../../../angularfire2/auth' .
My ionic info is
cli packages: (/usr/local/lib/node_modules)
#ionic/cli-utils : 1.9.2
ionic (Ionic CLI) : 3.9.2
global packages:
Cordova CLI : 7.0.1
local packages:
#ionic/app-scripts : 2.1.4
Cordova Platforms : android 6.2.3
Ionic Framework : ionic-angular 3.6.0
System:
ios-deploy : 1.8.6
Node : v7.10.0
npm : 4.2.0
OS : OS X El Capitan
Xcode : Xcode 8.2.1 Build version 8C1002
package.json has
"angularfire2": "^4.0.0-rc.2",
I tried npm install promise-polyfill --save-exact but no use.
Check the value of your Android_home environment variable. These errors often have to do with environment errors
my ionic info of my project is
global packages:
#ionic/cli-utils : 1.3.0
Cordova CLI : 7.0.1
Ionic CLI : 3.3.0
local packages:
#ionic/app-scripts : 1.1.4
#ionic/cli-plugin-cordova : 1.3.0
#ionic/cli-plugin-ionic-angular : 1.3.0
Cordova Platforms : none
Ionic Framework : ionic-angular 2.3.0
System:
Node : v6.10.3
OS : macOS Sierra
Xcode : Xcode 8.3.2 Build version 8E2002
ios-deploy : not installed
ios-sim : not installed
In my existing project i need to work implement InAppBrowser and FileTransfer plugin the official document is updated to ionic 3 how can i find plugin related doc for my current version or is there any alternative way to do it.