Archive for May, 2009

Deploy the right app.config every time with build events

May 22nd, 2009 3 comments

It’s been a while since i have been “searching” build events but recently i made a mistake in creating setup for a customer by packing my own app.config so i have to do this all over again(poor me) so i decided to find a way to deploy the “right” app.config file every time.

Of course you can use many apps/procedures to do this and in large teams you can use servers just for this thing (along with unit testing and stuff of course …) but for a poor developer like me which comes from the all-time-classic-keeping-things-simple-DOS-age this is the most sufficient solution. Here it goes(i suppose you have a windows project with a app.config file ready)…


Create a app_deploy.config file in project directory




then while app_deploy.config is selected go to properties (F4) and change the “Do not copy” property to “Copy if newer”




after that right click on project and select “Properties”, select “Build Events” tab and push the “edit post-build” button




finally you can write this script into the window (or you can write your own DOS-like scripts using the macros described there)

IF $(ConfigurationName) == Debug GOTO end
md c:\Build\TestProject
copy $(TargetPath) c:\Build\TestProject
copy $(TargetDir)app_deploy.config c:\Build\TestProject\$(ProjectName).exe.config
copy $(TargetDir)*.dll c:\Build\TestProject


this line is checking that it isn’t debug mode

IF $(ConfigurationName) == Debug GOTO end

second line makes a build directory

md c:\Build\TestProject

the third line copies the .exe file to output directory

copy $(TargetPath) c:\Build\TestProject

the forth line deploy our configuration file and rename’s it to match the exe file

copy $(TargetDir)app_deploy.config c:\Build\TestProject\$(ProjectName).exe.config

the fifth line copies the necessary dll’s that application requires

copy $(TargetDir)*.dll c:\Build\TestProject

and the last is the “escape” line of the debug mode


after this you can build your project in any other mode than debug and then the “deployable” files in c:\Build\TestProject


Thank you for reading this and see you soon!!!

Categories: Build, Generic, Visual Studio Tags:

Get in Sync!

May 13th, 2009 No comments


There’s a lot going on with online file sync these days, they offer pretty much the same things (free space, multi-system, cross-platform syncing, file explorer integration, web access with sharing and photo gallery powers, etc.) but have some significant differences. I will present you three of the most popular services so you can start to thinking to be “in-sync”.

Dropbox is the first service i have used and i’m very satisfied from the speed, the web interface and the support from these guys. These are the key features:

  • The ‘killer’ feature for me is that Dropbox also includes a versioning system. For those not familar with versioning systems, it allows you to keep multiple versions of a file. This helps in case you need to ‘roll back’ a change if you are coding, or just for general use and tracking of updates. It also helps on the backend because if only changes of a file need to be sent to the server, so much bandwidth can be saved.
  • Another neat feature is a built-in photo gallery. Drag photos to the “photos” folder and they are automatically available for viewing on the web in a simple manner


The SugarSync provides the same functionality as Dropbox the main differences are the following:

  • SugarSync lets you add folders anywhere on your system to be synchronized, while Dropbox sticks to a single-bin-for-everything mindset (although there’s a symbolic link work-around for that)
  • SugarSync’s free accounts limit you to syncing two computers, while Dropbox seems unlimited.
  • SugarSync has working clients for iPhones, BlackBerries, and Windows Mobile phones—some of which we’ve heard is on the way for Dropbox, but not released yet.
  • SugarSync does not support versioning

Last service on my review is syncplicity. Syncplicity have an explicit versioning feature that preserves different editions of your files as they are synched, added, and removed (like dropbox). You can access an older version of a file by right-clicking the file and examining a list of the versions Syncplicity has tracked since the original upload. The list includes buttons for downloading a version to your local computer or reverting to that version. Syncplicity bills itself as a backup service, but its interface doesn’t include any special backup commands: the online copy of your synced folders is your backup. Syncplicity’s claim is perfectly fair, since it stores on its servers not only copies of past versions but also copies of deleted items. Syncplicity’s free service will delete older document versions after 30 days, however. In addition, Syncplicity offers integration with Facebook and Google Docs, and has announced partnerships with Picnik, Scribd, and Zoho, so you can sync your photos with Facebook and your documents with Google Docs. Look under my Account on the Syncplicity site to set the features up. Syncplicity’s free account caps out at 10,000 files, 2GB of storage, and two PCs, with limits on numbers of file versions and how long they’ll be kept.

As you can easily realize the services have some minor differences so you can choose the one that fit’s best to your needs so get in sync now!

Categories: Sync, Windows Tags:

sysinternals suite

May 8th, 2009 No comments

Long time ago i was collecting sysinternals tools one-by-one but yesterday i was looking for BgInfo util to install it on a server and i saw that they now have a complete package of all the tools here. Now i got one download for all, i call it “sysinternals suite”.

Categories: Windows Tags:

Build automatically all projects in path

May 8th, 2009 No comments

For a long time i was searching a tool that it would build all my projects when i get latest version from sourcesafe/svn without opening solutions one-by-one so i create one to fit my needs. It’s very simple get-things-done program, the whole class goes like this

        private void addProjectsToList()        {
foreach (string strFileTypes in desProjectTypes.Items)            {                foreach (string item in Directory.GetFiles(                    desPathToProjects.Text,                     string.Format("*.{0}", strFileTypes),                    SearchOption.AllDirectories))                {                    desProjectsFound.Items.Add(item, false);                }            }            desProjectsFound.Sorted = true;        }

        public static string GetVSExeLocation()        {            return string.Format("{0}\\devenv.exe",                 ConfigurationManager.AppSettings["DevEnvLocation"]);        }

        private void btnBuild_Click(object sender, EventArgs e)        {            ExecuteAction(" /Build");        }

        private void btnRebuild_Click(object sender, EventArgs e)        {            ExecuteAction(" /Rebuild");        }

        private void ExecuteAction(string action)        {            for (int i = 0; i < desProjectsFound.Items.Count; i++)            {                if (desProjectsFound.GetItemChecked(i))                {                    Process.Start(GetVSExeLocation(),                         desProjectsFound.Items[i] + action);                }            }


As you will see in download i use Krypton Toolkit

By the default options this thing will build automatically all projects in path.

Below is the compiled version of the program, don’t forget to modify the VS path in the config file to match the destination of your visual studio installation (697,82 kb)

Hope this helps someone besides me!

Categories: C#, Programming, Visual Studio Tags:

All links to Office 2007 SP2 products

May 1st, 2009 1 comment

I have followed all the Office SP2 product updates so far and i want to share with you in one single post, so here they are

  1. Windows SharePoint Services 3.0 SP2, x86 & x64.
  2. Office SharePoint Server 2007 SP2, x86 & x64.
  3. Windows SharePoint Services 3.0 with SP2 slipstream version, x64
  4. Windows SharePoint Services 3.0 with SP2 slipstream version, x86
  5. Office 2007 SP2

If you want a more detailed explanation of these downloads refer to Sharepoint Team blog and for the office update in KB968774

Categories: Generic Tags: