WPF Application template is missing - wpf

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>

Related

Devexpress report designer version conflicts

I'm trying to add a DevExpress Report Desginer Wizard to my WPF project but I keep getting an error about versions. I've posted a screenshot to simplify things
This project already contains references to DevExpress controls of a different version.
The current version is 15.2.4.
Incorrect reference: DevExpress.Data.v14.1 14.1.8
I've updated the project files per the DevExpress Upgrade notes but this hasn't changed anything.
You can try to execute "upgrade tool" from the visual studio menu
DevExpress -> Upgrade tool,
run this tool on the current solution/project, close the wpf window designer, rebuild solution/project, open your wpf window again in the designer, check that the toolbox contains WPF ReportDesigner v15.2 control and add it to the wpf window.
I resolved the error by removing all references to DevExpress components with a different version than the 15.2 that it was trying to use.
I had to clean and build my solution after doing this because they obstinately kept coming back and causing trouble so if you're here looking for a solution, be aware of that.

Why is a project created in VS2012 not editable in Blend4 + SketchFlow

I created a project/solution in VS 2012. I open the same solution in Blend but it doesn't allow me to edit it in the designer - I only can edit the XAML directly.
I'm lost. What's going on?
EDIT: I read somewhere that Blend requires "Any CPU" - I verified that this is set.
EDIT2: It works with .NET4.0. Does this mean that .NET4.5 is not supported?
Yes. It needs the blend for vs2012 preview in order to edit it, however .xaml and .xaml.cs files don't really have any difference between .net4 and .net45, so there isn't anything to stop you creating a solution in vs2010 and including the same files, so that you can use blend to edit it.

Issues with WPF controls and Visual Studio Toolbox

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).

Unable to drag and drop telerik components on windows forms

I am trying to drag and drop Telerik RadGridView on my windows form. But instead of showing on the form(in designer view), it shows the control just below the designer i.e. the area where some of the controls like DataSet, Binding Source, FileDialog controls are shown when added to the form from the toolbox.
The same problem happens for any rad control like RadButton, RadLabel etc. I can work on the control by using the controls added to the form, but the problem is that in case of some controls like RadGridView, the smart tag is not available that makes a lot of things easier.
I think I am missing something, so that I am unable to drag-drop the controls. Can any one help me out?
Can also be caused by a version mismatch. I had the latest version installed but code base referenced previous version (specifically 2011 Q2).
An uninstall of latest and install of 20011.Q2 fixed it for me.
This is caused by missing design time assembly in your GAC. Uninstall the all telerik controls from your computer, reinstall them and then update your project references. This should solve the problem.
More info at this link.
you must ReInstall your telerik product then open your project and reload your toolbox.
this sometime happen like you update your visual studio or you install a new package of telerik.

Reset VS2010 Project Templates?

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.

Resources