This Forum is ARCHIVE only
For LightSwitch questions,
please use the official forums at:

http://social.msdn.microsoft.com/forums/en-US/lightswitch/threads


Cleanup Lightswitch folders before emailing
Last Post 22 Oct 2012 02:09 AM by sdeliasr. 3 Replies.
AddThis - Bookmarking and Sharing Button Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages Informative
Bob BakerUser is Offline
New Member
New Member
Send Private Message
Posts:13
Avatar

--
15 Oct 2011 12:13 PM
    Unlike other Visual Studio solution types, Lightswitch creates a lot of extra files during builds. I found (and edited) this handy cmd file that I place in the same folder as my .sln file and execute from a command prompt there before packaging up the solution to share (zip, rar, etc.). The reduction in archive size is significant enough to warrant this extra step.

    Just copy this into your favorite text editor and save as Cleanup.cmd or whatever name you like. It just has to have a .cmd or .bat extension. Don't worry about file types/extensions you don't have installed. You can edit those out or add any you have yourself.

    @echo off
     
    del /Q /S /A:H *suo
     
    del /Q /S Client\bin
    rd /Q /S Client\bin
    del /Q /S Client\obj
    rd /Q /S Client\obj
     
    del /Q /S ClientGenerated\bin
    rd /Q /S ClientGenerated\bin
    del /Q /S ClientGenerated\obj
    rd /Q /S ClientGenerated\obj
     
    del /Q /S Common\bin
    rd /Q /S Common\bin
    del /Q /S Common\obj
    rd /Q /S Common\obj
     
    del /Q /S Server\bin
    rd /Q /S Server\bin
    del /Q /S Server\obj
    rd /Q /S Server\obj
     
    del /Q /S bin\Debug
    rd /Q /S bin\Debug
    del /Q /S bin\Release
    rd /Q /S bin\Release
     
    del /Q /S ServerGenerated\bin
    rd /Q /S ServerGenerated\bin
    del /Q /S ServerGenerated\obj
    rd /Q /S ServerGenerated\obj
    del /Q /S _Pvt_Extensions
    rd /Q /S _Pvt_Extensions
     
    del /Q /S /A:H *.user
     
    echo Cleanup completed.
    pause

    Hope you all find this useful.

    Bob Baker
    Michael WashingtonUser is Offline
    Send Private Message
    Posts:1313
    Avatar

    --
    15 Oct 2011 12:31 PM
    Thanks!
    -----------
    Michael Washington
    http://LightSwitchHelpWebsite.com
    QuintonVUser is Offline
    New Member
    New Member
    Send Private Message
    Posts:3
    Avatar

    --
    19 Oct 2011 02:09 PM
    Thanks!

    Would be nice if the usual "right click solution, click on cleanup" worked with LightSwitch
    Steve DUser is Offline
    New Member
    New Member
    Send Private Message
    Posts:3
    Avatar

    --
    22 Oct 2012 02:09 AM
    I noticed under Client\Bin\Debug & Client\bin\Release there are quite a few language-specific folders.

    Is there a way to suppress those we don't want - which I think is all of them as I don't see "en" among them.

    Thanks!
    -Steve D
    Gillette, NJ, USA
    You are not authorized to post a reply.


    Microsoft Visual Studio is a registered trademark of Microsoft Corporation / LightSwitch is a registered trademark of Microsoft Corporation