.:: Jasa Membuat Aplikasi Website,Desktop,Android Order Now..!! | | Order Now..!! Jasa Membuat Project Arduino,Robotic,Print 3D ::.

Exclude Files and Folders from WDP Output

0 komentar


بِسْــــــــــــــــمِ اﷲِالرَّحْمَنِ اارَّحِيم
bismillaahirrahmaanirrahiim

السَّلاَمُ عَلَيْكُمْ وَرَحْمَةُ اللهِ وَبَرَكَاتُهُ
Assalamu'alaikum warahmatullahi wabarakatuh

Web  Deployment Projects (WDP) allows you to pre-compile your web into binaries and further also allows you to merge the assemblies produced in the format that you like.

In my earlier posts I had talked about various WDP features and the latest release of WDP for VS 2008.  You can read more about this at:

http://vishaljoshi.blogspot.com/2008/01/visual-studio-2008-web-deployment.html 

By default in the WDP output you will find project files (.csproj/.vbproj), user files (.user), .PDB, obj folders and other artifacts which are not required for web to run.  It is pretty easy to get rid of these files by following these simple steps:

Step 1 - Open WDP project file for editing

Open WDP project file by right clicking on the WDP project and clicking "Open Project File"

image

Step 2 - Exclude .pdb, .user, .csproj/.vbproj files from Build

In the ItemGroup section of WDP project which looks like below:

image

Add the files which you would like to exclude from the SourceWebPhysicalPath like below

image

ExcludeFromBuild will allow you to remove these files even though they are present as part of the parent project.  After this step your item group should look as below:

image

In the similar fashion above you can remove other items which you do not need in the output

Step 3 - Removing items after Build

As you know folders like OBJ are produced during build process hence if you do not want them to appear in the output then they need to be removed after build.  to do this we need to add one more item to the above ItemGroup as below

image

Do note that this time we are using the property $(OutputPath) instead of the property $(SourceWebPhysicalPath)

Now the last step is actually use the itemgroup value as part of the AfterBuild target.  Your WDP project file by default has these commented section as shown below

image

We need to uncomment the call to Target "AfterBuild" and call "RemoveDir" on the OBJ folder Item we declared in the ItemGroup above... This can be done as shown below:

image

Finally at the end your WDP project file will look as below:

image

Step 4 - Save WDP project file, and rebuild WDP

After the above changes to the WDP project file when you rebuild your WDP project you should have your output folder without PDB, Project file, user file or OBJ folder in it.

Hope this helps!!


Update Contact :
No Wa/Telepon (puat) : 085267792168
No Wa/Telepon (fajar) : 085369237896
Email : Fajarudinsidik@gmail.com
NB :: Bila Sobat tertarik Ingin membuat software, membeli software, membeli source code, membeli hardware elektronika untuk kepentingan Perusahaan maupun Tugas Akhir (TA/SKRIPSI), Insyaallah Saya siap membantu, untuk Respon Cepat dapat menghubungi kami, melalui :

No Wa/Telepon (puat) : 085267792168
No Wa/Telepon (fajar) : 085369237896
Email: Fajarudinsidik@gmail.com


atau Kirimkan Private messanger melalui email dengan klik tombol order dibawah ini :

ٱلْحَمْدُ لِلَّهِ رَبِّ ٱلْعَٰلَمِين
Alhamdulilah hirobil alamin

وَ السَّلاَمُ عَلَيْكُمْ وَرَحْمَةُ اللهِ وَبَرَكَاتُهُ
wassalamualaikum warahmatullahi wabarakatuh


Artikel Exclude Files and Folders from WDP Output, Diterbitkan oleh scodeaplikasi pada Sabtu, 04 Oktober 2008. Semoga artikel ini dapat menambah wawasan Anda. Website ini dipost dari beberapa sumber, bisa cek disini sumber, Sobat diperbolehkan mengcopy paste / menyebar luaskan artikel ini, karena segala yang dipost di public adalah milik public. Bila Sobat tertarik Ingin membuat software, membeli software, membeli source code ,Dengan Cara menghubungi saya Ke Email: Fajarudinsidik@gmail.com, atau No Hp/WA : (fajar) : 085369237896, (puat) : 085267792168.

Tawk.to