I installed Blend 4 RC recently but strangely it deleted some of my VS2010 projects templates, including the most important ones being Silverlight User Control and Silverlight Application.
Does anybody know how to get back these templates or tell VS2010 to reset all templates?
A bit frustrating, I'm having to create projects on my laptop then copy them to my desktop manually :(
No matter, I just reinstalled SL4 Tools and I've got my templates back once more.
Blend 4 RC also confused VS2010 on my machine, causing the WPF UserControl template to disappear. I don't use the SL4 Tools, so solved the problem on my machine by placing the template from Program Files\Microsoft Visual Studio 10.0\Common7\IDE\ItemTemplates\CSharp\WPF\1033 in My Documents\Visual Studio 2010\Templates\ItemTemplates\Visual C#\WPF.
A better solution is also described here.
Related
Installing WPF Controls onto a machine is a messy task.
I tested installation in various systems including VMs. Following are the issues I have seen.
Controls not installed in the VS Toolbox.
Controls are isntalled but, cannot be dragged-n-dropped onto the WPF Window
Duplicate entries in the Toolbox sometimes!
I do not know what is wrong with the ToolboxControlsInstaller package. It messes up the Toolbox all the time, well most of the times.
Any guidelines what is the best practices to install WPF controls?
Our customers are very annoyed with these Toolbox behaviors.
Any help is welcome!
Regars,
-Datte
Our customers were annoyed too.
So I wrote this tutorial article covering toolbox installation once and for all:
Visual Studio Toolbox Control Integration
The most convenient approach seems to be using the Toolbox Controls Installer (TCI) package already pre-installed in VS2010 and newer. This includes just adding a key in registry, i.e.
HKLM\SOFTWARE\Microsoft\VisualStudio\10.0\ToolboxControlsInstaller\SampleControl, Version=3.7.0.0, Culture=neutral, PublicKeyToken=3cc4c7b61201d46c
You can also specify a custom tab name.
If you don't have a custom installer for your components, wrapping the DLLs in a VSI or VSIX package may be convenient. The VSIX is more powerful, support quiet install, custom tab name and uninstallation, but only VS2010 or newer.
Be careful with registry + VS2012. I discussed how the registry should be updated for VS2012, or simply call:
devenv.exe /ResetSkipPkgs
and then
devenv.exe /Setup
To clear things up.
Sometimes one also have to clear the Toolbox cache (TBD files), which seems to be a quite evil thing!
How do you install WPF controls into toolbox? However, these are all common issues with Visual Studio toolbox if you(or someone while installing other components) have done some mistakes in configuring. Refer the below links which has suggestions to avoid these issues.
Installing controls to VS 2010 procedure : How to add my custom WPF control to the ToolBox by using the WPF ToolBox Control template
Icons messed up issue : Visual studio 2005 toolbox icons messed up (though this is not reported with VS 2010, this solution would work for VS 2010 also).
I installed Crystal Reports for VS 13.0.2000 to work with VS 2010. I will need to use CR in a WinForm app.
To my utter surprise, I have no CrystalReportViewer in my VS Toolbox pane for WinForms. The CrystalReportViewer does show up in Toolbox for web forms though.
I could obviously add the viewer to my winform without using the toolbox, but I can not seem to figure out what do I need to reference to get it. I am already referencing all the usual dll's like CrystalReports.Engine and CrystalDecisions.Shared but it does not help.
Does anybody have any idea what I am missing?
You need to ensure that you're targeting the full framework, and not any subsets, such as the client profile
I am using:
Visual Studio 2010 Professional,
Silverlight 4 Toolkit
The WPF Designer don't show (invisible) - while the Component Toolbox is showing the relevant controls, and the Windows->Windows option shows the designer to be active. It does this with ALL XAML for me, regardless of its complexity. I have already tried the /ResetSkipPkgs to no avail. I had CodeRush and DevExpress installed (demo) version but removed both since. I can get along with XAML by switching to Source Code /Text Editor, but this really boils my chops to run the app to find out that I have made a silly mistake in my XAML (while a preview would sort it out quicker, and no, please don't suggest Expression Blend for it is non-nonsensical for me to switch continuously between these applications).
When I however switch the WPF Designer to open with Encoding I get the following error - which I assume is related to the issue for not showing the XAML Editor/Designer in non-encoding:
An Unhandled Exception has occurred
Click to reload the designer
System.NullReferenceException
Object Reference not set to an instance of an object.
at MS.Internal.Providers.VSDesignerContext.VSDesignerContextHolder..ctor(IServiceProvider services, VSDesignerContext context, Object docData)
at MS.Internal.Providers.VSDesignerContext.GetContext(IServiceProvider services, IVsWindowFrame frame, Boolean createIfNotExist)
at MS.Internal.Designer.TabbedEditorPane.MS.Internal.Designer.ITabbedEditorService.get_DesignerContext()
at MS.Internal.Designer.DesignerPane.InitializeDesigner()
I have googled it silly, to no avail. I am thinking about reinstalling Visual Studio - but this REALLY is a last resort. I hate fixing things by reinstalling, rebooting etc.
Any guru with the magical answer?
I got the exact same exception today and solved it by killing a few GDI hungry apps. You can see the number of GDI objects a process is using in the Processes tab of Task manager (you will probably need to add the column using View -> Select Columns).
Hmm, I know this is old, but you should try installing SP1 for your Visual Studio if you haven't yet.
My VS2010 install has WPF Browser application project template, and WPF User Control lib template, but no WPF Application template. Any suggestions would be appreciated.
For me I was missing ProjectTypeGuids in the .csproj file (a new project worked for me so just compared the project files), so if you add this to the .csproj file under PropertyGroup I then had all the WPF types available for adding:
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
This is kind of an old question, but I just hit the same issue and found the answer after the above didn't help, so....the solution for me was that I had to select a higher framework version (4.0) before the WPF Application template I was looking for became visible. If you find that you don't have the WPF or other project templates you expect available, you may want to check that you've selected the approriate framework version from the drop-down list immediately to the right of the "Recent Templates" label in the Add New Project dialog (it's near the top-left of the dialog in question).
This issue is a lot older than Visual Studio 2010. It goes back to 2005 at least. Lucky you, I was missing the New Class template once.
According to a bunch of sources, this trick works:
If you are missing a template that comes with your installation, run devenv.exe with the /installvstemplates switch.
You'll need to exit out of all Visual Studio instances for this to work.
The trick is mentioned in the MSDN documentation:
http://msdn.microsoft.com/en-us/library/0fyc0azh.aspx
Thread on the issue in a previous version of Visual Studio: http://social.msdn.microsoft.com/forums/en-US/vssetup/thread/8a5ae9e3-be7b-493d-831c-1e49e8103f26/
I wound up uninstalling and reinstalling my Visual Studio entirely but this trick probably would have fixed my problem.
Just had this in VS2017 Community Edition. This discreet message to add missing templates helped me:
In VS 2017
Make sure that you have .Net Desktop Tools checked in you VS
https://developercommunity.visualstudio.com/content/problem/44429/missing-wpf.html
For .NET 5 (or newer) is needed to have in .csproj in xml path Project/PropertyGroup:
<UseWPF>true</UseWPF>
I finally got Silverlight 4 Toolkit installed , referenced and working after the difficulty of finding the right namespace described in this question.
But intellisense doesn't work fully: after I type "tk:", it doesn't pop up the various controls I have available, but if I type a control name out, e.g. DockPanel, then it works, as shown below. It will even give me intellisense after I type tk:DropPanel, which is odd.
How can I get intellisense to work in all cases for the Silverlight 4 Toolkit?
I can imagine I need another namespace, but this site says that this reference:
is now all you need (and will be
automatically used by both Visual
Studio and Blend)
alt text http://www.deviantsart.com/upload/q02bav.jpg
Here is a screenshot from Silverlight 3 Toolkit intellisense which has always worked well in both vs2008 and web dev express 2008:
alt text http://www.deviantsart.com/upload/196ufid.jpg
Confirmed.
This appears to be an issue with the Silverlight Toolkit assemblies, as this does work for the SDK assemblies.
Print Screen http://img162.imageshack.us/img162/9004/noitellisensetoolkit.png
If I were you I'd file a bug up on connect # Microsoft Connect
In the meanwhile, I'd recommend considering using Resharper to supply your Visual Studio intellisense as using the Ctrl+Space key combination in resharper does provide intellisense at this point.