Monday, August 11, 2008

How to remove a WebPart from SharePoint page with errors

I just ran into the problem that I added a WebPart to my SharePoint page that causes an error. With this error I'm not able to remove the WebPart from the page because I cannot access the administration page.

I found some working hints in Coskun Cavusoglu's blog.

So just add ?contents=1 to your url and you'll be redirected to the managing mode of the page. Another way would be to call /_layouts/spcontnt.aspx?&url=[relative url to the page with errors].

Wednesday, July 16, 2008

Solved WiX v3 - votive problems

I now solved my wix v3 votive problems with newer builds of wix. The problem was that from a specific wix build on, the standard configuration was changed from any cpu to x86 and any cpu was not longer supported. I used my old .wixproj without change in newer version without discovering any problems.

When I changed to 3.0.4220.0, the TFS source control was not working any longer for the wix project itself but also causes the automatic checkout of items in other project types to not work.

After changing all any cpu references to x86 in my .wixproject everything worked fine.

It's really weird that this caused the TFS source control to not work correctly anymore.

Btw this is reproducable, so it's not just a hazard that it works now.

Monday, June 30, 2008

Visual Studio Developer Clinic

If you ever get the chance to go to the Visual Studio Developer Clinic at Microsoft in Redmond use it! It's a fantastic event. You'll get to know a lot of people working on all the stuff, we're complaining about ;-) And they know that it's painful to work with it and they know really great hacks.

Thursday, June 26, 2008

IzPack now supports InstallerRequirements

The current trunk version of IzPack now supports the so called installer requirements. This means that it's now possible to define requirements for being able to start the installation. E.g. if a certain user has to start the installer, this will be checked by using a UserCondition with an installer requirement. If the condition is not fulfilled, a message will be shown and the installer exits.

WiX v3 - votive problems

The newest weekly build of WiX v3 3.0.4220.0 causes some problems in Visual Studio 2008 if you're using the votive integration.
In my installation, votive reproducable causes problems with sourcecontrol integration. I'm using the TFS Client. After installing votive, automatic checkout while editing is not working anymore in any project. In the votive project itself, almost every button for TFS is disabled.

Hope the next version of WiX is better, as WiX is a fantastic installer generator for the windows world.

Wednesday, June 4, 2008

Article Flexible installations with IzPack in Java Magazin 07.08

I published an article about flexible installations with IzPack 3.11 in the current issue (07.08) of Java Magazin. Full quellcode for a sample project is included.

Tuesday, May 27, 2008

IzPack 4.0 released

The next version of IzPack was released today. It's the first one developed within the codehaus infrastructure.
For a feature overview click here.

Tuesday, March 4, 2008

Visual Studio 2008 SDK Goodies #3

Here's another goodie from the Visual Studio 2008 SDK. In
ProjectNode.CopyPaste.cs in the namespace Microsoft.VisualStudio.Package you'll find the following code snippet:

StringBuilder selectionContent = null;

// If there is a selection package the data
if (selectedNodes.Count > 1)
{
foreach (HierarchyNode node in selectedNodes)
{
selectionContent = node.PrepareSelectedNodesForClipBoard();
if (selectionContent != null)
{
sb.Append(selectionContent);
}
}
}
else if (selectedNodes.Count == 1)
{
HierarchyNode selectedNode = selectedNodes[0];
selectionContent = selectedNode.PrepareSelectedNodesForClipBoard();
if (selectionContent != null)
{
sb.Append(selectionContent);
}
}


Why do we need this if - else if construct? Does the foreach for a list with zero or one element not work?

Wednesday, January 30, 2008

How to add a Wizard to a Visual Studio 2008 Project Template

Following the description in How to: Use Wizards with Project Templates I always got this "Error: this template attempted to load an untrusted component" error.

I added my assembly to the GAC and built it with a strong name. I finally found a solution to this problem. My -tag was missing processorArchitecture=msil part.

CustomWizard, Version=1.0.0.0, Culture=Neutral, PublicKeyToken=74329847392 didn't work, but
CustomWizard, Version=1.0.0.0, Culture=Neutral, PublicKeyToken=74329847392,processorArchitecture=MSIL did just fine.

Thursday, January 17, 2008

Visual Studio 2008 SDK Goodies #2

In ProjectOptions.cs in the Managed Package Framework of Visual Studio 2008 SDK you'll find funny field definitions, e.g.:

/// must be an int if not null
public object CodePage;


Why don't they just define it as an int and define some value or exception indicating, that CodePage is not set?

Wednesday, January 16, 2008

Visual Studio 2008 SDK Goodies #1

When working with the Visual Studio 2008 SDK I found several remarkable places in the documentation and also in the source code of the MPF (Managed Package Framework). I'll post them in this blog the next days.

Today's Goodie can be found in several differnt Interfaces which have to be implemented for integrating into Visual Studio. You'll find a whole bunch of interfaces with reserved1() to reserved10() and unused1() to unused10() methods.

E.g. in IVsTextLines:





Reserved1Reserved in the Vtable for future use. (Inherited from IVsTextBuffer.)
Reserved2Reserved in the Vtable for future use. (Inherited from IVsTextBuffer.)
......
Reserved10Reserved in the Vtable for future use. (Inherited from IVsTextBuffer.)



That's really awesome. Don't the guy's in the different teams at Microsoft know each other?

Thursday, January 3, 2008

How to identify menus and commands in Visual Studio 2008

From Visual Studio 2005 SP1 on, there's an undocumented registry switch to enable debug messages which show the guid and id of a selected menu or command. To enable this hidden switch, you'll have to add a dword registry entry under [HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\9.0\General] which is called EnableVSIPLogging. It should have a value of 0x00000001 (hexadecimal 1).

After restarting Visual Studio 2008, you can now identify menus and commands by pressing STRG+SHIFT and clicking on the menu or command.

For instructions on enabling this for Visual Studio 2005, see this article.

Wednesday, January 2, 2008

VSCT file format in Visual Studio 2008 SDK

Hilton Giesenow has made a fantastic How to video about the new vsct-file format which Microsoft is using in Visual Studio 2008 SDK. In contrast to other how to videos, just showing how to use the VsPackage wizard, Hilton shows every step manually. So you'll get a fare good understanding on each part.

You can find the video here.