Last post Jan 22, 2015 12:48 AM by LemonStreet
Jan 16, 2015 03:30 AM|crndev|LINK
I have a Web API 2 project and scaffolding works fine whenever I add new OData Controllers with EntityFramework CRUD operations. However the moment I rename the default namespace and assembly name in my project's properties to reflect what I want, scaffolding
seems to stop working. Here is what I am doing:
I've tried the above steps multiple times by re-creating the project from scratch. Tried restarting VS multiple times as well. After changing the default namespace I've refactored all the source files to use this new namespace both manually on a file-by-file
basis as well as via ReSharper doing a bulk update. Doesn't matter which way I do it, the moment I perform the rename, scaffolding stops working. Has anyone else faced this issue?
UPDATE: This seems to be a bug with the latest scaffolding infra. Tried this across machines. If you create a new web application of type 'Web API' and then try adding a scaffolded controller (either OData or the standard one) with EF CRUD and if your project
name or namespace or assembly names are set to be of the following pattern: "MS.*.*<and so on>" the model drop down list in the 'Add controller' modal will be blank.
Jan 22, 2015 12:48 AM|LemonStreet|LINK
Have you tried to rebuild the solution after you rename the namespace?