I have just installed VS 2013 SDK to my computer which runs Windows 7 beside VisualStudio 2013 ultimate.
So I have all Extensibility project templates listed on "Add Project" dialogue box. But there is no Extensibility node hence corresponding Item Template on "Add Item" dialogue box.
I have reinstalled SDK as well as installing Update 5 on Visual Studio but it didn't work.
By the way my project's target framework is 4.5
Do you have any idea what the catch is ?
Visual studio appears to use the <ProjectTypeGuids> list in the *proj file to determine what to show in the add item dialog.
I had the same problem in VS 2017 with a project that was updated from 2013 to 2015 and now to 2017. In the first property group element, see if your project type guids matches this...
<ProjectTypeGuids>{82b43b9b-a64c-4715-b499-d71e9ca2bd60};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
... my project was totally absent this element. You may or may not also need to add <MinimumVisualStudioVersion>15.0</MinimumVisualStudioVersion> and possibly others. If the problem continues, try creating a new VSIX project and comparing the two proj files for any other substantive differences.
Related
I am not able to find Project Template to build Xamarin Forms apps in my recently installed Visual Studio 2017 Professional IDE. What templates I can see in "Cross-Platform" section is as shown below.
Can anyone tell me why I am not able to get the required template?
From Visual Studio 2017 onwards you need to specify what kinds of development you want to do in the installer. To add Xamarin, simply run the installer again, choose the 'Modify' option on the start screen, and then check the box for 'Mobile Development with .NET' (you'll see the Xamarin logo next to it).
That will add support for Xamarin projects to your installation.
I have been using VS 2015 and like the Class Diagram item.
I recently upgraded to 2017 and can't seem to find the Class Diagram item.
Anyone know how I get to it?
Using VS2017 Enterprise:
Go to the Quick Launch Bar (top right) Ctrl + Q
Type "Class Designer" and an install link will pop up
Click install, restart, and your off to the races... Enjoy!
Noticed this in the beta and thought I had a bad install. The UI elements to add new Class Diagrams were missing and I was unable to open existing *.cd Class Diagram files in my solutions. Just upgraded to 2017 and found the problem remains. After some investigation it seems the Class Designer component is no longer installed by default.
Re-running the VS Installer and adding the Class Designer component restores both my ability to open and edit Class Diagrams as well as the UI elements needed to create new ones
You need to install “Visual Studio extension development” workload and “Class Designer” optional component from the Visual Studio 2017 Installer to get the feature.
See: Visual Studio Community 2017 component directory
But this kind of item is not available on all project types. Just try for yourself:
In a Console App (.NET Framework) is available;
In a Console App (.NET Core) is not available.
I couldn't find more info on future availability also for .NET Core projects.
Woo-hoo! It works with some hack!
According to this comment you need to:
Manually edit Microsoft.CSharp.DesignTime.targets located in C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\VisualStudio\Managed (for VS Community edition, modify path for other editions), append ClassDesigner value to ProjectCapability (right pane):
Restart VS.
Manually create text file, say MyClasses.cd with following content:
<?xml version="1.0" encoding="utf-8"?>
<ClassDiagram MajorVersion="1" MinorVersion="1">
<Font Name="Segoe UI" Size="9" />
</ClassDiagram>
Bingo. Now you may open this file in VS. You will see error message "Object reference not set to an instance of object" once after VS starts, but diagram works.
Checked on VS 2017 Community Edition, v15.3.0 with .NETCore 2.0 app/project:
GitHub issue expected to fix in v15.5
the following procedure worked for me:
Close VS.
Run Visual Studio Installer.
Click on the 'Modify' button under 'Visual Studio Professional 2017'
In the new window, scroll down and select 'Visual Studio Extension Development' under 'Other Toolsets'.
Then on the right, if not selected yet, click on 'Class Designer'
Click on 'Modify' to confirm
VS 2017 Professional edition-
Go to Quick launch type "Class..." select Class designer and install it.
Once installed go to Add New Items search "Class Diagram" and you are ready to go.
In addition to #ericgol's answer:
In the French version of Visual Studio Community 2017, type "Concepteur de classes" in the search bar.
Open Visual Studio Installer from the Windows Start menu, or by
selecting Tools > Get Tools and Features from the menu bar in Visual
Studio.
Visual Studio Installer opens.
Select the Individual components tab, and then scroll down to the
Code tools category.
Select Class Designer and then select Modify.
The Class Designer component starts installing.
For more details, visit this link:
How to: Add class diagrams to projects
I am using VS 2017 Enterprise, you can find an option to install the class diagram extension using he Quick Launch in VS.
A further note on Dmitry's 2017 answer. I opened up
C:\Program Files (x86)\Microsoft Visual
Studio\2017\Community\MSBuild\Microsoft\VisualStudio\Managed\
Microsoft.CSharp.DesignTime.targets
and went to the <ProjectCapability> element. I already had this:
<ProjectCapability Include="
CSharp;
Managed;
ClassDesigner**;**" />
with ClassDesigner already there, and yet I was still unable to drag items to my hack-made Diagram.cd using the XML editing method Dmitry mentioned (
Manually create text file, say MyClasses.cd with following content:
<?xml version="1.0" encoding="utf-8"?> <ClassDiagram MajorVersion="1"
> MinorVersion="1">
> <Font Name="Segoe UI" Size="9" /> </ClassDiagram>
). But when I took off the semicolon off 'ClassDesigner' in that element then reopened Visual Studio, voila, I was able to drag classes from my Solution Explorer to my Diagram.cd window.
So in conclusion, this element in Microsoft.CSharp.DesignTime.targets worked:
<ProjectCapability Include="
CSharp;
Managed;
ClassDesigner" />
I am using VS 2019, version 16.1.5.
When I create a Xamarin.Forms application using Visual Studio Community 2015 Community on Windows 8.1 it shows me this error on load:
A problem was encountered creating the sub project 'App1.WinPhone'. This project requires a Visual Studio update to load. Right-click on the project and choose 'Download Update'
I've installed all updates available and trying on a newly installed Windows.
Note: I had this error in Forms.
How can I fix this error?
Note: There isn't a Download Update option in Solution Explorer.
Navigate to where you saved the project files that you created in Visual Studio. Default location is C:\Users\PSDan\Documents\Visual Studio 2015\Projects.
Open the project folder that you are experiencing problems with and navigate to C:\Users\PSDan\Documents\Visual Studio 2015\Projects\test\test\test.Windows folder. Inside this folder is a file called test.Windows.csproj.
Right click on that file and open with... using Visual Studio, by doing this it should detect the missing package and in my case automatically prompted to install the missing package.
I've been seeing similar errors for .Window or .WindowPhone and what I've observed is that it is due to missing SDK. Same might be the case with you.
Do you see App1.Droid appearing in the solution? (I guess NO)
Go to file explorer and locate App1.Droid.csproj (..\App1\App1.Droid\App1.Droid.csproj) and open this in a new instance. There it will pop up "Install Missing Feature" dialog and you can follow the steps to install missing components.
If your issue is the same as here:
Project required a Visual Studio update
then you may try and see if this solution works:
[Cause is] a mismatch of the target framework version and profile in the .csproj file. Despite the target framework being correct in the project Properties, they were not being correctly saved for whatever reason. Thus, when trying to install a utility library from nuGet, it left my project in the state you described.
The solution was to go by this site:
Framework Profiles in .NET
and find the correct combination, then manually edit the .csproj file to adjust <TargetFrameworkProfile> and <TargetFrameworkVersion>.
Installing Visual Studio Update 3 with selected features "Windows 8.1 and Windows Phone 8.0/8.1" and "Cross Platform Mobile Development" solved the problem for me.
Uninstall Xamarin completely, and reinstall it. That happened to me as well. I would uninstall Visual studio too. Install that first, then install Xamarin.
Edit: I know this sucks to do, but it was what the Xamarin team had me do to resolve it. As far as I know this is the official fix as of last week.
I've created a game for an assignment in Visual Studio 2012 and the university I'm at uses 2010 and it won't open! It mentions something about NET Framework 4.5. How can I convert my project so it will open in 2010?
It takes three step:
Step 1
Open solution file (.sln) in a text editor and change
Microsoft Visual Studio Solution File, Format Version 12.00
to
Microsoft Visual Studio Solution File, Format Version 11.00
Step 2
Open application configuration file (App.config) in a text editor and change
sku=".NETFramework,Version=v4.5"
to
sku=".NETFramework,Version=v4.0"
Step 3
Open project file (for C# language .csproj) in a text editor and change
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
to
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
Now enjoy your project in VS 2010 !
You may only need to open the project in Visual Studio 2012, and go to the project's properties page.
On the Application tab, locate the Target Framework setting, and change it to .Net Framework 4.
After that, you should be able to open it in Visual Studio 2010.
Also see Converting VS2012 Solution to VS2010, but so far I haven't had to do any conversions on VS2012-created projects to open them ins VS2010 - but YMMV.
[EDIT]
I just tested this again (to be sure) by creating a .Net 4.5 project in VS2012, and verified that I couldn't open it in VS2010. Then I opened it in VS2012 again and changed the framework version to .Net 4.0. After that I could open it in VS2010.
Note that I didn't have to make any other changes. However, this is on a computer with VS2010 and VS2012 installed, so it's possible that installing VS2012 might do something with VS2010 to make it work...
I have done this at work
Open .sln file with notepad
Change the two lines below
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2012
To
Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
and hey presto the solution now opens in VS2010
You can create a new project in Visual Studio 2010 and then right click in the solution explorer > Add > Existing item. To pull through all of files in your 2012 project.
Either create a new solution in VS2010 and add all existing files from your VS2012 or compare the .sln file to a .sln file freshly created with VS2010. At the top you'll see some version information that should be changed. Also compare the .csproj files and change any version information accordingly and the target framework.
Missing library or framework could also cause this problem. For example, if you want to open a MVC4 or Silver Light project but you don't have these libraries installed at your PC.
Open .sln file and Change Format Version to 12.0 to 11.0
I have an item template that I did wrong and want to delete. I deleted the zip file from the output location and ran devenv /installvstemplates and devenv /setup and when I opened VS and tried to add a new item it was still there. stranger still, I can still use it and create copies of the file, so it must exist somewhere. Is there somewhere that visual studio stores the files after being installed that I need to delete? I also cant change the template, it stays the same no matter what I do.
Edit: If it makes a difference I am using XNA GS 4.0
There are several places the Visual Studio might store a template. Deleting the .zip file from any of the locations below should remove it from the list:
%LocalAppData%\Microsoft\VisualStudio\10.0\Extensions
%LocalAppData%\Microsoft\VisualStudio\10.0\ -> ProjectTemplatesCache_{xx}
%UserProfile%\My Documents\Visual Studio 2010\Templates
If the Template was installed via an extension, you can clear it out from the top directory above, or you can follow the official instructions:
Tools -> Extension Manager -> Installed Extensions -> Templates -> YourTemplate -> [Uninstall|Disable]
I finally found out what was happening. For some reason, when VS 2010 installed the templates it copied the zip file to my old 2008 folder. I can't imagine why it would do this but I've put it out there for anyone with the same problem.
Because the duplicate question is really about Visual Studio 2008 (although it contains answers for 2010), I decided to also post the answer for Visual Studio 2010 (found in a comment).
You can find custom templates at the following location:
C:\Users[user]\Documents\Visual Studio 2010\Templates\ItemTemplates
Delete the zip files and they should be removed from Visual Studio.
For those who use VS 2019 or VS 2022, you could also try this:
dotnet new --uninstall <PATH|NUGET_ID>
It works for me in VS 2019 and VS 2020 to uninstall Avalonia templates. Maybe it will work for older VS versions, but I haven't tried.
Description
The dotnet new --uninstall command uninstalls a template package at the PATH or NUGET_ID provided. When the <PATH|NUGET_ID> value isn't specified, all currently installed template packages and their associated templates are displayed. When specifying NUGET_ID, don't include the version number.
Examples
Uninstall the Avalonia templates
dotnet new --uninstall Avalonia.Templates
From MicrosoftDocs