简体   繁体   English

配置后,nopCommerce 3.2插件无法在nopCommerce 3.3上运行

[英]nopCommerce 3.2 plugin isn't working on nopCommerce 3.3 after configuration

I developed a plugin for nopCommerce 3.2 using third rule of this link 我使用此链接的第三条规则为nopCommerce 3.2开发了一个插件

On nopCommerce 3.3 I created a new project,added references, copied all Models,Controllers, ViewEngines, Contents, Scripts, RouteProvider and Description. 在nopCommerce 3.3上,我创建了一个新项目,添加了引用,并复制了所有模型,控制器,ViewEngine,内容,脚本,RouteProvider和描述。 But whenever I am building that project it showing some errors regarding Nop.Admin, Nop.Core, Nop.Data, Nop.Services and all other libraries about Nop.* 但是每当我构建该项目时,它都会显示有关Nop.Admin,Nop.Core,Nop.Data,Nop.Services和所有其他有关Nop。*的错误。

I removed and added them again, but same problem is occurring each time. 我删除并再次添加了它们,但是每次都出现相同的问题。

Here is a picture about those errors. 这是有关这些错误的图片。 在此处输入图片说明

What are causing that kind of errors and how can those be removed? 是什么导致此类错误,如何消除这些错误?

Problem is with references. 问题出在参考文献上。 My suggestion is open some NOP plugin project file as xml and check your project file (again as xml) if the references are same . 我的建议是打开一些NOP插件项目文件(如xml),并检查您的项目文件(还是xml),如果引用相同

You have to check third party libraries if they are in correct folder. 您必须检查第三方库是否在正确的文件夹中。 The version of the library is part of the path: 库的版本是路径的一部分:

for example: ..\\..\\packages\\Autofac.3.3.1\\lib\\net40\\Autofac.dll 例如: ..\\..\\packages\\Autofac.3.3.1\\lib\\net40\\Autofac.dll

I remember the same problem when I moved from 2.xx to 3.10. 当我从2.xx迁移到3.10时,我还记得同样的问题。

Try to remove all your links and add them again using 尝试删除所有链接,然后使用重新添加它们

References -> Add reference.. -> Browse -> Browse... -> Make sure that the path points to your current solution -> add references manually 参考->添加参考..->浏览->浏览...->确保路径指向您当前的解决方案->手动添加参考

My bet is that your plugin is targeting wrong .NET version, go into project properties and change target framework to 4.5.1. 我敢打赌,您的插件针对的是错误的.NET版本,请进入项目属性并将目标框架更改为4.5.1。 Also when adding references to 同样在添加引用到

System.Web.Mvc
System.Web.WebPages

Make sure you are targeting ones bundled with NopCommerce, or you can get them via NuGet. 确保您以与NopCommerce捆绑在一起的产品为目标,或者可以通过NuGet获得它们。

尝试检查构建,构建的输出并检查引用程序集的属性是否能够复制到本地(如果要在bin中构建项目)或不能复制到本地(如果要将其构建到plugins文件夹) 。

Did you add the Nop references (Nop.Admin, Nop.Core, Nop.Data...) by browsing to Presentation/Nop.Web/bin? 您是否通过浏览到Presentation / Nop.Web / bin添加了Nop引用(Nop.Admin,Nop.Core,Nop.Data ...)?

Or you are adding through solution? 还是您正在添加解决方案? (see screenshot)? (请参见屏幕截图)?

添加对nopCommerce库的引用

You should really be using the latter. 您确实应该使用后者。 :) :)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM