I am trying to scaffold and getting following error:
There was an error running the selected code generator Method not found: 'Void EntityFrameworkCore.Design.Internal.DbContextOperations
https://learn.microsoft.com/en-us/ef/core/get-started/aspnetcore/existing-db?view=aspnetcore-2.0#install-entity-framework
I suspect you are missing the assemblies that are necessary for scaffolding? I also assume you are trying to reverse engineer an existing db?
example
Scaffold-DbContext "Server=(localdb)\mssqllocaldb;Database=Blogging;Trusted_Connection=True;" Microsoft.EntityFrameworkCore.SqlServer -OutputDir Models
if it fails like i can't find it might be a pmc issue, try closing down VS try again. After that its probably a configuration with missing assemblies.
It may be the Microsoft.EntityFrameworkCore.Design version issue. Update it to version 2.0.3. It worked for me.
I got this error too when trying to add a new controller. The day before I had upgraded both Microsoft.EntityFrameworkCore.SqlServer and Microsoft.EntityFrameworkCore.Tools Nuget Packages from version 2.0.2 to 2.1.3.
Downgrading both packages to 2.0.2 allowed me to scaffold a new controller again.
Saeef's error is from trying to create CRUD razor pages, not creating the domain classes from an existing database
I had the same problem. I had two instances of VS2017 (enterprise & developer edition) for some reason I updated only one of them. The shourtcut on my desk was the 'out of date version' so I didnt figure it out until now.
I uninstalled the older, updated the other to 15.8+ and it works fine now.
Related
I'm in the process of migration a XamarinForms 5 app to MAUI and the latest error I get is
The Java type `mono.android.support.v4.media.session.MediaSessionCompat_OnActiveChangeListenerImplementor` is generated by more than one managed type
Searching online, so far I think it is because the app is using Android.Support.V4 when it should only be using AndroidX, causing the duplicate to be generated as AndroidX replaces Support.V4.
However I cannot figure out how to remove the Support.v4 package because the only reference to it is an implicit reference by an SDK which I cannot remove ( see screenshot below)
The project file (MAUI) only has these package references
Any help greatly appreciated.
Thanks
I'll answer my own question as I managed to figure out the issue after a solid several hours long session.
No packages needed to be removed. Somehow I had managed to install a version of
Birdie.Plugin.FirebasePushNotification from 2020 , instead of `Plugin.FirebasePushNotification', the current version.
The solution was to remove that old package and install the correct once which made the error go away.
I am running into a strange (and hopefully very simple) issue where the .get() method does not seem to be defined in my spfx project.
This is a typescript 2.4.2 project for creating an spfx webpart for SharePoint 2016 on prem.
The project was started using yo #microsoft/sharepoint
There was a fix applied to update some typescript 2.2.2 references as per instructions here
The dependencies for PnP were loaded:
npm install #pnp/logging #pnp/common #pnp/odata #pnp/sp --save
Imports included
import { sp, Web } from '#pnp/sp';
Within a function of my render() method I am trying to make a very simple call as follows
let web = new Web(this.context.pageContext.site.absoluteUrl);
return web.lists.getByTitle(this.properties.listName).fields.filter("Title eq 'Decision Status'").get();
I am getting an error that says Property 'get' does not exist on type 'Fields'. To try and make it even simpler I tried running
let web = new Web(this.context.pageContext.site.absoluteUrl);
web.get();
And I get a similar error saying 'get' does not exist on type 'Web'. The examples they show in the documentation show very similar code, but I can't determine what about my code is incorrect here.
If this issue is still relevant,check the version of the #pnp/sp installed. The latest one as of today is 1.2.9 and should support get
I was dealing with this issue, my solution was install this others dependencies with the same version.
#pnp/common
#pnp/logging
#pnp/odata
#pnp/sp
hope that helps for anyone with this problem!
I started a new default working project in xamarin and I added the dll references for Xamarin.Android.Support.V4 and Xamarin.Android.Support.V7.AppCompat and I am getting errors.
Error: package android.support.v4.app.FragmentManager does not exist
android.support.v4.app.FragmentManager.OnBackStackChangedListener
Error: package android.support.v4.content.Loader does not exist
android.support.v4.content.Loader.OnLoadCompleteListener
...
What have I done wrong?
You needed to actually install the support library. MonoDroid has .NET bindings for it, but the underlying java can't build without it, of course. Here are instructions for getting the support library and instructions for hooking it up to a MonoDroid project.
See also http://developer.xamarin.com/Guides/Android/Platform_Features/Fragments/Part_4_-_Providing_Backwards_Compatibility_with_the_Android_Support_Package/#Adding_The_V4_Libraries_to_a_Mono_for_Android_Project
This might be related to this or this, which were solutions to common problems in the rev. 22 update.
try calling it with this:
using Android.Support.V4;
I was reading another post in the xamarin forms with the same issue and this worked for me. I spent maybe an hour trying to figure out what to do and the guy I ran into said just to:
clean the solution,
rebuild it,
then it should be fixed.
Assuming the packages are still installed
I have just created a Class Library (Package) project. I have never used this template before. When I install SpecFlow.NUnit, my References folder is displayed "References (Errors - see error list)". My SpecFlow.NUnit has that warning sign. Maybe I shouldn't use this type of project but I would like to understand why. Thanks.
Update: I've tried installing SpecFlow.xUnit in a second project too without success. I've installed them through Nuget.
Follow the instructions, should not be any problem. And use a Test project, that is the easiest way to get started.
Specflow documentation
I recently installed the EF4.1-Update. When I made a new MVC3 Project and tried to add the MvcScaffolding using the PackageManagerConsole in VS2010 it wouldn't install it. Has anyone else
seen this? I removed the EF4.1-Update from my machine and MvcScaffolding installs correctly.
thanks,
Bill44077
You might have to clean out the packages folder in your solution and reinstall the MvcScaffolding. Once you do this everything should sync back up.
Good luck and hope this helps some.
It does work. And it works beautifully
But I had some issues getting it all setup.
What error(s) did you get exactly I had a number of issues, but solved them one by one.
Did you get this sort of thing in PMC when VS started up?
The following error occurred while loading the extended type data file: Microsoft.PowerShell.Core, C:\Windows\SysWOW64\WindowsPowerShell\v1.0\types.ps1xml(2943) : Error in type "System.Security.AccessControl.ObjectSecurity": Exception: Cannot convert the "Microsoft.PowerShell.Commands.SecurityDescriptorCommandsBase" value of type "System.String" to type "System.Type".
If so either update .net Refelector (now costs), or go Tools > Add-In Manager and disable the .NEt Reflector add in ! THEN RESTART VS
Or if you try to scaffold something, do you get e.g.
Invoke-Scaffolder : A parameter cannot be found that matches parameter name -ModelType"
?
Do you get errors when you try to add a controller to your MVC 3 project?
Are you running on Windows (pre 7) + without powershell 2.0 installed?
Basically don't worry it does work, I think the order or installations matters, just work through it bit by bit, its worth it.
Did you try reinstalling the update after the scaffolding is installed? I already had the scaffolding installed when I installed Update 1, so i did not see a problem.
I've had this problem before when the scaffolding.config file was either not present, or not filled with the Default Scaffolders -- make sure its populated with the default entries for views, controllers, etc. I think there is 9 by default in version 1.0.9.
Old post I know but this is still relevant in project templates and autogenerated projects -- the scaffolding.config needs to have its defaults.