WPF application template not available in Visual Studio 2010 - wpf

I have just installed Visual Studio 2010.
when I attempt to create a new project in c#, there is no option for a WPF application. There is for Visual Basic.
The WPFApplicaton.zip flie does exist in C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\ProjectTemplates\CSharp\Windows\1033
What could be wrong here?

My first suggestion would be to run the installer again - it should come up with "repair" and "change" (or something like that) options along with "uninstall".
"Repair" will reset what you already have installed.
"Change" (or "Update" - I don't have VS2010 installed on this machine to check the actual wording) should let you run through the install again adding and removing components. Step through this double checking that you've installed all the templates and options.
If that doesn't work then you could try an uninstall and re-install/

You need to specify the targeting .NET framework.
Select File menu from VS2008 or VS2010; Select .NET framework 3.5 or 4.0; Select Visual C#. you will find WPF Application template listed

Related

How to open a WPF project with Blend in Visual Studio 2012?

I'm using Visual Studio 2012 Professional Edition and have a WPF project.
I'd like to open my WPF project with Blend but the option doesn't exist in my visual studio.
Should I install Blend separately? How can I make the option visible and enable it?
Look at this video: http://www.microsoft.com/en-us/showcase/details.aspx?uuid=ab9788fc-cd18-474a-942c-61754e9e428b
there is an "Open for Blend" option when right clicking on the project.
You can initiate a new instance of blend 2012 and open the corresponding project in that.. This is very basic.. is it not working?
I have had this same exact problem with using VS2013 Ultimate SP2.
It would appear that this only actually works when it's a Silverlight project, but once you open up Blend for Visual Studio you're able to go to File -> Open Project/Solution... and select the project you want to design with Blend.
As far as I am aware this is the only way to open Blend without looking through the VS 2012/2013 program folders. I have tried it several times with WPF (even right-clicking on specific XAML files) with no success.
This may have been fixed, so I will be updating VS2013 to the latest version (SP3) and update this answer with my findings.

Properties does not exist: System.Windows.Interactivity?

I have C#/WPF that has a persistent problem loading/resolving the System.Windows.Interactivity
I am using Visual Studio 2010 as my editor and already installed Blend 4 + Blend 4 SDK,
......
xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity">
Why still return result Assembly was not found? Like my class library CustomBehaviorLibrary was missing?
If it worked at runtime but not design-time then I am blaming VS 2010 for being buggy. I've had VS 2010 not recognize the local namespace when imported into XAML, but when opened in VS 2012 it worked in the designer with no problems. Unfortunately, Visual Studio 2010's XAML/WPF support is far from perfect. Expression Blend or Visual Studio 2012 are better.
I did like ViktorLaCroix 's suggestion. I would try
xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
Instead of importing it using clr-namespace and see if that helps you. That's how I am using it and it works fine. I'll also show you my reference details for the library.
System.Windows.Interactivity
C:\Program Files (x86)\Microsoft SDKs\Expression\Blend\.NETFramework\v4.0\Libraries\System.Windows.Interactivity.dll
v4.0.30319
The easiest way might be to get it from NuGet:
To install System.Windows.Interactivity v4.0 for WPF, run the following command in the Package Manager Console
PM> Install-Package System.Windows.Interactivity.WPF
http://www.nuget.org/packages/System.Windows.Interactivity.WPF/

No WPF/Silverlight in VS2012?

I have installed VS2012 on a windows 8 machine and surprisingly doesn't show any WPF or Silverlight option when I create a project.
Am I missing something here?! In fact, it is not the way it used to be in VS2010. I only can see it as template under Visual C# which again it is under Online.
Why is that?
You need to install "Visual Studio Express for Windows Desktop"....it's a different edition which has restored the WPF capability.
http://www.microsoft.com/visualstudio/eng/products/visual-studio-express-for-windows-desktop
http://blogs.msdn.com/b/visualstudio/archive/2012/09/12/visual-studio-express-2012-for-windows-desktop-is-here.aspx
To help decide if it's got all the capabilities you need:
Limitations of Visual Studio 2012 Express Desktop

Visual Studio 2008 WPF Project error "project type is not supported"

I'm running Windows 7 x64 with Visual Studio 2008 (SP1). Yesterday I came across an issue when creating WPF projects. I don't know if I've created any other WPF projects since I installed Win7.
First of all, in the Create Project dialog, the project type says "csWPFApplication" which is weird enough and I never noticed before. When I try creating the project I get 2 Package Load Failure errors for Microsoft.VisualStudio.Internal.WPFFlavor.WPFPackage and then a message that "The project file ... cannot be opened. The project type is not supported by this installation.
I tried a number of different suggestions from Google and even uninstalled/reinstalled to no avail. Any ideas?
Try starting Visual Studio with.
C:\Program Files\Microsoft Visual
Studio 9.0\Common7\IDE\devenv.exe
/resetskippkgs
I would also try to just create a blank solution/WPF project. and then add the files from your old project one at a time, and see if you still get the error.
If that doesn't work, I would try to uninstall and reinstall .NET 3.5 which looks it could be corrupt.

Visual Studio 2008 Xaml Editor not working / disappeared

When I start up VS 2008 to work on a WPF / Silverlight App and open a XAML or XML file the XAML / XML editor is no longer working. The designer does not show up and intellisense is unavailable. It basically looks like a text file has been opened.
Try running the following command.
"%ProgramFiles%\Microsoft Visual Studio 9.0\Common7\ide\devenv" /resetSkipPkgs
If that doesn't work try repairing the Visual Studio Install
Start -> Control Panel
Add Remove Programs
Select VS
Choose repair
The designer for XAML is awful. Do yourself a favour and set your XAML files to open in the code viewer instead; they'll load quicker and you won't have to deal with the designer's flakiness.
However, to fix the intellisense, just re-register TextMgrP.dll using regsvr32 as indicated here.
I've seen this problem before, running this command should fix it :
Devenv.exe /ResetSkipPkgs
If you right click the file, select "Open With", and then choose "Windows Presentation Foundation Designer", does that work? If so, most likely the default editor for .xaml files has changed. You can reset this back to the designer by pressing "Set as Default" when the designer you want is selected in the list in the Open With dialog.
It looks like there is an XML package that was previously not loaded, see other question here;
Visual Studio 2008 XML Editor Disappeared
Also, there is an answer on the Silverlight forums that describes using the "devenv /setup" command that can be found in (VS2008InstallationDirectory)\IDE.
AHHHHHHHHHHHHHHH!!!!!! It finally worked!!!!! Only after a week of pulling my hair out. I had multiple issues.
Xaml editor and add DataSource Wizard and other things would not work with VS 2008.
Tried to install SP1. It would not let me because Office Suite 2007 was in the middle of an SP1 update and would not finish.
Un-installed Microsoft office and reinstalled and service packed.
Tried devenv /setp & devenv /resetskippkgs to no avail.
Finally service packed VS2008.
Retried the devenv /setp & devenv /resetskippkgs twice and voila!! It worked.
Thanks a bunch.
i had similar problems when i installed VS2008 Professional over an existing VS2008 Express edition. Suddenly my XAML designer stopped working . i got failed loading the XAML dll error.
So i just uninstalled all VS Express stuff and then installed VS 2008 SP1 fixed all things.
try link below for VS 2008 SP1.
http://www.microsoft.com/downloads/details.aspx?FamilyId=27673C47-B3B5-4C67-BD99-84E525B5CE61&displaylang=en

Resources