This post by Zulfiqar Ahmed about the ConfigurationErrorsException when using Visual Studio saved my day.
This error suddently appeared when debugging a test case in Visual Studio and I didn't realize that this had something to do with activating the breakpoint on common language runtime exceptions.
Showing posts with label Visual Studio 2008. Show all posts
Showing posts with label Visual Studio 2008. Show all posts
Wednesday, February 11, 2009
Tuesday, January 27, 2009
WCF: custom tool error when adding a service reference in Visual Studio 2008
When adding a service reference in Visual Studio 2008, I came across a weird error. The reference was created successfully, but when I tried to build the project (a c# class library project), I always get a custom tool error ("the global element ... was defined in both ... and ..."). Thus I could not compile. Everything I tried didn't work. After reloading Visual Studio I got another error (Class ... is already defined in another namespace).
I finally solved this problem by deleting the Visual Studio project, creating a new project and adding the same service reference a second time.
I don't really know, what caused this error, but maybe it has something to do with changing the namespace or the service reference name after the first creation.
I finally solved this problem by deleting the Visual Studio project, creating a new project and adding the same service reference a second time.
I don't really know, what caused this error, but maybe it has something to do with changing the namespace or the service reference name after the first creation.
Labels:
.NET,
error,
Visual Studio,
Visual Studio 2008,
WCF
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.
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.
Labels:
Installer,
Visual Studio,
Visual Studio 2008,
WiX
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
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.
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.
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?
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
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.
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
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?
///
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:
That's really awesome. Don't the guy's in the different teams at Microsoft know each other?
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:
| Reserved1 | Reserved in the Vtable for future use. (Inherited from IVsTextBuffer.) |
| Reserved2 | Reserved in the Vtable for future use. (Inherited from IVsTextBuffer.) |
| ... | ... |
| Reserved10 | Reserved 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.
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.
You can find the video here.
Wednesday, December 19, 2007
Creating custom project types with Visual Studio
Mike Hadlow gives a fairly good overview on how to build a custom project type for Visual Studio:
Code rant: Building a Visual Studio Custom Project Type
Please note, that at least in Visual Studio 2008 you'll have to create a project template to show your own project type under File -> New Project. You don't get any error if you don't do this, but your project type will not be shown.
Code rant: Building a Visual Studio Custom Project Type
Please note, that at least in Visual Studio 2008 you'll have to create a project template to show your own project type under File -> New Project. You don't get any error if you don't do this, but your project type will not be shown.
Labels:
extensibility,
Visual Studio,
Visual Studio 2008
Subscribe to:
Posts (Atom)