Posted by Dan Rigsby on 21st May 2009
Since PDC 2008 we have been hearing about the Managed Extensibility Framework (MEF) support in Visual Studio 2010. Now that the Beta has been released, we can start to see how it is coming together. To access the MEF extensions, just open the Extension Manager from the menu bar: Tools –> Extension Manager.
It appears that we will have a host of categories for different types extensions. You can choose from “Installed Extensions” or browse the “Online Gallery”. The major categories are:
- Controls
- ASP.Net Controls
- Framework & Libraries
- Sharepoint Controls
- Silverlight Controls
- Windows Forms Controls
- WPF Controls
- Templates
- Windows Forms
- WPF
- Tools
- Build
- Coding
- Data
- Documentation
- Modeling
- Other
- Performance
- Programming & Languages
- Reporting
- Setup & Deployment
- Source Control
- Team Development
- Testing
- Web
Currently there are only 12 extensions available, and none appear to be new UI controls. Some of them are pretty interesting, but I am excited about what this could lead to. You seem to be able to extend quite a few areas of Visual Studio now!
Some of the more interesting existing extensions are:
Intellisense Presenter A new way to view your intellisense in a WPF fashion. |
|
RegEx Editor Regular expression syntax highlighting, intellisense, in place testing, and more right from your code. |
 |
Image Insertion This allows you to insert images into code files. Great for adding developer documentation, but not sure what else it would be useful for. |
 |
I haven’t been able to find the WPF xml document visualizer that they showed off at PDC 2008. Hopefully this will show up in the gallery soon along with other useful nuggets.
I wonder if this will turn into a platform for pushing out new controls to use in our applications in between releases. It was disappointing to not find any new controls in the toolbox when working with WinForms or WPF. It is also unclear about how a developer can submit new extensions that be browsed through the gallery.
Posted in Visual Studio | 1 Comment »
Posted by Dan Rigsby on 21st August 2008
In the previous version of the WcfTestClient, every call to the server would result in a new instance of the proxy being created. So, if you wanted to do any testing based on sessions, you had to use another tool. In SP1, Microsoft has updated the WcfTestClient with a check box named “Start a new proxy” which defines whether or not to create a new proxy client with that call. The default value is to reuse the same proxy instance.

Posted in Visual Studio, Wcf | 2 Comments »
Posted by Dan Rigsby on 18th August 2008
Back in the day before Visual Studio 2008 was released, there was a set of extensions you could install on Visual Studio 2005 to give you WPF, WF, and WCF templates, and other tools to work with .Net Framework 3.0. This set of extensions made it up to CTP 3 in November 2006. However, when Visual Studio 2008 came out, these extensions never got any further attention. So they never made it out of the Community Technology Preview cycle. Microsoft wants everyone to upgrade to Visual Studio 2008.
You can still get the Visual Studio 2005 extensions for .NET Framework 3.0 (Windows Workflow Foundation) from here (for now): http://www.microsoft.com/downloads/details.aspx?familyid=5D61409E-1FA3-48CF-8023-E8F38E709BA6&displaylang=en
However, the official link for Visual Studio 2005 extensions for.NET Framework 3.0 (WCF & WPF): http://www.microsoft.com/downloads/details.aspx?FamilyId=F54F5537-CC86-4BF5-AE44-F5A1E805680D&displaylang=en has been removed for many months.
So why is the link broken? There have been a few posts on the MSDN Forums asking where these extensions went. The basic answer is that, according to Microsoft, Visual Studio 2005 was never meant to be used to develop WCF, WF, and WPF. Visual Studio 2008 is the correct tool to use, and on June 30th 2008, the license for this CTP expired (see this post).
While you cant get Visual Studio 2005 extensions for.NET Framework 3.0 (WCF & WPF) from the official Microsoft site, you can still find it at these locations:
However, due to licensing concerns, these links may go down over time too. So, if you need these extensions, you will want to grab them soon. But if you are doing any development in .Net Framework 3.0, you need to move to Visual Studio 2008.
Some companies out there will have issues with this, but you can still use .Net 3.0 technologies in Visual Studio 2005. It’s just the tools that are no longer supported.

Posted in Visual Studio, Wcf | 1 Comment »
Posted by Dan Rigsby on 11th August 2008
We knew it would be released soon since SQL Server 2008 went RTM with .Net Framework 3.5 SP1. Visual Studio 2008 SP1 is now RTM and available for download off the MSDN subscriber’s web site:

They are available for general download here:
Get downloading! The servers are busy at the moment, but this is worth the wait.
Posted in .Net, Visual Studio | 1 Comment »
Posted by Dan Rigsby on 7th August 2008
When installing SQL Server 2008 RTM, it failed with the following error:
The SQL Server 2008 install installed a new version of .Net Framework 3.5 SP1, but if you have Visual Studio installed, you must upgrade to SP1 which isn’t officially released yet. This does appear to be the final version of the .Net Framework 3.5 SP1 since it is shipping with SQL Server 2008 RTM. Expect an official release within days along with Visual Studio 2008 SP1!

Posted in .Net, Visual Studio | 2 Comments »
Posted by Dan Rigsby on 9th June 2008
I have a new 4 min 47 sec training webcast out over creating code snippets in Visual Studio 2005 and 2008. The video is available through JupiterMedia and can be viewed at http://www.internet.com/video/. Just look for the "Developer Video" titled "Creating Snippets in Visual Studio". Direct link is:
http://www.internet.com/video/?bcpid=1431564240&bclid=1433966034&bctid=1589625246
Posted in Visual Studio, Webcast | 2 Comments »
Posted by Dan Rigsby on 22nd April 2008
I have a new 7 min 50 sec training webcast out over the CSS Support in Visual Studio 2008. The video is available through JupiterMedia and can be viewed at http://www.internet.com/video/. Just look for the "Developer Video" titled "CSS in Visual Studio 2008". Direct links are:
http://www.internet.com/video/?bcpid=1431564240&bclid=1433966034&bctid=1499645387
http://link.brightcove.com/services/link/bcpid1431564240/bclid1433966034/bctid1499645387
Posted in Visual Studio, Webcast | 1 Comment »
Posted by Dan Rigsby on 16th April 2008
Visual Studio 2008 added a new feature to easily embed a manifest. This is available right from the project properties page. It can be used to embed UAC data for Vista or other things.

By default each project is selected to use the embedded manifest. This doesn’t sound too harmful, right?
Well, ClickOnce and Registration-Free COM applications require an external manifest. So, if you use ClickOnce, it will try to create it own external application manifest which could cause a conflict with the embedded one. Here is the error you might get when you try to install the ClickOnce application:
ERROR SUMMARY
Below is a summary of the errors, details of these errors are listed later in the log.
* Activation of \\MyShare\MyApplication.application resulted in exception. Following failure messages were detected:
+ Reference in the manifest does not match the identity of the downloaded assembly MyApplication.exe.
This error seems a bit cryptic at first. Especially if you don’t know that Visual Studio is embedding a manifest for. Fortunately, this error is easy to get around. You simple just set this option to “Create application without a manifest”. Or manually add “<NoWin32Manifest>true</NoWin32Manifest> ” to your project file like so:
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>9.0.21022</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<OutputType>WinExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>MyApplication</RootNamespace>
<AssemblyName>MyApplication</AssemblyName>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<NoWin32Manifest>true</NoWin32Manifest>
</PropertyGroup>
Posted in ClickOnce, Visual Studio | No Comments »
Posted by Dan Rigsby on 11th April 2008
How many times have you opened up a .csproj file and wanted to edit the xml, but it opened up the actual project in Visual Studio instead? Your only real options have been:
- Open the project file in a different text editor
- Give the project file a new extensions, then open it in Visual Studio
- Use some custom visual studio extension or write your own
Microsoft released a set of PowerCommands for Visual Studio 2008 which provides this functionally. With this you can just right click on the project and select “Edit Project File”:

This will open the project file in the visual studio xml editor. This makes it so much better than an external editor because it allows for intellisense through the xsd schema (http://schemas.microsoft.com/developer/msbuild/2003)!

Notice though that while you are editing the project, it becomes unavailable in the Solution Explorer. This is a side affect, because if you are editing the file, Visual Studio can’t yet know what it is going. So, when you are done editing the file, you have to right click on the project in Solution Explorer and reload, or close the xml editor and reload the project. It would have been nice if it could have just detected when the project file was changed and then asked the user if he/she wanted to reload the project now. This would be consistent with what you see if you edit the project file in an external editor.
The PowerCommands collection contains a number of other enhancements which you can see on the project website. Some of my favorites are:
- Copy and Paste References: Allows you to copy to the clipboard a project reference or set of references and paste them into another project
- Copy and Paste Class: Allows you to copy a class to the clipboard which renames the class and to paste it into the project again.
- Open Containing Folder and Open Command Prompt: Allows you to right click on a file and open the folder or a command prompt at that location
- Remove and Sort Usings: We got this feature in VS 2008 itself, but you can now run this at the project level to affect all files at once. Now I wish I could do this with “Format Document” too.
- Close all documents context menu item: Allows you to close all open documents. Sometimes when the designer is getting “funky”, I like to close all files, rebuild, and open it again. Before I could only “Close all but this” and then close that last document. With this new command, I can close all of them at once finally!
- Transform Templates: Allows you run execute a “custom tool” with associated text template items.
I highly recommend that you download these free tools from Microsoft.
Download PowerCommands for Visual Studio 2008 here: http://code.msdn.microsoft.com/PowerCommands

Posted in Visual Studio | 1 Comment »
Posted by Dan Rigsby on 27th March 2008
This is probably one of my favorite minor additions to Visual Studio 2008, that you probably haven heard of.
In previous versions of Visual Studio, if you created strongly typed resources files, all of the properties were “internal”. If you wanted to expose these properties outside of the assembly, you ran into issues. You could use a custom tool such as ResxFileCodeGeneratorEx, but that meant that each developer had to have this tool installed and you would manually have to change the custom tool name in the properties window for the resource file:

You could also make the properties public by running resgen.exe with the /publicClass attribute, but you could not do this directly through Visual Studio. You would have to create a pre-build event to call resgen like this:
resgen.exe "myfile.rex" /publicClass /str:c#
Now, in Visual Studio 2008 there is another option which should basically make these other options obsolete. When you are working on the strongly typed resource file, there is a new drop down list at the top of the designer that allows you to change the access modifier to either “internal” or “public”. This will cause the strongly typed resource “code behind” file to generate properties with the selected access modfier.

You could also manually set the custom tool to use this new generator in the properties window like so:

All of these tools and procedures generate a code behind file (typically named something like resources.designer.cs) that contains the strongly typed resource information. This file is automatically generated by Visual Studio when the resource file itself is changed. If you were to go in and change the resource.resx file inside of a text editor, the strongly typed code file would not reflect these changes unless you ran resgen.exe afterwards, or opened the project again in Visual Studio.
Posted in Visual Studio | No Comments »