Navigation

Search

Categories

On this page

MSBuild fail on specific days
Isn't Linux supposed to be free?
Utterly Destroy #regions

Archive

Blogroll

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

RSS 2.0 | Atom 1.0 | CDF

Send mail to the author(s) E-mail

Total Posts: 120
This Year: 1
This Month: 0
This Week: 0
Comments: 40

Sign In
Pick a theme:

# Wednesday, January 21, 2009
Wednesday, January 21, 2009 11:20:59 AM (Mountain Standard Time, UTC-07:00) ( All things Microsoft )

I recently did a MSBuild script for a colleage to zip some files and move them to a file server and email them to two recipients.
The script should only run on a specific day (Sunday), and fail with an error if it is not that day.
Using the MSBuild Community Tasks Project from Tigris makes this a trivial exercise.

<?xml version="1.0" encoding="utf-8" ?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="Build">

  <Import Project="$(MSBuildExtensionsPath)\MSBuildCommunityTasks\MSBuild.Community.Tasks.Targets"/>

  <Target Name="Build">
    <Time>
      <Output TaskParameter="DayOfWeek" PropertyName="DayOfWeek" />
    </Time>
    <Message Text="It's Monday!" Condition=" '$(DayOfWeek)'=='Monday' "/>
    <Message Text="It's Tuesday!" Condition=" '$(DayOfWeek)'=='Tuesday' "/>
    <Error Code="1" ContinueOnError="false" Condition="'$(DayOfWeek)'=='Monday'" Text="Stop everything, it's monday!"/>
    <Message Text="Everything is ok"/>
  </Target>
</Project>
Comments [0] | | # 
# Thursday, September 11, 2008
Thursday, September 11, 2008 5:12:28 PM (Mountain Daylight Time, UTC-06:00) ( Linux )
Edit 1/21/2009
No sooner do I get my site back up and running - (4 months is a little embarrassing to move to a new webhost), do I start receiving

Thanks for the comment Jack! I had no idea you could still get an archive of this information. It would be awesome if RedHat were distributing this stuff, instead of the folks at RPMFind. I can understand having a support policy with a reasonable life-cycle which we assuredly have surpassed. We'll call this the grumblings of a hasbeen admin who wishes this could just be easy.



I'm trying to install a RAID Card into a Linux file-server so we can amp up the storage.
Unfortunately it's running an older distro of Red Hat Enterprise Linux (3) uname -r = 2.4.21-47.0.1.EL in case anyone cares.

In order to do that, I need to compile a driver. Not so difficult. The hardware manufacturer created a really nice readme.txt file that I'm pretty sure I can follow.
- For Linux kernel 2.4 -
    
     You need a full kernel source tree to build the driver. If you are building
     a driver for the currently in-use kernel, the kernel source should match
     the version of the running kernel. In addition, you must obtain the config
     file for the running kernel:
No problem - lets go grab this from a RPM (from RedHat). Think again buddy -
"This system may not be updated until it is associated with a channel."
Wow - That's kind of a nasty cryptic message. What does it mean though?
https://rhn.redhat.com/rhn/help/release-notes/hosted/rhn-release-notes-2.8.0.jsp
Now when using up2date to register a system, customers will be presented with a message stating "This system may not be updated until it is associated with a channel" rather than an error. The system will be registered with RHN but will be unable to benefit from its service.
Let me spell that out for you dear reader. The myth of open source software isn't a myth. You can give away software for free. The bug fixes, and ongoing support... that will cost you.

I think I'm going to stick with an operating system that allows you to pay up front for the patches of your system for the supported lifetime.

Comments [1] | | # 
# Friday, September 05, 2008
Friday, September 05, 2008 10:22:12 AM (Mountain Daylight Time, UTC-06:00) ( All things Microsoft )

I use C# on a daily basis to do most of my coding.

I really don't like #region directives. It's not just a love-hate thing. I really hate it. I have a compulsive need to eliminate them. It's extra fluff that really doesn't need to be in the in the code to make the code any more meaningful. It doesn't add any value to the executable bits.

Using Find/Replace always gets tedius. Why not just remove all instances of it throughout the solution in one action?

Imports System
Imports EnvDTE
Imports EnvDTE80
Imports EnvDTE90
Imports System.Diagnostics

Public Module CodeHelper

    Public Sub RemoveRegions()
        RemoveThisRegexFromSolution("\#region.+")
        RemoveThisRegexFromSolution("\#endregion")
    End Sub

    Public Sub RemoveThisRegexFromSolution(ByVal findRegex As String)

        DTE.Windows.Item(Constants.vsWindowKindFindReplace).Activate() 'Find and Replace
        DTE.Find.FindWhat = findRegex
        DTE.Find.ReplaceWith = ""
        DTE.Find.Target = vsFindTarget.vsFindTargetFiles
        DTE.Find.MatchCase = False
        DTE.Find.MatchWholeWord = False
        DTE.Find.MatchInHiddenText = True
        DTE.Find.PatternSyntax = vsFindPatternSyntax.vsFindPatternSyntaxRegExpr
        DTE.Find.SearchPath = "Entire Solution"
        DTE.Find.SearchSubfolders = True
        DTE.Find.KeepModifiedDocumentsOpen = False
        DTE.Find.FilesOfType = "*.*"
        DTE.Find.ResultsLocation = vsFindResultsLocation.vsFindResults1
        DTE.Find.Action = vsFindAction.vsFindActionReplaceAll

        DTE.Find.Execute() ' Do it

        DTE.Windows.Item(Constants.vsWindowKindFindReplace).Close() ' Close the box

    End Sub

End Module

Comments [0] | | #