To Work with a Code Item
The Code Editor does not provide facilities you can use in Microsoft
Visual Studio to develop and debug any source code in customization projects. To start working
with a Code item in Visual Studio, perform the following instructions:
- Publish the customization project, as described in Publishing Customization Projects.
After you have published the customization project, the <CodeItemName>.cs file with the item code is placed in the App_RuntimeCode folder of the website.
- Launch Visual Studio.
- To open the <CodeItemName>.cs file in Visual Studio, on the main
menu, click File > Open > File, and select the file in the
Open File dialog box, which opens.Note:If you need to debug the customization code, you have to open the website instead of the file. See To Debug the Customization Code for details.
- After you have finished editing the source code of the item, click
Save to save your changes in the file.
Because the App_RuntimeCode folder contains the customization code that is published, the changes in the file are immediately applied to the application instance.
- Open or refresh the form that uses the code, to make sure that the business logic has
been changed for the form.Note:If an error exists in the changed file, the website might be corrupted. You can recover the website, for example, in one of the following ways:
- Debug the code
- Undo the changes
- Publish the customization project again to update the files in the App_RuntimeCode folder
- Delete the file from the App_RuntimeCode folder
- To update the Code item in the customization project, follow the instructions described in To Synchronize Code Changes with the Customization Project.