Can't seem to make changes to cs files.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
13 年 前
I can edit them all I want, but the changes don't seem to take.

I want to make changes to the CheckoutCompleted page.  If I make changes to the .aspx file, those changes show, if I modify the .cs file, it's ignored.  I even went as far as renaming the .cs file in the web directory, and didn't even get an error.

I'm sure it has something to do with build process, but not sure what.  I've tried F6 build, and the 'Rebuild Solution' option, but no luck.

Any ideas?
13 年 前
Are you using Visual Studio or Web Developer Express?
13 年 前
VS 2010
13 年 前
Just try building NopCommerceStore. If you are testing this on a web hosting provider and not on your local machine, you will have to re-upload NopCommerceStore.dll and all of the changed files.
13 年 前
I've tried that.  No luck.

I'm running locally on IIS7, and I'll be moving it to a hosted account w/Arvixe once I get it working.

The part that's frying my brain is that aspx file changes are instant, and .cs file changes are ignored.  The aspx changes confirm that I'm working with the right files, in the right dir, but the .cs files just defy my wishes.

I've gutted the file, and replaced it with "throw new Exception", and the page just comes out like it was the original.
13 年 前
Ok, here's a stupid question...

I'm working on my own application, and it's just a 'web site' app - much smaller/simpler than nop.  I'm used to being able to just edit the .cs files, and the change takes instantly.

I realize that with nop, there are libraries, and if I try to change the code in them, I need to update the DLL files in the bin dir.

Does that also apply to the .cs files that are the code behind files for the pages?  If so, what DLL are they in?

Thanks, in advance.  This one is really driving me crazy.
13 年 前
aGorilla wrote:
Ok, here's a stupid question...

I'm working on my own application, and it's just a 'web site' app - much smaller/simpler than nop.  I'm used to being able to just edit the .cs files, and the change takes instantly.

I realize that with nop, there are libraries, and if I try to change the code in them, I need to update the DLL files in the bin dir.

Does that also apply to the .cs files that are the code behind files for the pages?  If so, what DLL are they in?

Thanks, in advance.  This one is really driving me crazy.


Yes, you are correct,

In many websites when you make changes to .cs file , there is no need to re-built the project and changes takes place.

But in nopcommerce project, whenever you will make any change in .cs file YOU NEED TO RE-BUILT your project that will update the .dll files/libraries and then only you will be able to see the changes.

In nopCommerce, if you are making change to .aspx page then you don't need to rebuilt/re-compile - It's only .cs file which requires project re-built on any change.

Whenever you make any change in .cs which is inside the nopCommerceStore folder, after you are done with the project re-built, you need to update one dll file which is in bin folder named as "NopCommerceStore.dll". This is the only dll file that is updated when you make any change .cs file (from the nopcommercestore folder).

So the best practice would be : whenever you will make the changes locally in .cs (that is from the nopcommercestore folder), rebuild, then copy the new nopcommercestore.dll file across to the live server. That's it !!!!!

To know more about why on few websites you can make changes in .cs file without re-compiling and why in nopcommerce you are required to re-compile, take a look at this article: http://www.compiledthoughts.com/2008/05/web-site-vs-web-application-project.html
13 年 前
Can't thank you enough.  Not only did you solve my problem, but you did it in a way that helped me learn a bit more about the .Net environment.

You're timing couldn't have been better, because it made the difference between working through the holiday weekend, or taking a couple of much needed days off.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.