Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import 'Microsoft.WebTools.Scaffolding.Core.ScaffolderFactory.FactoryConfigEvaluator' could not be satisfied. #1364

Closed
BrunoBlanes opened this issue Jul 2, 2020 · 25 comments

Comments

@BrunoBlanes
Copy link

Steps to reproduce:

Follow this tutorial on scaffolding Identity for a Blazor application.

Expected behavior:

New pages be generated for customization.

Actual behavior:

image

Additional information about the project being scaffolded, such as:

Target framework(s):

NET 5 Preview 6
Blazor WASM
Visual Studio Version 16.7.0 Preview 3.1

Package version of Microsoft.AspNetCore.App or Microsoft.AspNetCore.All (if applicable):

Not?

Package version of Microsoft.VisualStudio.Web.CodeGeneration.Design - this may be added to your project by scaffolding:

Doesn't get done.

Read the note (sorry for ignoring it), opening this issue on request from @deepchoudhery .

@Rick-Anderson
Copy link
Contributor

I reported it here for Visual Studio

I reproduced the problem creating a new Razor Pages web app.
Internal ticket

@deepchoudhery
Copy link
Member

deepchoudhery commented Jul 6, 2020

@BrunoBlanes
I need more information to help. There is a .err file in C:\Users\%USER%\AppData\Local\Microsoft\VisualStudio\16.0_XYZ\ComponentModelCache where 16.0_XYZ is some alphanumeric code corresponding your specific VS install. I personally have not been able to reproduce this issue but having that file will help. If you have multiple VS install, feel free to send multiple error files.

Let me know if you have any questions.

@BrunoBlanes
Copy link
Author

The file I have is from February. I don't think there would be anything related to this issue specifically since I didn't encounter it back then. Do you still want it?

@deepchoudhery
Copy link
Member

Hmm and you have no other versions of VS installed?

@deepchoudhery
Copy link
Member

Check the ComponentModelCache folder after 16.0_XYZ actually. That should have a newer file. Editing the original comment,

@BrunoBlanes
Copy link
Author

Yes, in fact there is. I changed the extension so I could upload as a file.

Microsoft.VisualStudio.Default.log

@deepchoudhery
Copy link
Member

I would you like to repro the error and then get this file again. Every launch refreshes it(probably why I don't see anything related in it). Thanks a lot.

@Rick-Anderson
Copy link
Contributor

The path is C:\Users\%USERNAME%\AppData\Local\Microsoft\VisualStudio\
I put my .err file at https://www.dropbox.com/s/ph4izsgtb1hf6jt/Microsoft.VisualStudio.Default.err?dl=0

@BrunoBlanes
Copy link
Author

Relaunching Visual Studio didn't update it, so I moved all files from that folder to a temporary one, restarted the computer and then restarted VS so it could recreate those files. Here is the .err file:

Microsoft.VisualStudio.Default.log

@BrunoBlanes
Copy link
Author

I should point out that the file was created before I open the project and it wasn't updated when I recreated the error.

@deepchoudhery
Copy link
Member

Hi,
I have a couple things I would like you to try. Try just repairing your VS install through the Visual Studio installer.
Also if you could side install the same version of VS and see if the issue is still there. I'm leaning towards a faulty install but not sure yet.
Thanks a lot.

@BrunoBlanes
Copy link
Author

Ok, will do and let you know.

@BrunoBlanes
Copy link
Author

So, after a repair it hanged for a few seconds and then it reproduced the same error. After that it doesn't hang anymore, just straight up shows the pop-up message.
About side loading, what do you recommend? Like on a VM or a version other then VS Community?

@deepchoudhery
Copy link
Member

Hmmm ok. I would recommend download the exact same preview version (enterprise/professional/community) and install it at a different path. If the installer does not let you easily, use https://docs.microsoft.com/en-us/visualstudio/install/command-line-parameter-examples?view=vs-2019 (--installPath) to do it fairly easily.
Did the error happen after an update or from a fresh install? We're figuring it something faulty in the update.

Thanks a lot,
Deep

@deepchoudhery
Copy link
Member

Also, @BrunoBlanes do you have other versions of Visual Studio installed?

@BrunoBlanes
Copy link
Author

I don't know when it started because I never used this feature before this version and I only have Visual Studio Version 16.7.0 Preview 3.1 Community installed. I will try to side install it as instructed and will let you know.

@BrunoBlanes
Copy link
Author

Yep, yah nailed it. I did a command line install and selected a folder on my Downloads as the path. It worked like a charm.

Also, this looks super cool, though I wonder why is it even possible.
image

I guess I will be doing a clean install of Visual Studio to fix the bug on the version installed to the default directory... Is there a "Clean Install tool" I can use?

@BrunoBlanes
Copy link
Author

I did find a little bit of a bug though, or at least a point for improvement:
image

If you select to create a new data context class to use an existing user class and then change back to an existing data context, the user class field is disabled but not emptied, meaning that I get the following error:
image

Of course all I had to do was restart the process and not change my mind mid-way through, but I still think this is an easy and welcome fix. Where is the proper place to post this suggestion?

@Rick-Anderson
Copy link
Contributor

Of course all I had to do was restart the process and not change my mind mid-way through, but I still think this is an easy and welcome fix. Where is the proper place to post this suggestion?

Seems not worth fixing in lieu of all the other things we've got scheduled., You can open a new issue here

@deepchoudhery
Copy link
Member

Hey @BrunoBlanes. I have a workaround for your older vs instance if you would prefer to fix it.
I will need you to do the following:

  1. Delete %ProgramData%\Microsoft\VisualStudio\Packages\Microsoft.VisualStudio.Web.Scaffolding,version=16.6.XXX.XXXX,chip=neutral,language=en-US.​
    Note : the package you delete here should have "chip=..." and "language=...". It might be a different version but it should have
    it since its the thing causing the problem.
    also %ProgramData% usually is C:\ProgramData​

  2. Launch VS installer and select Repair.

Let me know if that works.

@BrunoBlanes
Copy link
Author

Thanks @deepchoudhery that fixed it. I also did open a new issue for that little bug as instructed by @Rick-Anderson just in case you guys find the time.

@deepchoudhery
Copy link
Member

Ok I'll look at that in the 16.8 Preview timeline. Thanks.

@donhuvy
Copy link

donhuvy commented Aug 20, 2020

disadvantage, file download for repairing is too large (4.8 GB)

image

@TheDevTwister
Copy link

if any one having Syncfusion in their system then also this issue come up. so disable it if you are not using it else you can take help from below URL

https://forums.asp.net/t/2169754.aspx?Adding+new+scaffolded+item

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants