Intellisense on plugins. You must add a reference to assembly 'System.Web.Mvc, Version=5.2.3.0'.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
7 years ago
As the topic says, im missing a reference to system.web.mvc in my plugin. Result: intellisense is not working.

The plugin itself is working fine.

I tried adding web.config to the views folder, but it made no difference.

Anyone got a solution?
7 years ago
Have the same issue using Visual Studio 2017

Regards, Thomas
7 years ago
This is standard behavior for any .net project in Visual Studio. The IDE uses referenced assemblies to build IntelliSense data. That's why you need to add the reference to develop plugins.

From the other hand, nopCommerce ASP.NET application has System.Web.Mvc loaded to the memory. You plugin's assembly is loaded to the same application. That's why you don't need to bring System.Web.Mvc.dll together with your plugin.
7 years ago
ilich_x86 wrote:
This is standard behavior for any .net project in Visual Studio. The IDE uses referenced assemblies to build IntelliSense data. That's why you need to add the reference to develop plugins.

From the other hand, nopCommerce ASP.NET application has System.Web.Mvc loaded to the memory. You plugin's assembly is loaded to the same application. That's why you don't need to bring System.Web.Mvc.dll together with your plugin.


Well...
So what is the solution for our problem then?

Sincerely, Thomas
7 years ago
Add System.Web.Mvc via NuGet to your plugin project and make sure it is not copied to the build output. The only assemblies which has to be copied to build output are plugin assembly and 3rd party assemblies which are not part of nopCommerce.
7 years ago
ilich_x86 wrote:
Add System.Web.Mvc via NuGet to your plugin project and make sure it is not copied to the build output. The only assemblies which has to be copied to build output are plugin assembly and 3rd party assemblies which are not part of nopCommerce.


The problem is that I have tried that without success.
I also tried this solution that did not work either:

http://stackoverflow.com/questions/31599087/vs-2015-intellisense-assembly-not-referenced-error

Any other ideas of what I can try?

Sincerely, Thomas
7 years ago
Seems that there is no help for this.

https://connect.microsoft.com/VisualStudio/feedback/details/912301/intellisense-for-razor-in-class-libraries-not-working

I'm curious, how do all of you who develop plugins for nopCommerce get around this problem?
7 years ago
ilich_x86 wrote:
Add System.Web.Mvc via NuGet to your plugin project and make sure it is not copied to the build output. The only assemblies which has to be copied to build output are plugin assembly and 3rd party assemblies which are not part of nopCommerce.


idem
7 years ago
dear stellaobosse,
the plugin manufacturers are all very jealous, and retain the trip & truck.
It makes me puzzled as nop comunity is very present, despite nop is an open source product and on paper and sharing best practices should be the norm!

If I find a solution I will place thee :-D
6 years ago
Any News about this?
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.