Powershell Text Replace

Search a text file line by line, replacing text using regex’s.
<br />cat &lsquo;file.txt&rsquo; | foreach { $_ -replace &lsquo;find-text&rsquo;, &lsquo;replace-text&rsquo; }<br />

Ngen the powershell dll’s for faster startup

In the Trenches » Some PowerShell scripts…: “Ngen the dlls and try it again. I think you’ll find it faster.

cd $pshome
dir *.dll | %{ ngen.exe $_.fullname}

If ngen is not in your path, use:

Jeffrey Snover
Windows PowerShell Architect”

WIX: Skipping a dialog based on selected feature.

To skip dialogs you will need to modify the wxs files for the dialogs around your dialog. You need to add click events to the next and back buttons to handle the different paths based on the selected features.

<Publish Event=“NewDialog”
<![CDATA[&FeatureID = 3 AND !FeatureID <> 3]]>

You will also have to modify the WixUI_FeatureTree.wxs file to handle the newly created events. The default files can be copied from the WIX source.

One thing to note is the odd syntax for getting the state properities of objects.
&FeatureId is like FeatureId.ActionState
!FeatureId is like FeatureId.InstalledState

Inside the dialog…

<Control Id=“Next” Type=“PushButton”
X=“236” Y=“243” Width=“56” Height=“17”
Default=“yes” Text=“$(loc.WixUINext)”>
<Publish Event=“NewDialog”
<![CDATA[&FeatureID = 3 AND !FeatureID <> 3]]>
<Publish Event=“NewDialog”
<![CDATA[NOT (&FeatureID = 3 AND !FeatureID <> 3)]]>


Wix Tutorial

Get the compiled asp.net

Get the compiled asp.net page object for unit testing.

Brain.Save() – Hosting ASP.NET Outside of IIS

Doesn’t seem to work for 2.0. Looking for more ideas.

fValidate archived website

fValidate on web archive – Looking for fValidate info, try the archived fValidate website.

ActiveRecord dictionary mapping.

<br />[HasMany(typeof(MyObject), &ldquo;object_id&rdquo;, &ldquo;objecttable&rdquo;, RelationType = RelationType.Map,<br />Cascade = ManyRelationCascadeEnum.All, CustomAccess = Generics.Access, Lazy = true,<br />Index = &ldquo;name-of-key-column-in-objecttable&rdquo;, IndexType = &ldquo;System.String&rdquo;)]<br />public IDictionary<string, MyObject> Objects {&hellip;}<br />

Castle Project :: View topic – Dictionary and RelationType.Map, Index, IndexType

Brutalist Framework