MSTest.exe Access is denied - visual-studio-2010

I tried running tests via command line, but somehow I couldn't get it to work. Every time I tried to run a test I got an error 'Access is denied'. I also tried running MSTest.exe on its own and still I was getting the same error. I changed the permissions on the .exe to 'Run as administrator', set 'Full Control' to all users as well as changed the 'Compatibility mode' of the .exe to Windows XP but still no luck.
As can be seen above, to be sure that the error was coming from the .exe I tried the following command: C:\WINDOWS\system32>"C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\MSTest.exe" /help and yet again I got the same error - 'Access is denied'.
Running on Windows 8.1, Visual Studio 2010 Ultimate.
I don't know if anyone has ever had a similar issue but I've searched all over Google and I've had no luck whatsoever.

I got the same problem but with vstest.console.exe.
I found two versions in my PC.
This one has 0KB.
C:\Program Files\Microsoft Visual Studio\2022\Professional\Common7\IDE\CommonExtensions\Microsoft\TestWindow
This one has 181KB.
C:\Program Files\Microsoft Visual Studio\2022\Professional\Common7\IDE\CommonExtensions\Microsoft\TestWindow\VsTest

Related

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 2017 hangs at "initializing templates..."

This is a brand new installation of VS2017 (latest version at the time of writing - 15.1 (26403.0)) on a fresh installation of Windows (Windows 10 Enterprise 64-bit) with no extensions or addons included yet. When going to File New Project VS simply sits at 'initializing templates...'. I've waited for twenty minutes before having to force quit the application.
I have tried the command line argument for devenv /installvstemplates which does not help.
Any help is appreciated, let me know if you need any additional info.
Update
I continued troubleshooting the issue. I ran VS as administrator with logging and noticed that these are the final logged entries when attempting to load templates:
Found templates with duplicate template ids at "C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\ProjectTemplates\CSharp\Windows\1033\ClassLibrary_WorkerRole.vstemplate" and "C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\ProjectTemplates\CSharp\Windows\1033\ClassLibrary\csClassLibrary.vstemplate"
Found templates with duplicate template ids at "C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\ProjectTemplates\CSharp\1033\SharedProject\SharedProject.vstemplate" and "C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\ProjectTemplates\CSharp\Windows\1033\SharedProject\SharedProject.vstemplate"
Found templates with duplicate template ids at "C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\ProjectTemplates\VisualBasic\Windows\1033\ClassLibrary_WorkerRole.vstemplate" and "C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\ProjectTemplates\VisualBasic\Windows\1033\ClassLibrary\classlibrary.vstemplate"
Error! Unable to access file (%USER%\AppData\Roaming\Microsoft\VisualStudio\15.0_ea1722b9\ProjectTemplatesCache\cache.bin)
Even though this was a fresh install on a clean system I did attempt an uninstall and reinstall of VS2017 which did not work. I even selected less options in an attempt to mitigate the duplicate template ID warnings.
I ended up having to uninstall VS 2017 again. Uninstall Windows 10 SDK (of which I had two versions for some reason). Run VS 2017 installer as administrator.
This time it installed and completed with warnings, the warning was that it did not install the .Net Core SDK because it says I already have a version, though I don't see it. It's possible I'll have to deal with this later as there may be a hung registry key.
Still, I loaded up VS 2017 and the templates initialized immediately. So this problem is resolved.

Can't update Visual Studio 2017 RC

I'm trying to update Visual Studio 2017 RC from 15.0.25909.2 to 15.0.25914.0 and when I hit Update button it throws following error
Path to vsix file 'update' is invalid or you don't have required access permissions. Please check the path is valid and you have required access permissions.
Usage: VSIXInstaller.exe [/quiet] ...
...
I ran it as Administrator unfortunately same issue occurs.
Recorded Screen-cast is here
Thanks to #panagiotis-kanavos I did be able to solve the issue. For those who may hit the same wall, here is the steps I followed.
You need to locate Visual Studio Installer which is not in Start Menu!. You may find it at C:\Program Files (x86)\Microsoft Visual Studio\Installer\vs_installer.exe
Once you run it, click on Update button.
It will probably give you errors like this
[232c:0020][2016-12-09T09:31:36] VSIX installer does not exist at 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\VSIXInstaller.exe'.
[232c:0020][2016-12-09T09:31:36] Package '...' failed to uninstall. Return code: 2
Check the path and make sure VSIXInstaller.exe is there
Once again, click on Update button.
this time, it will throw a different error and if you open the log file that upgrade process provides, it should have full command details which is/are failing
🚨 WARNING 🚨 following code was in "my" log file and I placed it here "only for demonstration purpose", do not use it directly, check your log file to get correct failing errors
"C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\VSIXInstaller.exe" /q /s /admin /appidinstallpath:"C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\devenv.exe" /logFile:"C:\Users\ciler\AppData\Local\Temp\dd_setup_20161209094800_001_GitHub.VisualStudio.log" /skuName:Enterprise /skuVersion:15.0.25928.0 /appidname:displayName /uninstall:c3d3dc68-c977-411f-b3e8-03b0dccf7dfc
Run that command in your Command Prompt and make sure you change the /logfile: filename in order to eliminate overwriting the existing one.

After installed Visual Studio 2010 Professional I am getting an error

I have installed VS 2010 Ultimate on Windows 7 Enterprise. It is not working. So I uninstalled that and re-install VS 2010 Professional.
But I am getting an error whenever I open Visual Studio 2010.
Error:
The 'Visual Studio Tools for Applications v3.0 Shell Integration Package' package did not load correctly.
The Problem may have been caused by a configuration change or by the installation of another extension. You can get more information by running the application together with the log parameter on the command line, and then examining the file
'C:\users\Name\AppData\Roaming\Microsoft\VisualStudio\10.0\ActivityLog.xml'.
How to fix this issue? Please help me.
I ran Procmon from Sysinternals on devenv.exe with a filter set to capture file system events only, and only not equal 'success' results.
This brought up some results pointing at a directory where devenv.exe attempted to load Microsoft.VisualStudio.Tools.Applications.Package.dll from. None of those directories contained that file.
Searched for that file and found it under C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\PrivateAssemblies\Microsoft.VisualStudio.Tools.Applications.Package.dll That location was not among the directories captured by Procmon.
Copied the file to the first location indicated by the error captured by Procmon and voila, problem solved.

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