Hi everyone i am developing my first plugin in nopcommerce 4.1. I followed the tutorials and everything works fine, the only thing i cant figure out is this exception i get when i click on configure button.
here is the full stack trace.
System.InvalidOperationException: The view '~/Plugins/Chat.MainChatPlugin/Views/Configure.cshtml' was not found. The following locations were searched: ~/Plugins/Chat.MainChatPlugin/Views/Configure.cshtml at Nop.Web.Framework.Infrastructure.Extensions.ApplicationBuilderExtensions.<>c.<UseNopExceptionHandler>b__1_1(HttpContext context) in D:\NopCommerce\Presentation\Nop.Web.Framework\Infrastructure\Extensions\ApplicationBuilderExtensions.cs:line 83 at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware.Invoke(HttpContext context) at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware.Invoke(HttpContext context) at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context)
Please check the plugin folder inside the Nop.Web . If the cshtml file exist then match the spelling of the path. You may also want to import the _ViewImports.cshtml and don't forget to rebuild the plugin. Thanks.
Please check the plugin folder inside the Nop.Web . If the cshtml file exist then match the spelling of the path. You may also want to import the _ViewImports.cshtml and don't forget to rebuild the plugin. Thanks.
Thanks for your response.
According to the tutorial i have placed my plugin in /Plugins folder on root solution directory and not in nop.web folder should i put my plugin in nop.web?
I have copied _ViewImports.cshtml file from another plugin. Is there anything i should change in this file?
When You build your plugin you will find build version of your plugin inside "Nop.Web\Plugins". So you should find your cshtml in "Nop.Web\Plugins\Chat.MainChatPlugin\Views\Configure.cshtml".
Copy version of other plugins _ViewImports.cshtml should work just fine.
if you can't find your cshtml file inside "Nop.Web\Plugins" folder then you might want to look at your plugins csproj file. You can take help from other plugins csproj file or check other plugin Notes.txt.
When You build your plugin you will find build version of your plugin inside "Nop.Web\Plugins". So you should find your cshtml in "Nop.Web\Plugins\Chat.MainChatPlugin\Views\Configure.cshtml".
Copy version of other plugins _ViewImports.cshtml should work just fine.
if you can't find your cshtml file inside "Nop.Web\Plugins" folder then you might want to look at your plugins csproj file. You can take help from other plugins csproj file or check other plugin Notes.txt.
Thank You.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.