Categories
Uncategorized

RightHand.DataSet.Visualizer refresh is available

I’ve updated expiration date of RightHand.DataSet.Visualizer.
Download updated version here.

Categories
Uncategorized

FinalBuilder4 action for running CodeSmith templates

The past week I was busy creating an automated template based system for generating Developer ExpressXPO source code. Heart of the system is based on CodeSmith and my custom templates (perhaps more details about the system in a later post).
Once I’ve finished all my templates for generating fine XPO code (everything is really powerful and flexible, trust me :-)) I had to find a way to automate the (re)build since there is not only one template.

One of the option was to use CodeSmithGenerator that spits out code based on input parameters in XML file that is part of your project (the same system is used by MSDataSetGenerator). The only weakness of this approach is that it requires several clicks if you have more than one template.

So I went with out of IDE build process because I like to do everything within the single action. Again, I faced three choices:

  1. Use good old command line bat file.
    This would do, but feedback is poor and it won’t do handle Visual Source Safe.
  2. Use MSBuild tool that comes with .net 2.
    CodeSmith 3.2 comes with custom MSBuild taks that takes care of running the template generator. However, MSBuild is rather limited out of the box – no UI and no VSS control.
  3. FinalBuilder4. This is great automated build tool and perfect for me in this case. The only drawback is that it doesn’t know how to run CodeSmith generator. On the other hand it does everything else.

I went with option 3. But I did have to build an action for running CodeSmith generator. Fortunately for me, build custom actions for FB4 is really simple (I did it before for XSD tool). After a hour or so of coding in VBScript (the easiest way to create a simple FinalBuilder4 action) CodeSmith action was created. The settings screen looks like this:

There are is no support for merging at this point simply because I didn’t need it. I might add it in next version.

The result is that I simply invoke FinalBuilder4 via a shortcut and it does everything for me (check out files before, runs CodeSmith generator and check in files after).

You can find CodeSmith action here.

Categories
Uncategorized

Running on Community Server 2 beta3

I just updated Community Server 1.1 to CS2 beta3 and the thing looks really good. So far there were no showstoppers, just minor glitches. And obviously, posting works as expected. Good work, Telligent.

Categories
Uncategorized

Community Server 2 beta 3 is out

Community Server 2 beta 3 is out – I certainly hope that they’ve fixed AM/PM bug which prevented you posting anything when the server was hosted on non-us regional settings. Get it here:
http://communityserver.org/forums/thread/511219.aspx


 

Categories
Uncategorized

Community Server 2.0 beta 2 upgrade rolled back for me

Since I’ve upgraded my CS blog engine to 2.0 beta2 I had problems posting – IOW I couldn’t post anymore. Thus I’ve rolled back to CS 1.1 for the time being so you can read more news from RightHand. Isn’t Virtual Server just beautiful for this kind of hacks.

Categories
Uncategorized

Upgrading Community Server to 2.0 beta 2

I’ll be upgrading my Community Server 1.1 to 2.0 beta 2 today hopefully, thus expect some problems before the upgrade is complete.

Categories
Uncategorized

WPF samples not working and how to fix them

At least some samples that come with WinFX November CTP don’t work because of breaking changes (I’ve got link via Karstern Januszewski). Take for example first page of ExpenseIt sample that you find in Demos\ExpenseIt folder of samples you unzipped. Run it and few moments later an exception sourcing from baml will be thrown saying something about VerticalGradient. If you take a look at breaking changes you’ll see that VerticalGradient is mentioned. Open App.xaml, find the following line:


<Style x:Key=TotalRectangle TargetType={x:Type Rectangle}>


There are two setters containing VerticalGradient in their values and since the constructs inside Value are strings the errors aren’t picked by compiler:


 <Setter Property=StrokeValue=VerticalGradient #4E87D4 #73B2F5>


 <Setter Property=StrokeValue=VerticalGradient #73B2F5 #4E87D4>

They should be transformed to this constructs:


<Setter Property=Stroke>


<Setter.Value>


<LinearGradientBrush StartPoint=0,0 EndPoint=0,1 >


<LinearGradientBrush.GradientStops>


<GradientStopCollection>


<GradientStop Offset=0 Color=#4E87D4 />


<GradientStop Offset=1 Color=#73B2F5 />


</GradientStopCollection>


</LinearGradientBrush.GradientStops>


</LinearGradientBrush>


</Setter.Value>


</Setter>

and


<Setter Property=Fill>


<Setter.Value>


<LinearGradientBrush StartPoint=0,0 EndPoint=0,1 >


<LinearGradientBrush.GradientStops>


<GradientStopCollection>


<GradientStop Offset=0 Color=#73B2F5 />


<GradientStop Offset=1 Color=#4E87D4 />


</GradientStopCollection>


</LinearGradientBrush.GradientStops>


</LinearGradientBrush>


</Setter.Value>


</Setter>


respectively. That’s a bit verbose, isn’t it. For some reason they removed mini language constructs – didn’t have time to check it out why. Anyway, after these two changes the first page works but not the second which yields another exception. I don’t go into this one though. Just wanted to show you how to fix the incompatibilities. I guess that not-all-samples-are-working syndrome is the consequence of CTP release (and not beta which is normally better prepared).

Categories
Uncategorized

Now, this is good code

RemObjects‘ Alef pointed me to this wonderful piece of code. Warning: whatever you do, don’t write such code. Ever.
While you are in the mood, go check the story of Champions.