Thoughts from Dan Miser RSS 2.0
 Tuesday, October 09, 2007
I'm working a lot on agile .NET project setup right now. One of the standards in this arena is CruiseControl.Net. We also use Subversion and MSBuild, which means we need to use MSBuild Tasks to use the custom Subversion tasks. The documentation for MSBuildTasks is, well, "Open Sourcey". For the Subversion tasks, not all tasks have example MSBuild fragments. In addition, the descriptions of most properties or classes are just one sentence circular summaries.

For example, if you need to commit just one file inside the MSBuild script, you would use the SvnCommit task. You might do this as part of a depoyment process where you set version numbers on files before creating an installer. This is the snippet that I finally settled on to update just that one file:

<ItemGroup>
  <CodeFiles Include="Properties\AssemblyInfo.cs" />
</ItemGroup>

<!-- Later on, inside a Target, use this -->
<SvnCommit
  Targets="@(CodeFiles)"
  Message="$(CCNetLabel)"
  Password="pwd"
  UserName="user"
/>

The reason for this is that SvnCommit descends from SvnClient, which is too generalized of a base class. For example, the SvnCommit.RepositoryPath property does not work as one might expect. Specifically, in my case, when I specified the RepositoryPath attribute in the msbuild file, I received the following error. It turns out that you should just not specify the RepositoryPath attribute at all (see the documentation for "svn help commit" to see that a URL is not passed in on the command-line, but rather, svn figures out the URL from the working copy).

    svn: 'svn://x.y.z/project/trunk' is a URL, but URLs cannot be commit targets

Also, SvnCommit.LocalPath should not be used. It ends up generating a command-line similar to the following, which ends up committing everything in the LocalPath and down. Remember, all I wanted was to update one specific file, so it turns out that the LocalPath attribute is getting in the way here.


svn.exe commit "full\path\to\my\working\directory" 
  "Properties\AssemblyInfo.cs" --username user --password pwd 
  --message "1.8.1.2" --non-ineractive --no-auth-cache

To sum up:

  • Don't specify the RepositoryPath attribute in an SvnCommit task
  • Don't specify the LocalPath attribute in an SvnCommit task
  • Specify a ToolPath entry that points to the folder that holds svn.exe if it's not in the default location (c:\Program Files\Subversion\)
  • Setting the Verbose attribute does not work because it is defined as a nullable boolean

Edited on 10/10/2007 for clarity due to comments made by Steve Trefethen. Thanks, Steve!

Tuesday, October 09, 2007 1:46:22 PM (Central Standard Time, UTC-06:00)  #    Comments [0] -
.NET
 Tuesday, September 25, 2007

I used Altova's XMLSpy briefly back in the day, and it was a very well thought-out and implemented product. I haven't had a lot of need to look at the company for several years, until today when a co-worker pointed me to their (semi-)new product, DatabaseSpy 2008. It connects to many different databases and has a phenomenal UI (like all Altova products). It has a nice editor, designer, and browser, and has a very powerful import/export mechanism to easily move data between different databases.

It looks like I need to sit down and evaluate the other products that have appeared since the last time I looked.

Note: This post is unsolicited. I do not have a registered copy of any Altova product at this time.

Tuesday, September 25, 2007 9:05:49 AM (Central Standard Time, UTC-06:00)  #    Comments [0] -

 Wednesday, September 19, 2007
This is a pretty nice summary about what to do to be able to share files between two mortal enemies.
Wednesday, September 19, 2007 4:00:09 PM (Central Standard Time, UTC-06:00)  #    Comments [0] -
Macintosh
 Tuesday, September 18, 2007

To move a MySQL 5.x database from one machine to another, follow these steps.

On the source machine, type this:

mysqldump -u root db_development > backup.sql 

After copying backup.sql to the destination machine, type this (assuming the database doesn't already exist there):

mysqladmin -u root -p create db_development
mysql -u root -D db_development < backup.sql

References

I used these web pages as inspiration, but it seems that things have gotten out of date.
Tuesday, September 18, 2007 1:17:46 PM (Central Standard Time, UTC-06:00)  #    Comments [0] -

 Sunday, September 16, 2007

The other night, I set out to harden my wireless connection security on my home router by following commonly accepted wisdom and best practices that have been passed down from person to person. Namely, the 2 biggest changes I made were to change my SSID and quit broadcasting the SSID. Setting up my MacBook was about as obvious and painless as could be. However, things did not fare so well on my fairly new work laptop (Lenovo T61).

My wireless connection in the tray area would immediately put an X on it and tell me things weren't connected. However, I could still browse, still had a valid IP address, etc., etc. After about 8-10 minutes, the connection would finally shut down and tell me that it couldn't connect to my work's wireless connection.

After a lot of googling, I came across this article that talked about wireless network issues in a little more depth. It turns out that the Windows Zero Configuration service did not like the fact that I had hidden my SSID so it was trying to be "helpful" by searching for other networks out there that it could see.

In the end, I was able to leave my SSID hidden (despite the fact that it doesn't really matter much that it's hidden) and leave Windows Zero Configuration running. I just had to uncheck the "Enable IEEE 802.1x authentication for this network" option in Wireless Networks | Preferred Networks | Properties | Authentication. Who knew?

Sunday, September 16, 2007 8:31:00 PM (Central Standard Time, UTC-06:00)  #    Comments [0] -

 Tuesday, August 28, 2007
Chalk this up to yet another "I should have read the man page first" incidents. I kept noticing that my PATH was not set properly in new Terminal sessions, even though I was 100% positive I set it correctly in my ~/.bash_login. It turns out that the man page clearly states that during login, ~/.bash_profile, ~/.bash_login, and ~/.profile are checked, in that order, and executes the first one that it finds. That prompted me to look around to find the ~/.bash_profile file that I had created when following directions to install an application several weeks ago. Merging the files together, everything went back to working as it should. Live and learn.
Tuesday, August 28, 2007 8:47:09 AM (Central Standard Time, UTC-06:00)  #    Comments [2] -
Macintosh
 Friday, August 24, 2007
I've been listening to .NET Rocks for quite a while now. They almost always have good content, and the production value is insanely good. I had problems when they went away from AAC feeds (note: it looks like the AAC feed is back again!) where the entire episode would restart when I would bring my iPod out of a long sleep.

I've also been listening to more audio books as a way to kill time in the car. Most audio books are coming in as mp3, but then you don't get the benefit of speed-up playback or having the iPod remember your position. In order to have iTunes classify a file as an Audiobook, you need to do 1 of the following things:

  1. Rip the audio file as AAC rather than mp3 (or convert an existing mp3 file to AAC using iTunes). Afterwards, rename the file extension to .m4b. The default extension for AAC encoding is .m4a, so you need to rename them manually.
  2. On Windows, use this free software to do all of the work in one step.
  3. On a Macintosh, use this script to do the work for you.
Friday, August 24, 2007 12:38:39 PM (Central Standard Time, UTC-06:00)  #    Comments [0] -

 Wednesday, August 22, 2007
I was getting a strange problem at a client's site recently where on occasion, an ASP.NET application that called a web service would throw different exceptions. The fact that I could claim "It works on my machine" meant little consolation. Stranger still, when debugging the application, it would blow up at different spots. When it finally blew up on a call to Response.Redirect, the client suddenly remembered some code that he used in a similar situation before. The theory was that there is some kind of misconfiguration in the servers somewhere, so this should not be needed, but this work-around has since been added and no additional errors have been reported.



// svc is a WebService that you would use in your ASP.NET application

svc.Proxy = new System.Net.WebProxy("127.0.0.1");

((System.Net.WebProxy)svc.Proxy).BypassList = new string[] { "NameOfLocalMachine" };

Wednesday, August 22, 2007 12:02:12 PM (Central Standard Time, UTC-06:00)  #    Comments [0] -
.NET | ASP.NET
Navigation
Archive
<October 2007>
SunMonTueWedThuFriSat
30123456
78910111213
14151617181920
21222324252627
28293031123
45678910
About the author/Disclaimer

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

© Copyright 2008
Dan Miser
Sign In
Statistics
Total Posts: 310
This Year: 25
This Month: 0
This Week: 0
Comments: 605
All Content © 2008, Dan Miser
DasBlog theme 'Business' created by Christoph De Baene (delarou)