The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,860 other subscribers

Archive for the ‘.NET’ Category

Delphi XE and RAD Studio XE got RTM and are available for ordering now

Posted by jpluimers on 2010/08/31

While writing this blog entry, I’m installing my new copy of Delphi XE (formerly called Delphi 2011 by some people).

Delphi XE and RAD Studio XE got RTM today, and are now available for purchase.

Contact my colleague Gwan Tan if you want to order it from Dutch speaking countries, and Thorsten Nannen if you want to order it from German speaking countries. Read the rest of this entry »

Posted in .NET, Delphi, Delphi for PHP, Delphi XE, Development, Prism, Software Development | 9 Comments »

Delphi: Embarcadero RAD Studio Demos are on-line at sourceforge in an SVN respository

Posted by jpluimers on 2010/08/25

Be sure to watch the radstudiodemos project at sourceforge.

It contains the RAD Studio Demos from Embarcadero in this SVN repository.
Which means that the demos of the current RAD Studio version are there, and Embarcadero is filling  it with the Demos from the upcoming Delphi XE version.

In fact, quite a few Delphi XE demos have been checked in already.

John Kaster will put on the C# version of DbxUtils on-line there soon.

–jeroen

Posted in .NET, C#, Delphi, Development, Software Development | 4 Comments »

Solution for “Error Code: 0x80246002” on Microsoft Update when installing “Microsoft .NET Framework 4 for Windows Server 2003 x86 (KB982671)”

Posted by jpluimers on 2010/08/20

When you write .NET 4 software, you want to deploy it to your clients, so they need to install the .NET Framework 4.

On fully patched Windows Server 2003 x86 installations, the (optional) Windows Update for Microsoft .NET Framework 4 for Windows Server 2003 x86 (KB982671) usually results in this error:

Installation Failure

Error Code: 0x80246002

Try to install the update again, or request help from one of the following resources.

It fails during download, so it does not even reach the install phase.
Don’t loose too much time resolving this: The usual solution for 0x80246002 as described in KB958056 does not work.
The systems affected don’t have anti-virus or similar software installed, so disabling those won’t work: there is nothing to disable.

What does work is the suggestion a bit lower in the 0x80246002 update fails search results Read the rest of this entry »

Posted in .NET, Delphi, Development, Power User, Prism, Software Development | 8 Comments »

.NET: the TFS / Visual Studio mix: connecting from VS2008 to TFS2010 and CodePlex

Posted by jpluimers on 2010/08/11

Lately, CodePlex is in the progress of [WayBackmigrating from TFS2008 to TFS2010 (they [Archive.ishave done TFS05…TFS01 and TFS07; TFS06 and TFS08…TFS10 still need to be done).

When your projects have been migrated (or you are going to use TFS2010 yourself), and you use VS2008 (or VS2005 – which I have not tested yet), you need to perform some updates and configuration changes to connect to the new TFS2010 servers.

So this post is about connecting from VS2008 to TFS2010 on CodePlex.
The tips will also work when connecting to a regular TFS2010 server: the connection URL is slightly different. Read the rest of this entry »

Posted in .NET, CodePlex, Development, Software Development, Source Code Management, TFS (Team Foundation System) | Leave a Comment »

Quick Access Extension (Visual Studio equivalent of RAD Studio IDE Insight)

Posted by jpluimers on 2010/08/10

It is good to see the cross breeding effect works:

Last week, the Visual Studio 2010 Productivity Power Tools added Quick Access Extension, which is the Visual Studio equivalent of the Delphi RAD Studio IDE Insight.

It is a keyboard shortcut (Delphi: F6 or Ctrl-.; Visual Studio: Ctrl+3) to search and execute things defined by the environment:

  • menu options
  • configuration options
  • templates

Delphi has a few options that Visual Studio hasn’t and vice versa, but it comes really close.

–jeroen

Posted in .NET, Delphi, Development, Keyboards and Keyboard Shortcuts, Power User, Software Development, Visual Studio and tools | 2 Comments »

CodePlex: choosing a license

Posted by jpluimers on 2010/07/29

One of the toughest parts on  creating a new [Archive.isCodePlex project is choosing a license.

As Jeff Attwood wrote a couple of years ago, choosing a license – any license – is important, because if you don’t, you declare an implicit copyright without explaining how others could use your code.
In addition to that, Jeff published a list of licenses with a one-line phrase describing them, so it becomes easier to start making a choice.

Last year, ShreevastaR extended that list in his answer to this StackOverflow.com question on CodePlex licensing.
Brian Campbell did the same a few months later on  another StackOverflow question about CodePlex licensing.
There are many more StackOverflow.com threads like those 2, and they give similar results.

The reason I want to put up a CodePlex project, is to put my sample code for conferences, blog articles and course examples on-line so they are easier to share with other people.
Most is from Visual Studio or Delphi projects using languages C#, VB.NET and Delphi.
Some of it are batch-files, XSD, XSLT, or other small snippets to get stuff working. Read the rest of this entry »

Posted in .NET, Access, CodePlex, Database Development, Delphi, Development, Firebird, InterBase, Software Development, SQL Server | 4 Comments »

.NET/C#: a generic exception class

Posted by jpluimers on 2010/07/28

I want my exceptions to be bound to my business classes.
So you need your own exception class, and are expected to override the 4 constructors of the Exception class.

But I got a bit tired of writing code like this again and again:

using System;
using System.Runtime.Serialization;

namespace bo.Sandbox
{
    public class MyException : Exception
    {
        public MyException()
            : base()
        {
        }

        public MyException(string message)
            : base(message)
        {
        }

        public MyException(string message, MyException inner)
            : base(message, inner)
        {
        }

        public MyException(SerializationInfo info, StreamingContext context)
            : base(info, context)
        {
        }
    }
}

Searching for Generic Exception Class did not reveal any generic exception classes.
So I wrote this instead: Read the rest of this entry »

Posted in .NET, C#, C# 2.0, Development, Software Development | Leave a Comment »

Visual Studio 2005/2008/2010: ContextSwitchDeadlock was detected Message (via Keith Barrows)

Posted by jpluimers on 2010/07/27

Like Keith Barrows, each time I see a message like below, I’m reminded that I forgot to change my Visual Studio 2005/2008/2010 to disable these kinds of MDA messages:

ContextSwitchDeadlock was detected
Message: The CLR has been unable to transition from COM context 0x1a7728 to COM context 0x1a75b8 for 60 seconds. The thread that owns the destination context/apartment is most likely either doing a non pumping wait or processing a very long running operation without pumping Windows messages. This situation generally has a negative performance impact and may even lead to the application becoming non responsive or memory usage accumulating continually over time. To avoid this problem, all single threaded apartment (STA) threads should use pumping wait primitives (such as CoWaitForMultipleHandles) and routinely pump messages during long running operations.

Steps to get rid of these messages:

  1. Start Visual Studio :-)
  2. In the menu, select “Debug”; “Exceptions…” (Ctrl-D, E)
  3. Open the “Managed Debugging Assistants” tree
  4. Uncheck the first checkbox in the “ContextSwitchDeadlock” row

Maybe I won’t forget this next time :>

–jeroen

Via: Keith Barrows : ContextSwitchDeadlock was detected Message.

Posted in .NET, Development, Software Development, Visual Studio and tools | 1 Comment »

Visual Studio 2005/2008 WPF bug: App.xaml not found messages

Posted by jpluimers on 2010/06/17

When you do some maintenance on old projects, you sometimes bump into things you have completely forgotten about.

This time it is in Visual Studio 2005, with a WPF app, and messages about App.xml.

Since there are few threads covering this problem, so I’m not sure how many people bump into this.
I know that the problem does not limit itself to C#;  I have seen people in VB.NET and Delphi.net bump into this as well.
This problem is not limited to Visual Studio 2005, some people also have it in Visual Studio 2010.
Some people also have it with other objects than App.xaml (like Windows1.xaml, etc).

If you get this error, the solution is simple:

  1. perform a “Clean Solution”,
  2. then run your app again.

This trick has worked for me every time I bumped into it. Read the rest of this entry »

Posted in .NET, C#, Delphi, Development, Prism, Software Development, Visual Studio and tools, WPF | 2 Comments »

Long pathname support: Watch for MAX_PATH (was: Windows pathname max length problem « Dropbox Forums)

Posted by jpluimers on 2010/06/16

When you want to support long pathnames on Windows, you need to watch for the MAX_PATH limitation.
Some tools, like RoboCopy (developed in C++), Beyond Compare (developed in Delphi) and others get it right.
Getting it right does not depend in your development environment: it is all about calling the right API’s with the right parameters.

Let me take a tool – in this case DropBox, though other tools suffer from the same problem – and investigate how they should do it.

Even though DropBox is cross platform, the Windows version of DropBox limits itself to synchronizing files having less than 260 characters in their path.
This is a big drawback: it is so 20th century having a limitation like this. Read the rest of this entry »

Posted in .NET, Delphi, Development, Encoding, Opinions, Software Development, Unicode | 6 Comments »