WinFX installation problem and fix for it

by Miha Markič 26. September 2005 22:20

One day I've decided to install WinFX (along with VS 2005 beta 2) on my laptop to see how it works on hardware accelerated graphics (I take a look at WinFX before - in VMWare Workstation though). So I installed everything as requested. The first step to test it was to run XAML Pad, a utility to build UI using XAML. No go. I took a look at Fusion Log Viewer (fuslogvw) I saw that XamlPad application tried (unsuccessfully) to load totaly unrelated 3rd party assemblies built for .net 1.x (plus some of .net 1.0 system assemblies). Go figure. I haven't put much effort into solving this (who has time to play these days). I've rather posted a reply to a guy having same problem in MS newsgroup microsoft.public.windows.developer.winfx.avalon ("XamlPad.exe NullReferencException with WinFX CTP Sept." thread).

After a while, Daniel Danilin found (in another post in same thread) an (obvious) solution: remove offending 3rd party (not .net 1.x system ones) assemblies from GAC. While this solution isn't perfect (what about applications that use those assemblies?) it just works - and I have something to play with while traveling to my second MVP summit.

Tags:

.net

Linq, DLinq and XLink forums

by Miha Markič 19. September 2005 14:38

In case you didn't know, MS has put up three forums (part of their Technical Forums) to discuss Linq, DLinq and XLink.
You'll find them here.

Tags:

.net

DLinq autogenerated classes

by Miha Markič 18. September 2005 20:57

I've posted my first CodeSmith template for generating DLinq classes (DLink is part of Linq project, a future of .net). The generated code is C#. You can make suggestions or just give feedback in this forum.

Get the template here.

Enjoy.

Tags:

.net

DataSet visualizer updated

by Miha Markič 16. September 2005 21:56
I've set new expiration date for RightHand.DataSet.Visualizer to 11/7/2005 and recomplied with July CTP. New version is 0.9.1. Get it here.
Comments are welcome in the forum.

Tags:

.net

How to log DLinq's Sql commands

by Miha Markič 16. September 2005 20:56

There was a question on MS' forum about how to log the DLinq's sql commands. Well, actually DataContext's sql commands. Here is the solution, it is easy:

StringBuilder sb = new StringBuilder();   // create a StringBuilder instance to store output
TextWriter tw = new StringWriter(sb);     // create a StringWriter that will write into StringBuilder above
db.Log = tw;                              // attach it to DataContext
Console.WriteLine(sb.ToString());         // output the result

The trick is to use DataContext.Log property (db represents DataContext instance in this example) to attach a valid TextWritter derived instance. And voila - no more black box. Of course, output will be empty unless there is a sql command issued either by doing query or persistence.

Tags:

.net

Dlinq and IChangeNotifier

by Miha Markič 16. September 2005 11:15

I am doing some tests with DLinq. I have created my classes properly decorated with attributes. I have also implemented IChangeNotifier to make tracking faster (all this was created by my CodeSmith template which I will post later). However I couldn't persist a simple change which left me scratching my head for a while. Here is my pseudo code:

Load an entity
Change its property
Call DataContext.SubmitChanges

Simple, huh. Yet nothing was saved. I've checked with SqlProfiler to see if anything is going on - and no, there was no update command issued which indicated that DataContext was unaware of any change. At one point in time I've commented out IChangeNotifier implementation and the thing started working normally, as one would except. After another while I've found the problem - I was calling OnChanging() too late:

   set
   {
    if (value != id)
    {
     id = value;
     OnChanging();
    }
   }

Moving OnChanging one row up fixed the problem:

   set
   {
    if (value != id)
    {
     OnChanging();
     id = value;
    }
   }

This seems logical as OnChanging implies that is should occur before change is persisted. Another mystery solved.

Tags:

.net

The C# future

by Miha Markič 14. September 2005 09:42
While C# 2.0 isn't even released yet, there is already a lot of documentation about C# 3.0. And it brings a lot of candies based on features introduced in C# 2.0 (generics, anonymous methods, ...). Go check it out. And go wonder, there is a also a working compiler (requires Visual Studio 2005 beta 2). I guess the fact that C# 3.0 works on .net 2.0 implies that it will come out much faster as there is no need to change the .net framework. I certainly hope so.

Tags:

.net

Visual Studio 2005 Team Suite RC available for download

by Miha Markič 13. September 2005 16:32

Whoa, Visual Studio 2005 Team Suite Release Candidate is available for download at MSDN subscriber downloads. There is also a bunch of Sql Server 2005 September downloads. Apparently this is one and only RC before RTM.

Microsoft servers are under heavy load of course. I've barely managed to get to the link.
I wonder why :-)

Tags:

.net

Now, this is good code

by Miha Markič 10. September 2005 21:35

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.

Tags:

An annoying bug in Visual Studio 2005 beta2 when using Developer Express' controls

by Miha Markič 8. September 2005 15:01

A lot of people have noticed a highly annoying bug in Visual Studio 2005 when dealing with Developer Express' controls. The description of the bug goes like this:

During the build of the solution IDE starts throwing a modal dialog box with error icon: "cannot access a disposed object. Object name: 'DesignerFrame'". If you click OK the same dialog reappears and you'll never get rid of it (regardless if you click OK or not) and you won't be able to close IDE either (you have to resort to Task Manager for killing it). Regardless of the issue the solution starts running if it was built properly.

AFAIK this is the problem in Visual Studio 2005 Beta 2 and there are two workarounds to this problem:

  • upgrade to a CTP later then beta 2 (preferably july CTP since there is no public august CTP version of DevExpress controls) where error doesn't appear anymore
  • close all designer windows within IDE before doing build

Tags:

DevExpress | .net

Miha Markic

About me
Righthand
 
Microsoft MVP
 
Developer Express' DXSquad
INETA Country Leader for Slovenia
INETA Country Leader for Slovenia

Slovene Developer Users Group Lead
Friends of Red-Gate
LLBLGenPro Partner

Miha currently works as a free lance consultant and software developer specialized in .net area.
He graduated in Computer and information science at the University of Ljubljana, Slovenia. He has accumulated experience in various programming languages such as Java, Visual Basic 3-6 (MCP), Visual C++, Delphi, C# and VB.Net through years.
He has experience in practically all (technical) stages of project development, including planning, framework development, user interface, business processes, as well as testing and documenting. He has worked on big and small projects in Slovenia and abroad (e.g. participated in completing level 3 IS for the Nucor steel plant, Hertford, USA).
Currently he enjoys programming in .net environment using C#. Since 2000 he has been active in Developer Express' DX Squad and has been ECDL trainer and tester. He also gives lectures on conferences and other events in Slovenia.

Month List

Tag cloud

Most comments

Paulius Paulius
1 comments
us United States
Meh Meh
1 comments
us United States
bart dm bart dm
1 comments
nl Netherlands

RecentComments

Comment RSS