How to remove/uninstall item templates in Visual Studio 2010 - c#

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

Related

Visual Studio : can't find "resource file" in list of items to add to project

I'm on VS Community 2017 RC.
I'd like to add a resource file (.resx) to my project but this item type is not listed in the items
Have I missed something ? Do I need to install anything on top of my Visual Studio to be able to manage resource files ?
At the top right corner you have a searchbox, try typing it there and see if it finds anything.
If it doesn't, create a text file from the new item dialog and change the extension to
resx
It should now open the new file with the resources designer. Now open the properties pane for that file (right click it in the solution explorer) and make sure it has the following set:
Build Action: Embedded resource
Custom tool: ResXFileCodeGenerator (or PublicResXFileCodeGenerator to generate a designer class with public visibility)
NOTE:
According to the link Chris posted, my suggestion may not help if you have the express edition of visual studio.
Visual Studio Express editions do not support Resource View's. It is commonly recommended that you make your way to the Visual Studio Community editions to take full advantage of such features.
Here is the MSDN link that notes the feature not being supported.
Additionally, maybe you can try this:
Right click your project and go to properties >
Click 'Resources' > and then you may see:
"This project does not contain a default resources file. Click here to create one."
Some Visual Studio 2017 and 2019 workloads apparently don't include this feature, notably the ASP.NET workload. The solution, as detailed here, is to run the Visual Studio Installer and add the desktop development workload.
Using VS 2015 Enterprise Edition, had this problem when I downloaded from our Git repository at work. Nobody knew what happened to those ".resx" files.
I edited in Notepad++ the other (not missing ones) .resx files and found they all had the very same content. So I created new .resx files from scratch with that same content, reopened the solution and Build and Rebuild Solution worked like a charm.

Is it possible to work on a ASP.NET application on Visual Studio 2015 and VS Code? [duplicate]

How do I open I a Visual Studio Code folder in Visual Studio 2015?
If I open it as a "Web Site", it tries to treat the node_modules directory as part of the project's normal JavaScript files and hits an error when the path exceed the maximum path length.
But I can't open it as any other project type unless I first create a project of that type and then move all the VS Code files into that folder.
Should I be trying to open it as a web site?
Or should I create a new project and then copy the files + folders into it?
Is there any advantage to having it as a project?
If I do create a project, it makes it difficult to work together with someone who is just using VS Code?
And if I use a project, which project type should I select?
Finally folder view has arrived in VS 2017 :)
You can find more details in here.
Currently there is no way to open a folder directly with Visual Studio.
Why? Because Visual Studio and Visual Studio Code only shared their name, not the idea behind it. To extend Jenny O'Reilly answer:
Visual Studio Code is a folder oriented editor
This means VSC has the same Point-of-View to your Project as the File Explorer.
Visual Studio (not Code) is a solution oriented integrated development environment (short IDE)
Instead every Project in Visual Studio needs a *.sln Solution-File as Root Component. From this point Visual Studio looks at your Project. An example would, if you copy File in your Project Folder, they wouldn't be recognized from Visual Studio. You have to add them first to your sln File, to see them. It also allows the developer to combine multiple projects (*.csproj,..) into one single Solution to build.
This means the idea behind these two editors is completely different.
Visual Studio (not code) Project-types for Web
There are Node.js Tools for Visual Studio
This will provide Node.js built-in project templates
Visual Studio 2015 comes with TypeScript templates
Workaround 1
A workaround would be a Blank Solution in which you set up your Visual Studio Code Project.
Workaround 2
Another trick would be the answer to this question. You can open your Project Folder as a Website Project.
File -> Open Website -> File System and choose the folder
Update
As you mentioned, there will be errors because Visual Studio tries to build the solutions. For the next few readers of this response, the work around for this (as John Pankowicz writes in the comment) is:
Right-click Web Site in Solution Explorer -> Property Pages -> Build -> Uncheck "Build Web Site as part of solution"
Update 2
(Thanks to JC1001 for this update)
The next version of Visual Studio (Visual Studio "15") will support opening a folder. This is mentioned in the Visual Studio Blog.
Also like in Visual Studio Code, there will be a prompt command for opening Folders. Right now you can use this in the preview version:
devenv /command “file.openfolder FOLDER_PATH”
In the future you will be able to use:
devenv FOLDER_PATH
Opinion
Personally I wouldn't recommend Visual Studio (not code) for HTML/Website projects without server-side-development, because I don't see any features. Even the intellisense suggests to me sometimes bad HTML Code (it's not the IDE's fault).
After all web projects are still text files. You can easily control group projects like this with Version Control. Visual Studio Code even provides an integrated Git support.
Visual Studio Code does not create "project files" that you can open in Visual Studio 2015. Basically, when you open up a Node website in Visual Studio, you need to re-create the folder structure in VS2015 and create a "project file".
I haven't seen any better ways of doing this, but will be happy when we can open a folder just as easilly as we can with VSCode
I'm sure it's not the best way but..
Open an existing .sln with notepad, change the names, save as [name of your project].sln.
Open with Visual Studio.

How to add reference `Microsoft.TeamFoundation.TestImpact.Client.dll` in Visual Studio 2012?

I'm writing a customized activity for TFS build process workflow, e.g. guideline here.
The post requires to add reference to Microsoft.TeamFoundation.TestImpact.Client.dll at path C:\Windows\assembly\GAC_MSIL\Microsoft.TeamFoundation.TestImpact.Client\10.0.0.0__b03f5f7f11d50a3a. I cannot find this path on my machine installing Visual Studio 2012.
Where would I find this reference?
This is an old thread, but in case anyone else runs into this, just download the stand alone TFS Object Model installer.
As the other answer states, it's shipped with VS 2010 so you'll need to install that and then you should be able to find it.
For any of you trying to do this with VS 2013 / TFS 2013 you need Microsoft.TeamFoundation.TestImpact.Client version=12.0.0.0
This file is located in the folder
C:\Windows\Microsoft.NET\assembly\GAC_MSIL\Microsoft.TeamFoundation.TestImpact.Client\v4.0_12.0.0.0__b03f5f7f11d50a3a
Version 10.0 of the file is shipped with Team Explorer or Visual Studio 2010.
It is copied directly to the GAC but you can extract it using the command line COPY command.
Install VS 2010 on your machine, open a command prompt and navigate to C:\Windows\GAC_MSIL\Microsoft.TeamFoundation.TestImpact.Client\{Version}\
Then COPY Microsoft.TeamFoundation.TestImpact.Client.dll to a folder of your choice.
Finally, my advice would be that you use the version included in VS 2012, that would make things much easier. The method described above also works for Microsoft.TeamFoundation.TestImpact.Client.dll 11.0 (aka VS 2012 version).

Visual Studio 2012 project won't open in 2010

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

Visual Studio Extensibility Package 2010 and 2012. Is there a way to have one package for both?

A while ago I created a Visual Studio Package/Add-In for Visual Studio 2010 (for those curious: http://visualstudiogallery.msdn.microsoft.com/ea23f9a7-a942-45b2-87e6-5df6ff0444ff). If I try to download that and install it in Visual Studio 2012, it doesn't work, I get a version error.
So my first thought was to see what happens if I try to port it to 2012. I downloaded and installed the VS2012 RC SDK, and basically recreated the whole thing in a separate solution and it all works. What I noticed was that many of the assemblies I had to reference (Microsoft.VisualStudio.*) were now version 11 as opposed to version 10 (for obvious reasons). After copying and pasting all the code over, I got it to work correctly in Visual Studio 2012.
My question now is this: Is it possible to have one .vsix file for multiple versions of Visual Studio (I'm guessing no.) If not, what's the correct approach to take as far as uploading the different versions? Can I upload two versions of a .vsix? Will the Add-In manager in visual studio pick the correct one automatically? Do I need to create a new package e.g. "Visual Pastie 2012"? Just looking for some guidance.
Rename the VSIX package to give it a ZIP extension and open it up. You'll find a file called extension.vsixmanifest. Inside this XML file you'll find an element called SupportedProducts which should look like the following to work in VS2012.
<SupportedProducts>
<VisualStudio Version="11.0">
<Edition>Pro</Edition>
</VisualStudio>
</SupportedProducts>
HTH

Categories

Resources