Code . not working in visual studio - visual-studio

Have added C:\Program Files (x86)\Microsoft Visual Studio to the path, restarted computer, verified that path includes C:\Program Files (x86)\Microsoft Visual Studio. I still get an error on running code . as
'code' is not recognized as an internal or external command, operable
program or batch file.
System specs: Windows 10, VS 2017
Regards

code . is a command for visual studio code, if i'm right you installed Visual Studio, no visual studio code, the path should be Microsoft VS Code.
if it is Code what you installed, maybe you should check the envrioment variables.
if you have not installed VS code go Here

Related

MS-Build returning the visual studio installation path

How can the entry
<MsTestExePath>$(MSBuildProgramFiles32)Microsoft Visual Studio 14.0\Common7\IDE\mstest.exe</MsTestExePath>
in a .proj file be generalised, such that the build works for different licenses of Visual Studio 2019 as well, where mstest.exe is located at
C:\Program Files (x86)\Microsoft Visual
Studio\2019\Enterprise\Common7\IDE\MSTest.exe
in the case of an enterprise license?
The most generic solution may be to replace the variable parts of the path with msbuild macros, but which ones would that be?
According to this documentation,
The macro
$(VSInstallDir)
returns the path to the installation folder of the Visual Studio version currently used.
The following entry should therefore work for all versions of visual studio, for which mstest.exe is located in the subfolder \Common7\IDE\ under the installation directory:
<MsTestExePath>$(VSInstallDir)Common7\IDE\mstest.exe</MsTestExePath>

Issue when running an exe file in Visual Studio 2010

Whenever I try running an exe file in Visual Studio 2010 I get the error message: the program can't run because vcruntime140.dll is missing from your computer. And the same message for ucrtbased.dll. I downloaded both of the dlls, but I dont know where to place them within the system files so that this would be solved.

Visual Studio Cannot find file

When I run Visual Studio as Administrator, visual Studio cannot find some files. Everything will compile and run though. When I run normally, it can find all the files without any issues. Does anyone know why this is happening?
Here is what the properties of the exe looks like
Target = "C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe"

Can't find the Visual Studio 2012 Express for Web installation

I am pretty sure I installed VS 2012 Express on my new laptop a month ago. I even posted on Facebook about how I didn't like the default themes because the window borders were too light in color.
Now, I can't seem to find the VS 2012 Express installation. Where should I look?
I've looked for devenv.exe or any exe under C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common\IDE and in C:\Program Files\Microsoft Visual Studio 11.0\Common\IDE.
Okay, I found it. The exe name is VWDExpress.exe and it is located at C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common\IDE
If you are using the Ultimate version go to
C:\Program Files\Microsoft Visual Studio 11.0\Common7\IDE
and look for "devenv" with visualStudio Icon .
I had the same problem. I found it in
Local Disk > Program Files 86 > Common7 > IDE > WDExpress
It wasn't an .exe when I found it, it was an application that I launched.

Error Code -1073741515 When Using EDITBIN

I'm using EditBin to increase the stack size of an application I'm writing. I have this in the post-build event command line for Visual Studio:
"C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\editbin.exe" /STACK:268435456 "$(TargetPath)"
When I build my project, I get this error:
Error 470 The command ""C:\Program
Files (x86)\Microsoft Visual Studio
10.0\VC\bin\editbin.exe" /STACK:268435456 "[Target Executable]"" exited
with code -1073741515.
I have both of the following in my PATH environment variable:
C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin
The command also works when I run it manually with cmd.exe. Does anyone know what the problem is here?
I had the same issue, how I resolved it:
Ran msbuild.exe <my.sln> /t:<mytargetproject> from a VS2010 command prompt, where <my.sln> is your solution name and <mytargetproject> is the project you are trying to build. For e.g. msbuild.exe helloworld.sln /t:mainproj.
When you do this or at least when I ran this, a dialog box popped up and said "foo.dll" cannot be found, I added the path of that dll to my "PATH" environment variable and the problem was solved! See ChrisF's comment to the question, as it says, the error is that some dll/component is missing.
From the dll name it complained about, I believe this is not contained to VS2010 libs/dlls, for me it was a third-party dll (which I am using and supposed to be available during the build) it was complaining about.
The best solution is to run the vcvarsall.bat located in the root of the visual studio install folder(C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC). That sets up the search folders for all MSVC compiler related tools.
I got this to work for now by copying mspdb100.dll into the same directory as editbin.exe, but this is not an optimal solution because every developer on my team will need to do the same thing.

Resources