10.0.0 - 10.0.20
541 201 9965 Email Website

Home > Development Notes > Migrating Addons

Migrating Addons

Briefly, web application vs. web site projects

Web application projects require you to compile a site before you deploy it. Web site projects can compile deployed files on demand as a particular page is requested. AspDotNetStorefront 10.0.0 - 10.0.20 sites are web application projects. Earlier versions of the software are web site projects. This change was necessary because Asp.Net MVC requires that your application be a Web Application. For more information about web application projects vs. web site projects see: https://msdn.microsoft.com/en-us/library/dd547590%28v=vs.110%29.aspx

One-off modifications vs add-ons

If you have a modification you've made for one particular website, having to recompile before you move that modification into production is a perfectly reasonable thing to do and, in fact, that's what we'd recommend. However, if you've got an add-on you've developed that you expect to be able to easily deploy to several AspDotNetStorefront installations, the move to a web application project may pose a challenge. Ideally, you don't want to ask the users of your add-on to compile your add-on into their web project as part of your "easy installation" process. This article gives some guidance on working around this challenge.

Migrating code behind (.aspx.cs) files for add-ons

The admin console in version 10.0.0 - 10.0.20 still uses web forms, but because the admin is included in our web application project, all of the code-behind files are actually precompiled. If you'd like to make your custom admin web form page easy to deploy you may want to consider adding the code behind of your aspx page to its own project which you can compile separately. You can then setup your aspx page to reference this custom project rather than its code behind. Ultimately, this allows you to distribute files without requiring your code to be compiled into the target site. 

Migrating App_Code

In earlier versions of AspDotNetStorefront we had an App_Code folder that was a convenient place to put custom code. Deploying a modification to the App_Code folder used to cause the site to recompile on the live server. Now in our new web application environment you'll want to create your own separate project for these types of modifications that compiles into the bin folder. Then you can update your references to these projects from App_Code to your new custom project.

Print This Article
Email This Article
Previous Article
Next Article

Was this page helpful?YesNo