Can I compile only one class files and use it?

125 Views Asked by At

I have a asp.net application, in which I have App_code folder with different classes. Whenever I publish my application it creates single App_Code.dll for all classes, which is fine, but now I have to add one more class but I want to publish only that class file. Is it possible??

2

There are 2 best solutions below

0
Naresh On BEST ANSWER

Try with adding new project (Class library ) in solution, add your class file in that project . And use it by adding reference it to in another project.

1
Sunny On

Then you shouldn't publish, place the code as is and it gets compiled on first user's request. And whenever new class is added, AppPool gets restarted. Of course, this comes with slowness for first user and after that it is similar to what is done with publish.