Compiling .cs files used in nopcommerce (1.4)

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
14 лет назад
If you are currently using MS Web Developer 2008 Express Edition for developing edits to NopCommerce, and you do changes to a .cs file, what method are you using to re-compile? It seems that auto-compilation is not working for it. I've read around the wonderful net that in some cases, projects are built as "Web Applications", which force all associated .cs to be assembled in some fashion with the site as a full web application. What this keeps us from doing though, at least for me, is just on-the-fly changing something small in a .cs file within the website, and having it recompile on the fly. I've never personally had to do forced re-compilations in the past; in that all of my programming has either been a full c# application OR a web based app using web developer ; never a "Web Application" that combines both so-to-speak. I've just never been a situation that needed such a project style of building a website.

My Questions:
1.) When you make an edit to any of the .cs files for nopcommerce, and you are using only MS Web Developer 2008 Express Edition; how can you force a re-compile that will apply the changes you've made in the code behind?

2.) Am I going to have to bury the hatchet and get the Visual Studio 2008 demo just to recompile the entire project to make simple code-behind changes?

Any help would be greatly appreciated.

Many thanks to nopcommerceteam for answering a few private questions in regards to this. I think bringing my quandary into the open may help others, so hopefully the answer to this will help many other fly by night programmers here who do not own the full Visual Studio 2008.
14 лет назад
Ok. I think it's becoming obvious I will need to acquire the full visual studio to work on a nopcommerce site.

http://www.compiledthoughts.com/2008/05/web-site-vs-web-application-project.html

There are several other articles online that describe differences between a Web Site and a Web App.

As the .cs files were still present in all of the folders, I was under the false impression that I could just make changes to .cs files an the code-behind would recompile on the fly.

I don't forsee a work-around for this. If you do know of one, yell.
14 лет назад
I'm not part of the NopCommerce Team :)

I don't have visual studio express but according to a quick Google search Visual Studio Express SP1 does allow for Web Application Projects.
14 лет назад
Not a team member! Well you should be. You know your nop!

Thank you very much for the SP1 hint. I will attempt to create a 'new project' and see if I can compile the site code properly.

Worst case scenario I'll get the 90 day visual studio 2008 professional trial, and then pray it comes down in price after 2010 comes out!

Anyhoo, thanks for all your help. Hopefully this exercise has helped others in the same predicament.
14 лет назад
As a quick update (I know everyone has been biting their nails!), yes MS Web Developer 2008 Express Edition with/ SP1 does open the web application project successfully. I will have to check my development pc I was working on to make sure it was updated properly with SP1. There are some errors upon opening the project regarding 'project folders', but it does seem to re-compile each individual class library appropriately without fault. I'll test it out later for the small code-behind change I originally intended to perform.

Thanks again.
14 лет назад
Compiled fine. Here is a synopsis..

When using MS Web Developer 2008 Express Edition on an IIS/SQL Server Express local development install (for me, I'm using Vista Home Edition 64-bit)

- After starting MSWD2008 Express, Open the project called "NopCommerce" in the full source version of the NopCommerce download.
- For example, I downloaded the entire nopc 1.4 version, with source included.
- I then put it into c:\Inetpub\wwwroot\mysitename\
- I then used IIS manager within Vista (go to My Computer, Right-Click on it, then click "Manage").
- I clicked on "Applications" to manage what folders were set to application. I navigated to
the mysitename folder, then inside it, I navigated to the nopcommercestore folder there-in. I set that
nopcommercestore folder as an application (so that IIS would look properly at it's web.config)
- Once that is setup, go back to MSWD2008 Express Edition, and "Build" the solution. You need to do this before you commit any changes to any of the code-behind files or the presentation files (aspx or ascx) as the designers will not update properly.
- There should be 37 independent projects that compile individually.
- Once the solution has compiled, you should be ready to go to start manipulating aspx, ascx or .cs files in the site.
- Every time you want to test out your changes, you will need to recompile/build the "NopCommerceStore" project. I think alternatively you can build the entire solution, but if you haven't messed with anything in the nopcommerce class libraries, it's quicker just to build the NopCommerceStore project within.

When you've tested your changes fully, make sure to upload your /bin/NopCommerceStore.dll as well as any individual aspx, ascx or cs files associated with any modules, controls or templates you've edited and re-compiled.

That should do it. Hopefully this helps others in the same development environment.
14 лет назад
nopcommerce core need to create a Wiki so information like this can be added.  

Good work on the instructions.
13 лет назад
Thx Lubidius - good man! :0)
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.