开发者

WPF Application template is missing

开发者_StackOverflow中文版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:

WPF Application template is missing


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>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜