dotnet-aspnet-codegenerator: Permission denied
Hi,
I am using 2024.3 EAP 2 (243.16718.44) on macOS Sonoma 14.5.
In Rider I created a new Web App (Model-View-Controller), created my models and context class and then right-click on Controllers and select Add → Scaffold item → MVC Controller with views, using Entity Framework. After selecting the model and data context class, I click on Add and get the error:
Running command: /Users/.../dotnet-aspnet-codegenerator --project /Users/.../WBCA.csproj --target-framework net6.0 --configuration "Debug" --no-build controller --controllerName WBController --relativeFolderPath "/Users/.../Controllers" --model WBCA.Models.WB --dataContext WBCA.Data.WBContext --useDefaultLayout --controllerNamespace WBCA.Controllers --useSqlite
Scaffolding 'MvcControllerEntityFramework' has finished with errors:
* Scaffold item command has failed with exception: An error occurred trying to start process '/Users/.../dotnet-aspnet-codegenerator' with working directory '/Users/.../S2P1'. Permission denied
In the Terminal, I changed to the obj folder of my project that contains dotnet-aspnet-codegenerator. I then ran the command again but instead of the absolute path for the --project option, I used a relative path --project ../S2P1.csproj and the scaffolding completed successfully.
How can I get the scaffolding to work via the IDE?
Please sign in to leave a comment.
Hello Pkruger ,
Thank you for reaching Rider Forum.
I could not reproduce the issue you are facing, nor in the 2024.2.5, neither in 2024.3.2EAP:
Thus, could you please let me know the following:
Thank you in advance.