CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> .NET

 How to compile your .NET projects

Print topic Send  topic

Author Message
Livinus

Posts: 48
Posted: 09/09/2015, 12:02 PM

I have battled with this issue for some time now because most licensing solutions you may wish to use to protect or license your ASP.NET applications would normally require that you have your application compiled to DLL. I however arrived at the solution through a clue from the help desk of one of the commercial licensing software. I therefore wish to share may experience here for anyone who may have the need just as I did although I am still working on integrating a licensing solution to my projects.

METHOD 1:
The first time you publish your application, it is automatically compiled to DLL by the vb compiler(vbc.exe) or (csc.exe) located at the framework folder of your framework version for example:
C:\Windows\Microsoft.NET\Framework\v2.0.50727\
For version 2.0 and you can actually see and copy the compiled application. All the compiled applications in your system are located at the temporary ASP.NET files folder located at the framework folder:
C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\
When you open the Temporary ASP.NET folder, you will see folders corresponding to the various applications you had published before. Open the folder corresponding to your application of interest. You will have many versions of the compiled applications. Look for the one that best represents your project and copy all the files in the folder. I would recommend that you republish your entire project to have a full dossier of all the files of your project included. Note that any file that showed an error at the time of compilation will not compile and won�t be included among the compiled files. You must correct the error. If however it is just a warning as you are bound to have many of them, it will not prevent the compilation.
When you are done having your application fully compiled, then you can replace your source files at you application�s virtual directory with your compiled version as follows:
1. Backup the files at your application's virtual directory.
2. Make a folder ./bin at your application's virtual directory if it does not already exist.
3. Copy the compiled files to the ./bin folder created above.
4. Delete all .html, .vb and .aspx files from your application's virtual directory except datepicker.html and default.aspx or index.aspx as the case may be.
Run the application and see if it runs smoothly as before.

METHOD 2:
You can also compile your application manually using a file named aspnet_compiler.exe
Search the Internet to learn more about this handy tool and its various switches.
As an example: To compile a project named "myproj" hosted at the default website and save the compiled files in a folder named "C:\Deploy" take the following steps:
1. Change to the folder C:\Windows\Microsoft.NET\Framework\v2.0.50727
2. Type the following command at the command prompt:
aspnet_compiler -v /myproj -p "C:\inetpub\wwwroot\rap" "c:\Deploy" -fixednames /f /u
3. If everything goes well you will have your compiled DLL files placed in the folder C:\Deploy.
Copy the content of the folder to the. /bin folder in your application virtual directory and follow the instructions outlined in method 1 above to test your compiled application.

I hope this helps some one

Regards
View profile  Send private message
eratech


Posts: 513
Posted: 09/10/2015, 8:44 PM

Thanks Livinus.

Compiling .NET in CCS is a pain if you need to do it manually. Good tips to have around.

I'm experimenting with .NET 'v Next 4.6' which allows (almost requires) some command line work and can run some stuff on my Mac directly.

Cheers

Eric
_________________
CCS 3/4/5 ASP Classic, VB.NET, PHP
Melbourne, Victoria, Australia
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright 2003-2004 by UltraApps.com  and YesSoftware, Inc.