Resetting Experimental instance of Visual Studio - c#

I'm trying to develop extensions for Visual Studio and I'm going through some articles.
One key point of VS extension development is to reset experimental instance of Visual Studio, which I am having problem with.
For example, here is written that I should use following command to reset it (it is recommended also in Microsoft docs):
CreateExpInstance /Reset /VSInstance=12.0 /RootSuffix=Exp
I run command line and navigate to CreateExpInstance location and run this command (I tried with various versions: 12.0, 14.0, etc.).
However, I keep getting such response:
The Visual Studio Experimental instance directory C:\Users\Mi\AppData\Local\Microsoft\VisualStudio\10.0Exp does not exist.
CreateExpInstance: warning : The Visual Studio directory C:\Users\Mi\AppData\Local\Microsoft\VisualStudio\10.0 does not exist.
Created directory C:\Users\Mi\AppData\Local\Microsoft\VisualStudio\10.0Exp\Extensions.
Press any key to continue . . .
Moreover, executing this keeps creating new experimental instances in my %localappdata%/Microsoft/VisualStudio directory
What am I doing wrong? Why my instance isn't getting reset? Or maybe this is how it should be?

There are several shortcuts for each Visual Studio version that you can run like this:
C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Visual Studio 2017\Microsoft Visual Studio SDK\Tools\Reset the Visual Studio 2017 Experimental Instance.lnk

Visual complement to Sergey Vlasov's excellent answer:

Related

Visual Studio Command Palette does not exist

I want to use Angular in Visual Studio. I have currently Visual Studio 2017.
I need to install something by using the command palette, but there is not command palette in Visual Studio. I used ctrl+shift+p or ctrl+p combinations, and then nothing happened. I also checked the View section, and there is no integrated command line section or anything else.
Visual Studio 2022 has a feature similar to a command palette, called QuickLauncher. You can open it by pressing Ctrl+Q by default or change the keyboard settings to use Ctrl+P, which is what I did for my setup.
(Default Shortcuts in Visual Studio)
Command pallete only available for Visual Studio Code, https://code.visualstudio.com/. You have installed the wrong one. For Angular development I highly recommend Visual Studio Code, not the full fledged heavy Studio 2017. Please use the link I posted above.
There is GoTo All(Ctrl + Q) option in visual studio which has similar features like file search, other interesting features for code navigation, some command execution like pull, start, run tests etc.
It's not exactly the one found in Visual Studio Code(Different IDE), its getting pretty close with time.
For example there are many missing like 'start current page application' which can set in Tools -> Options -> Keyboard.
There is a ticket raised for Visual Studio to implement this feature long back and it seems it had been considered by Visual Studio team.
https://developercommunity.visualstudio.com/idea/460947/command-palette.html

Change the default terminal used by Visual Studio (Mac)

What I want is to use my .zsh shell instead of the default (mac) terminal when building/running my compiled C# code. Is there a way I achieve this with the newly released Visual Studio for mac?
Note: I am referring to Visual Studio, not Visual Studio Code.
Currently not possible. Microsoft just re-branded the Xamarin studio into visual studio for mac. And the default terminal was hard-coded into it. There were multiple feature request for numerous terminals (this one for example).
"Run on external console" (with default terminal) is the only option in this regard.

Is there a c# windows form Application in visual Studio 2015?

I installed Visual Studio 2015, and tried to create a windows form, just as I used to do it in the VS2010. I could not find a Windows form for C#.
How can I create one? Do I need to install another version or do I need a plugin or something?
Screenshot: http://prntscr.com/8rwzyl
Informations about my Visual Studio: http://prntscr.com/8rx0a1
It seems you are opening new project in Blend. You have to use Visual Studio (not Blend).
Blend and Visual Studio are installed together with Visual Studio Community Edition 2015 . You probably run a wrong shortcut (which starts Blend).
The Checked Answer is correct however there is no explanation of how to solve this. I just came to the same problem, but figured it out. When searching in your file directory C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE
Then you can search .exe and it will come up with Blend and devenv. Or just scroll till you find devenv. devenv is the clickable application for visual studio community. :)

MonoGame templates in Visual Studio 2015

I just installed Visual Studio 2015 and now want to start a new MonoGame project (C#, Windows DX).
I got MonoGame installed, as well as XNA.
The problem is that the templates are not showing up in the New Project dialogue.
On Visual Studio 2013, they showed up here, they are also nowhere to be found aynwhere else in the Project tree.
So I searched for the templates, they exist in the location where they should be:
C:\Users\<user>\Documents\Visual Studio 2015\Templates\ProjectTemplates\Visual C#\MonoGame
I tried running the devenv.exe /installvstemplates from the Visual Studio admin console, as well as devenv.exe /setup, for good measure.
After doing both several times, mixed with a few Visual Studio 2015 and Windows restarts, the project templates are still not showing up.
I also tried to clear the cache by deleting C:\Users\<user>\AppData\Roaming\Microsoft\VisualStudio and C:\Users\<user>\AppData\Local\Microsoft\VisualStudio\14.0, to no avail.
The MonoGame installer was customized to work with Visual Studio 2015, so I assume it should work somehow.
So, can anyone help me getting those project templates set up?
I found out why it wasn't working:
Apparently, the MonoGame installer puts the Templates in the wrong folder for Visual Studio 2015.
The correct folder for VS2015 is
C:\Users\user\Documents\Visual Studio 14\Templates\ProjectTemplates\Visual C#
The MonoGame installer installs to C:\Users\user\Documents\Visual Studio 2015\Templates\ProjectTemplates\Visual C#
So, when the folder MonoGame inside that folder gets moved to the first one, and the devenv.exe /installvstemplates command gets executed, the templates show up.
In case you work as standard user and run MonoGame setup as admin, MonoGane templates was installed only in Administrator account.
So I just make copy into my user \ProjectTemplates\Visual C#.
MonoGame Setup installation:
C:\Users\**Admin**\Documents\Visual Studio 2015\Templates\ProjectTemplates\Visual C#
Correct folder is under my user account:
C:\Users\**user**\Documents\Visual Studio 2015\Templates\ProjectTemplates\Visual C#
Then as answered above just run devenv.exe /installvstemplates from Developer Command Prompt for VS2015.

Run a .cs file - visual studio 2012

Hi im starting to learn c# just now with visual studio 2012 and windows 8, and the tutorial has given some .cs files and not explained how to run them. It is all command line stuff in this tutorial. This stack overflow answer gave the most easy-sounding way of doing it (in response to a similar question by someone else).
If you already installed Visual Studio, just: Click Start, point to
All Programs, point to Microsoft Visual Studio, point to Visual Studio
Tools, and then click Visual Studio Command Prompt and there you have
your command line box where you compile as follows:
csc PathToYourCsSource
I cannot find visual studio tools. I typed it into the search in windows 8. Thanks
It is easier to: Run Visual studio -> Make a new C# console project.
This makes a project with a simple Program.cs file. You can just copy/paste in that, and run the project my clicking F5.
"Visual Studio Tools" is the name of the folder in the All Programs list, not the name of an item you can find by searching. You can search for "Developer Command Prompt for VS2012" (or some portion of that) instead.
I'd recommend that instead, you work with your .cs file as part of a project in Visual Studio. It's easy to create and run a Console Application from the IDE.
You can also use tools like Linqpad to run snippets of code so you don't have to use the bloat of an entire Visual Studio solution/project.
1.
in visual studio directory go to Common7>Tools>Shortcuts>Developer Command Prompt for VS2013 run this ,type csc programName.csc for compiling
and programName for run
Make sure to change the directory of console to your program path
2.
In visual studio create new C# console application and write there ,for run go to menu debug>Start Debugging

Categories

Resources