Custom classes in App_Code folder

Pam Reid asked on June 15, 2017 17:23

Hi,

I've been developing custom code for Kentico for a while now, but having been new to C# when I started, I feel like I might be missing something here. When editing custom classes in the App_Code folder, the automatic rebuild is very slow, and if there are errors in the class it breaks the entire site. Even in our dev environment, this isn't very practical if we need to have other people working on or testing other parts of the site at the same time (not to mention the frustration of having to wait each time the smallest change is made).

I've reviewed these two threads, but am still having trouble:

https://devnet.kentico.com/questions/build-problem
https://devnet.kentico.com/questions/kentico-project-build-too-slow

In general, how do people go about working on custom classes in this context? Is there a better way to edit and test them before moving them into the App_Code folder?

Thanks,
Pam

Recent Answers


Trevor Fayas answered on June 15, 2017 19:28

Yup, best way is to just create a blank ASPX page (i usually put it in the CMSPages\Custom), add a ASP button to the page with an OnClick, and put your code in the aspx.cs

Once you have it all tested, then you can move it to a class in the App_Code.

0 votesVote for this answer Mark as a Correct answer

Roman Hutnyk answered on June 16, 2017 09:13

The other think that will help testers, but not you: deploy the app on your local machine and do development/debugging/testing locally and once this done - move everything to dev.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.