There was an error running the selected code generator in VS 2013 scaffolding
Problem was with a corrupted web.config
and package directory.
I created the new project, and copied my code files over to the new working project, I later went back and ran diffs on the config files and a folder diff on the project itself.
The problem was that the updates had highly junked up my config file with lots of update artifacts that I ended up clearing out.
The second problem was that the old project also kept hanging onto older DLLs that were supposed to be wiped with the application of the Nuget package. So I wiped the obj
and bin
folders, then the package folder. After that was done, I was able to get the older project repaired and building cleanly.
I have not looked into why the config file or the package folder was so borked, but I'm assuming it is one of two things.
- Possibly the nuget package has a flaw
- The TFS source control blocked nuget from properly updating the various dependencies.
Since then, before applying any updates, I check out everything. However, since I have not updated EF in a while, I no evidence that this has resolved my EF or scaffolding issue.
There was an error running the selected code generator: 'Scaffolding failed. The path is empty. (Parameter 'path')' in VS 2022
When I was recreating the solution from scratch I found the culprit. ME!
I do not like the new style of Main entry points where the code just starts without a namespace or class definition such as follows:
namespace MyNamespace
{
public static class MyClass
{
public static void Main(string[] args)
{
}
}
}
So I rewrote the class Program and created Startup and attempted to refactor all the code from Program. Obviously I did not do well. This caused my problem with the failed add of a templated Razor view.
There was an error running the selected code generator in VS 2017 scaffolding
After wasting days on that problem, I found that "K9 internet protection application" caused the problem! once I uninstalled it, the error disappeared.
Web Api Scaffolding - Error running the selected code generator
Solution / problem found.
I am using Panda Antivirus - During this entire process, i have frequently checked to see if Panda reports any blocked files, threads or any threats to the system. and it didnt report anything - so i ruled out the antivirus to be the issue.
After reading another post regarding a different issue, i noticed that one of the solutions was to deactivate the antivirus, and run a repair.
After trying everything else, i did just this.
And its working again. Finally. after ~ 20 days.
There doesnt seem to be a need to repair the installation, as activating the antivirus again, will produce the issue the next time you try to run the scaffolder.
Disabling the process monitor doesnt solve the issue, and adding all the folders to the exceptions folder of the AV would be way to much up-keep, so i will probably switch out my AV.
Hope this helps anyone else thats having this issue.
A big thanks to @oleg for trying to help me out here!
MVC scaffolding Error running selected code generator (Microsoft.AspNet.Identity.Core.dll denied)
Try to update the NuGet
package for the Microsoft.AspNet.Identity.Core
You can do this for example from the Package Manger Console
by typing
update-package Microsoft.AspNet.Identity.Core
Related Topics
Post Form Data Using Httpwebrequest
C# Base64 String to Jpeg Image
How Is Performance Affected by an Unused Using Directive
Difference with Parameters.Add and Parameters.Addwithvalue
Retrieving Creation Date of File (Ftp)
Could Not Load File or Assembly ... the Parameter Is Incorrect
How to "Multiply" a String (In C#)
How to Add a Delay for a 2 or 3 Seconds
Why Can't Yield Return Appear Inside a Try Block with a Catch
Make Listview.Scrollintoview Scroll the Item into the Center of the Listview (C#)
How Much Memory Does a C#/.Net Object Use
How to Select Min and Max Values of a Column in a Datatable
Get Os Version/Friendly Name in C#