The next version of IzPack was released today. It's the first one developed within the codehaus infrastructure.
For a feature overview click here.
Dienstag, 27. Mai 2008
Dienstag, 4. März 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?
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?
Labels:
extensibility,
MPF,
SDK,
Visual Studio 2008,
VSX
Mittwoch, 30. Januar 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.
I added my assembly to the GAC and built it with a strong name. I finally found a solution to this problem. My
Labels:
IWizard,
Templates,
Visual Studio 2008,
VsTemplate,
Wizards
Abonnieren
Posts (Atom)

