3.40 plugin changes

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
9 anni tempo fa
Andrei

1) re: Do not embed plugin views

Is this now a requirement?  I'm upgrading my plugins, and with my views still embedded, I got error

The view 'Nop.Plugin.[...].Views.[...].Configure' or its master was not found or no view engine supports the searched locations


2) I see that plugins now have an app.config file which generates a .dll.config file, and also the web.config now gets copied to the build output path.  Are these required in the build output (i.e. runtime plugin folder?)
9 anni tempo fa
Hi Dennis,

1. Yes. Views should be copied to output. Please note that View paths are a bit modified in actions in plugin controllers
2. These app.config files are always generated for each nuGet update and addition of some new packages. So I just left them. I tried to disable "Generate serialization assembly" for plugin proejcts. But they are still copied output. Any idea?
9 anni tempo fa
1) RE: "Views should be copied to output"
Is there anyway one could still use embedded if they want to?

Yes, I see that controller code changed from (e.g.)
        return View("Nop.Plugin.Shipping.UPS.Views.ShippingUPS.Configure", model);
to
        return View("~/Plugins/Shipping.UPS/Views/ShippingUPS/Configure.cshtml", model);

2) I suppose plugin developers can choose to not include the app.config similar to not including the .pdb file

I thought you were generating the XmlSerilizers.dll on purpose for performance reasons.  (No?)
I just tried this on Shipping.UPS and it works:

FYI. The exact steps to stop the XmlSerializers.dll from being auto-generated are:

In VS, right-click your project file and select "Properties"
Click the "Build" tab
Change the "Generate serialization assembly" dropdown from "Auto" to "Off"
Rebuild and it will be gone
9 anni tempo fa
1. No, embedded views are not supported anymore. It's part of performance optimization. Anyway, they are not used anymore.
2. Right. Thanks. But please see my post above. It does not work for some reasons.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.