Please click this logo to help me get on their beta program:

Xobni outlook add-in for your inbox








26/9/2007

WPF targets in Windows Forms project

Filed under: General — Oliver Sturm @ 6:26 pm - 10 months, 2 weeks ago

I might be the last person to find this out, I don’t know - in that case, regard it as a note to self.

I was working with a Windows Forms project, using an ElementHost to embed a WPF control. I was trying to create a WPF UserControl and it just wasn’t working, because Visual Studio didn’t seem to build the control correctly. For instance, the InitializeComponent method call in the constructor of the UserControl resulted in an error message. I looked around for a while and was a bit confused about possible sources of the problem. Then I compared two project files and found out that the targets for WPF are simply not there when the project wasn’t originally created to target WPF - kind of obvious once you know it, but then what isn’t…

I edited the project file of the Windows Forms project to include this line:

<Import Project="$(MSBuildBinPath)\Microsoft.WinFX.targets" />

And voilá, suddenly everything builds just fine. Duh.

22/9/2007

VBUG Conference 2007 drawing closer

Filed under: General, Programming, .NET, Developer Express — Oliver Sturm @ 4:49 pm - 10 months, 2 weeks ago

October 17th and 18th this year, the VBUG conference 2007 takes place at Microsoft Campus in Thames Valley Park in Reading. Here’s the official info PDF about the conference. I’ll be speaking there about LINQ as well as WPF, and if you’re interested in Developer Express technology, this is the place to be because I’ll have a booth there and I’ll be ready to demonstrate all the products and answer all your questions. Looking forward to meeting you there!

C# track chair for Basta! Spring 2008

Filed under: General, Programming, .NET — Oliver Sturm @ 4:38 pm - 10 months, 2 weeks ago

Another new thing to mention: for Basta! conference Spring Edition 2008, I’m a member of the advisory board as well as the track chair for C#. Should be very interesting, not least because C# will play a very important role in that conference in February. A call for papers is already out - please feel free to contact me if you haven’t received it but you think you should have or it would otherwise be interesting for you.

C# Corner column in dot.net magazin

Filed under: General, Programming, .NET — Oliver Sturm @ 4:34 pm - 10 months, 2 weeks ago

If you’re in Germany, here’s (hopefully) interesting news: starting from issue 11, my column “C# Corner” will be a regular feature in dot.net magazin. I’m looking forward to writing articles for that, on new and interesting things going on around the C# language, as well as best practices and whatever else comes to mind, really :-) .

Lots of fun at Basta! - slides and samples downloads

Filed under: General, Programming, .NET, Developer Express — Oliver Sturm @ 4:20 pm - 10 months, 2 weeks ago

I just got back yesterday from the Basta! conference in Germany. It was a great event, very busy for me but also lots of fun. My sessions all went very well and I had a great time talking to people at the Developer Express booth. Thanks to everybody who stopped by the booth or came to one of my sessions!

Here’s all the content from my sessions (if you attended Basta!, you should also receive a CD shortly with all the session slides and samples):

Power Workshop: .NET 3 - The Game Challenge (314896 bytes)

VB Day - Tipps und Tricks zum DataGridView (544838 bytes)

Dynamische Sprachen mit .NET (298443 bytes)

Bluffers’ Guide to C# 3.0 (318172 bytes)

10 coole Sachen, die man mit C# 3.0 machen kann (344387 bytes)

DDD 6 calls for speakers

Filed under: General, Programming, .NET — Oliver Sturm @ 4:08 pm - 10 months, 2 weeks ago

I might be late to the party, but I’ll still try to help spread the word: DDD 6 takes place on November 24th this year, and the call for speakers has just been opened. If you’ve always wanted to find good event to do your own session at, this might be it - go here to submit your session proposal!

14/9/2007

On my way to Basta!

Filed under: General — Oliver Sturm @ 10:33 am - 10 months, 4 weeks ago

I’m now at Edinburgh airport, on my way to the Basta! conference in Germany. Yeah, I know it starts only Monday, but I’m staying with a friend for two days first.

Turns out Basta! is going to be extremely busy for me… I already knew I was going to be the Developer Express representative there, and that I was going to do four sessions, and that I’d attend the Basta Innovation Award ceremony as a member of the award jury, but now it turns out that I’m also doing a workshop on Monday morning because Marcel can’t make it, and I’m jurying the Prog-around-the-Clock competition as well.

The workshop is going to be based on my .NET 3 - The Game Challenge talk. I’ve done this three times so far, where the first and the last occasion were very good, the other one so-so, partly due to a rather unexpected degree of attendee interaction <g>. In any case the session seems ideal for a workshop: it’s always been rather longer than a standard speaking slot allowed it to be, and of course there’s just so much more to say about both main topics (WPF and WCF).

If you’re in Germany for Basta!, make sure to stop by and say hello, I’m looking forward to meeting you in person!

6/9/2007

Visualizing (.NET 3.5) Expressions

Filed under: General, Programming, .NET — Oliver Sturm @ 10:45 am - 11 months ago

It’s a problem, when you work with Expression types in any way, to understand the structure of complex expressions and possibly recreate them. After all, there are 46 entries in the ExpressionType enum, many of them corresponding to their own Expression-derived type, all of those with their own specific properties… in other words, it’s not entirely intuitive.

To help visualization of Expressions, I have created the ExpressionDumper, which outputs any expression (by default) in a nice hierarchical way on the console. It shouldn’t be too hard to use the class with other output targets, and I’m placing it under GNU LGPL license for others to use (that allows commercial use, in case you’re not quite on top of all the various open source licenses <g>). I’d appreciate being kept up to date with any further development you may do on it, but you don’t have to tell me if you don’t want to.

With this source code

Expression<Predicate<Product>> expression = p => p.UnitPrice > 10;
ExpressionDumper.Output(expression);

the ExpressionDumper is going to produce this output (of course this is a very simple example, chosen for brevity):

LambdaExpression (
  Parameters:
    ParameterExpression (p)
  Body:
    BinaryExpression:GreaterThan (
      Method: Boolean op_GreaterThan(System.Decimal, System.Decimal)
      Left:
        MemberExpression Product.UnitPrice (
          Expression:
            ParameterExpression (p)
        )
      Right:
        ConstantExpression (10)
    )
)

Without further ado, here’s the download: ExpressionDumper.zip (5159 bytes) 

Have fun!

1/9/2007

Installing AUCTeX in EmacsW32

Filed under: General — Oliver Sturm @ 10:51 am - 11 months, 1 week ago

I’m posting this mainly to remind myself how I did it, when the time comes to do it again. I added some detailed instructions (like where to cd to and so on) in case somebody else is interested in these instructions. So let’s see:

  • I downloaded AUCTeX 11.84 from http://www.gnu.org/software/auctex/download-for-windows.html
  • I also downloaded and installed MSYS, but in the end I didn’t use it because my existing cygwin environment did the job nicely
  • I already had EmacsW32 (version GNU Emacs 22.0.990.1 (i386-mingw-nt6.0.6000) of 2007-05-23 on LENNART-69DE564 (patched))installed, as well as MiKTeX 2.7 beta (freshly downloaded on August 31 2007) and Ghostscript (8.53). I think these are all the relevant packages.
  • I unpacked the AUCTeX zip file in c:\temp\auctex-11.84
  • I ran the cygwin bash shell (I did this as administrator, although that would probably not have been necessary until the installation step) and cd’d to c:/temp/auctex-11.84
  • I made sure that the paths to the Emacs binary, the MiKTeX binaries and the Ghostscript binaries were part of my Windows PATH environment variable.
  • I ran the following configure command: ./configure --prefix='c:/Program Files/Emacs' --with-texmf-dir='c:/ProgramData/MiKTeX/2.7' --with-lispdir='c:/Program Files/Emacs/site-lisp'
    The first two parameters are taken from the installation readme - well, to some degree. I’m not really clear why the prefix is apparently correct this way, because on Windows this prefix does not lead to the “standard” Emacs directory hierarchy. The texmf dir is specific to MiXTeX, and if you’re using a version of MiXTeX older than (I think) 2.5, you’d probably have to use something like c:/localtexmf instead. Finally, I had to use the lispdir option because configure wouldn’t find the site-lisp directory without it - even though it’s right there in the prefix directory. Go figure.
  • I did not use the –disable-preview option, which I should probably have done. According to the docs, the preview package doesn’t currently work with this version of Emacs, and sure enough, it doesn’t seem to work although I didn’t have any trouble building and installing it.
  • I executed make
  • I executed make install (this is the step that actually requires administrator privileges, so you might be fine running everything up to this point as a non-privileged user)
  • Finally I edited the file site-start.el in my site-lisp directory and added these lines (collected from various places in the docs):
    (load "auctex.el" nil t t)
    (load "preview-latex.el" nil t t)
    (require 'tex-mik)
    (eval-after-load 'info
           '(add-to-list 'Info-directory-list "c:/Program Files/Emacs/share/info"))
    (setq TeX-auto-save t)
    (setq TeX-parse-self t)

And that’s it. So far I’m not having any trouble with this installation. Have fun!

Powered by WordPress
© Copyright 2005-2008 Oliver Sturm