How to enable mighty moose (continuoustests) in visual studio 2013? - unit-testing

The question pretty much tells it all.
Continoustests comes as a windows installer (http://continuoustests.com/download.html), so the trick described here doesn't work.

I tried the following:
Install Mighty Moose
copy the C:\Program Files (x86)\ContinuousTests\AutoTest.VS.2012.Addin to C:\Program Files (x86)\ContinuousTests\AutoTest.VS.2013.Addin
Edit the 2013 file and update the version numbers from 11.0 to 12.0
Alternatively: drop the following file: AutoTest.VS.2013.Addin in your MightyMoose installation folder.
In Visual Studio open the Tools - Options - Environment - Add-in Security page and add C:\Program Files (x86)\ContinuousTests to the list of trusted add-in paths.
Restart Visual Studio
This seems to do the trick for me. Not sure if there are any issues with this, as I haven't played around with it too much. I had Visual Studio 2010, 2012 and 2013 installed side-by-side, so I didn't have to trick the installer into believing that there is a suitable version of Visual Studio anywhere.
Then
Follow the steps in the next answer below :)

#jessehouwing's answer is on the mark! But, there's one problem left unresolved: the code coverage margin of Mighty Moose still won't appear. So, in addition to following #jessehouwing's suggestion above, you must also do the following in order for the code coverage margin and the various test call graph overlays to work.
Go to the Visual Studio 2013 installation folder. By default, this is %ProgramFilesx86%\Microsoft Visual Studio 12.0.
Within that folder, navigate to \Common7\IDE\Extensions.
Create a new folder called Continuous Tests (yes, it does have a space in its name).
Choose one of two paths below:
If you have a previous version of Visual Studio installed:
Navigate to %ProgramFilesx86\Microsoft Visual Studio x.0\Common7\IDE\Extensions\Continuous Tests, where x.0 is the previous version of Visual Studio, e.g. 2008 - 2012.
Copy the extension.vsixmanifest file from the current directory to the directory created in step 3 above.
If you don't have a previous version of Visual Studio installed:
Go to the installation directory for Mighty Moose, by default %ProgramFilesx86%\ContinuousTests, and copy the extension.vsixmanifest file to the directory created in step 3 above.
Start notepad as an administrator.
Open the copied extension.vsixmanifest file.
Add the text indicate below into the extension.vsixmanifest file after the included text shown (you don't need to add the comment), and save the file:
<SupportedProducts>
<VisualStudio Version="11.0">
<Edition>Ultimate</Edition>
<Edition>Premium</Edition>
<Edition>Pro</Edition>
</VisualStudio>
<!-- ADD THE TEXT BELOW TO ENABLE VISUAL STUDIO 2013 SUPPORT -->
<VisualStudio Version="12.0">
<Edition>Ultimate</Edition>
<Edition>Premium</Edition>
<Edition>Pro</Edition>
</VisualStudio>
</SupportedProducts>
If you copied the extension.vsixmanifest file from the Extensions directory of a previous version of Visual Studio, you are finished. Otherwise, continue on to step 9.
Find the following text within the extension.vsixmanifest file:
<Content>
<MefComponent>|%CurrentProject%|</MefComponent>
</Content>
Change |%CurrentProject%| to the following:
%Mighty_Moose_Install_Path%\AutoTest.VS.RiskClassifier.dll
where %Mighty_Moose_Install_Path%, by default, is %ProgramFilesx86%\ContinuousTests. (Use the actual path, not the expansion macro!)
Save the file.
If you have Visual Studio 2013 open, restart Visual Studio for the changes to take effect. If you want to verify that the extension is installed, go to Tools|Extension and Updates... and search for Mighty Moose in the list of extensions.
Hope that helps save someone a few hours worth of time trying to figure this out.

If you are installing on a fresh machine with no previous versions of visual studio installed there are a few extra steps to get it working. Here are the full steps:
Follow the answer from #jessehouwing
Put msbuild in the 2012 location by copying the file Microsoft.Build.Tasks.v12.0.dll from C:\Program Files (x86)\MSBuild\12.0\Bin to C:\Windows\Microsoft.NET\Framework\v4.0.30319
Follow the answer from #fourpastmidnight
Reboot
Install another visual studio extension of your choice from "Extensions and Updates" inside visual studio 2013 (I tested with Code Maid but I suspect any extension will provide the required kick)
Restart Visual Studio. Mighty Moose wakes up and the code coverage icons appear.
It is now safe to uninstall the extension you added in step 5 if you don't want it.

Related

Can't install extension + version selector shows empty list

Edit: After wait too long, I have resorted to do a clean install of Windows 7.
It solves everything.
I believe the cause is : some Windows files, or some service are disabled, by me or virus.
Now, I can no longer test any solution so I accept the existing useful one.
Original Question
My Visual Studio 2017 can run & compile C++ code, but :-
(main problem) can't install any Extension (double click .vsix yield nothing)
double click .sln will popup "Choose Application" that shows no choice. (but "Open with..." works OK)
This issue happens only to my computer in workplace.
It had worked OK before I cleaned up my system.
I tried :-
install, uninstall and repair Visual Studio 2017 several times.
https://github.com/Microsoft/VisualStudioUninstaller
%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\resources\app\layout\InstallCleanup.exe -full then reinstall (can remove "(2)", but not other symptom)
update to the latest version 15.9.17
(Thank comment from Jeaninez - MSFT) Make sure my .sln start with this at the first line:-
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
I believe the issue is related to Microsoft Visual Studio Version Selector.
This symptom might come after I uninstall VS2019.
My system might be broken?
Perhaps, the cause may be somethings very deep in OS. I am considering reinstall Windows 7.
Reference:
Why I think it is Version-Selector-related : Can't install the extension on Visual Studio 2017 after installing Visual Studio 2019
Similar question (2014) : How do I add versions to “Visual Studio Version Selector”, my list is empty (repair not help)
Visual Studio Version Selector Doesn't open (2010)
Best link about (2) : https://developercommunity.visualstudio.com/content/problem/251934/vs2017-community-edition-shows-2-in-title-name.html
To install extensions, try to find VSIXInstaller.exe on your disk. Normally it is installed here:
c:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VSIXInstaller.exe

VCVARSALL.BAT for Visual studio 2017

What is the location of file:
VCVARSALL.BAT
for Visual studio 2017?
To summarize, sth along the lines of
"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" x64
or
"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\Tools\vsdevcmd" -arch=x64
(try running it with -help)
My environment:
** Visual Studio 2017 Developer Command Prompt v15.0.26403.7
on Win10 x64
Hans Passant is right.
I had the same problem: no VCVARSALL.BAT for my VS2017 and no Build folder in Microsoft Visual Studio\2017\Community\VC\Auxiliary.
I have Visual Studio Community 2015 and 2017 installed on the same machine.
I didn't have Desktop development with C++ check in my installation. I installed it and the Build folder was created!
Now everything work great.
VS2017 has reworked its directory structure and filenames. You should look for the file 'vcvars.bat', which can be located in "..\Program Files (x86)\Microsoft Visual Studio\2017\EDITION\Common7\Tools\vsdevcmd\ext\vcvars.bat" (replace EDITION with the version of Visual Studio you use).
For simplicity, you can use "%VSAPPIDDIR%" in your call to point to the IDE folder where devenv.exe is located, and go back one folder to define your path to the batch file. For example:
call "%VSAPPIDDIR%..\Tools\vsdevcmd\ext\vcvars.bat"
The VC folder is within the Desktop development with C++ workload. Go to your add or remove programs and modify your Visual Studio 2017, and choose it as shown below:
click on Modify (or Install/Setup in other devices). Go check your folder *\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build* and you'll see the the vcvars64.bat.
I had the same problem - was fixed by removing and reinstalling latest version of microsoft office (2017-2019) resolved the issue. The folder should exist in your MS path automatically, if its not there, uninstall and redownload and install - on my system takes around 3 hours.

Visual Studio 2015 Missing Universal templates

I've been having this problem for about a month, and I am completely stuck.
Under the "New Project" window I don't see the windows 10 universal templates, but have the sdk and tools installed.
All pictures are in this folder on dropbox.
New Project Window: Capture.png (on dropbox)
What I tried:
.net 3.5 enable/disable under "programs and features"/"Turn Windows features on or off"
full uninstall/reinstall with VisualStudioUninstaller
full uninstall/reinstall with Revo Uninstaller
iso intaller
running "C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE>devenv /installvstemplates" command with admin privileges
repairing with original installer
modifying with original installer
The strange thing is that in the installer (when modifying) the Universal Windows App Development checkbox is checked. (Capture1.png ... Capture5.png)
I have, however, found out that the folders at "C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\ProjectTemplates\VC\Windows Root\Windows UAP\1033" is completely empty... Isn't that supposed to be the template folder for the projects? (Capture6.png)
I would be grateful if you could give me some advice fixing this issue.
Okay, so for anyone having this problem:
Check if the "Windows Installer" service is running under Task Manager/Services.
If not right click and select Start service.
After that run the installer for Visual Studio and select repair.
After the repairing finishes, (reboot if you want, it wasn't required for me) all the templates are installed.
(And yes, if you still have this problem, write to microsoft, they are helpful in these kinds of questions)

Fresh installation of VS 2012 will not build default console application: Missing SDKDDKVer.h (and stdio.h / CRT)

I have been using the trial version of VS 2012 Professional for about 1 month on my Windows 7 64-bit machine.
Today, I noticed that the Platform Toolset option (project properties) was set for Visual Studio 2010 (v100), which seemed odd, because I am running VS 2012. Changing the "Platform Toolset" to VS 2012 resulted in the error noted in the title of this question:
Cannot open include file: 'SDKDDKVer.h': No such file or directory
... while building stdafx.cpp (the error itself occurs in the file targetver.h).
A forum discussion I was browsing earlier hinted that the presence of VS 2010 during a VS 2012 install might have caused the problem. (I do not have links to those posts currently on hand.)
Because I have recently purchased VS 2012 Professional, I uninstalled the trial version of VS 2012, and then reinstalled a paid version VS 2012 (Professional) from a fresh download from the MSDN website. All told, the uninstall/reinstall required 2 hours or so.
During the reinstallation of VS 2012, I paid very close attention to all possible options, to see if any option might conceivably have caused the VS 2012 installer to "skip" the VS 2012 header files or other VS 2012 components, and use VS 2010 components instead. I could find no such option.
Reinstallation of VS 2012 was successful.
I created a new console project in a new workspace (note that my "recent projects list" still showed my recent VS 2012 projects, despite the uninstall/reinstall). The project settings for the new console project showed that the correct toolset was being used - Platform Toolset = Visual Studio 2012 (v110).
Unfortunately, building the out-of-the-box VS 2012 console application (including the precompiled header option, but no other option in the Create Project Wizard), results in exactly the same error:
Cannot open include file: 'SDKDDKVer.h': No such file or directory
What should I do?
.
ADDENDUM: Note for future readers; after changing path settings (see comments beneath answer, below) so that VS 2012 finds SDKDDKVer.h, it nonetheless fails to find stdio.h, a more serious problem because the VC11 version of stdio.h (as well as all the VC11 CRT headers) is not available on the machine anywhere.
Unfortunately, Microsoft has still not resolved these major bugs in their VS 2012 installation process. The only way I found to get a working VS 2012 installation including all VC11 CRT files is to:
Wipe your system completely clean of all MS products (this may be overkill, but I had to at least uninstall VS 2010 in addition to uninstalling VS 2012)
Remove the registry keys noted in the comments to the answer below (to be safe)
Delete residual directories (to be safe)
Restart (to be safe)
Install VS 2012 from scratch FROM THE .ISO, not the installer (assuming the installation files are downloaded from the MSDN site) (use a program like Power2Go to mount the .iso)
THEN, be absolutely sure to install VS 2012 Service Pack 1 (through "Windows Update" control panel) (without doing this step, the VC11 CRT headers are STILL not installed anywhere on the machine)
And finally, map the Windows SDK library directories as described in [this link](Link now points to a scam site, removed) (without doing this latter step, the linker fails to finde the path to the Windows kernel library)
... THEN there is a working installation of VS 2012.
Thanks alot, Microsoft.
After I set up Visual Studio 2013, I had same sdk error for a simple C++ code. I solve same problem with below steps:
Select Project Properties>Configuration>VC++ Directories>Include Directories and add that: c:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Include
Select Project Properties>Configuration>VC++ Directories>Library Directories and add that: c:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Lib
After that configuration I had problem about rc.exe link error. For this problem one more thing is needed:
copy RC.exe and RcDll.dll files from C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Bin and past them to C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin
After all those configuration steps, you can build a simple "Hello World!" example and run if you are lucky.
from MSDN forum:
Looking at the Include Directories for this project, I see the following
$(WindowsSdkDir)include
"WindowsSdkDir" is defined to be "C:\Program Files (x86)\Windows Kits\8.0\"
Unfortunately, the folder
"C:\Program Files (x86)\Windows Kits\8.0\Include\" doesn't actually
have any header files in it. Instead it contains three sub-folders.
One of these is the folder called "shared" which happens to contain
the "SDKDDKVer.h" file shown in the error message.
If this is your situation, replace $(WindowsSdkDir)include by the three folder names (at least $(WindowsSdkDir)include\shared) in your include path in your project properties under VC++ Directories.
To add this path permanently to VS2012, you'll need to make changes to the Microsoft.Cpp.Win32.user.props file under the C:\Users\xxx\AppData\Local\Microsoft\MSBuild\v4.0 folder (where xxx is your user name).
I had this problem with VS2013. Turns out when I separately installed Windows SDK 8.1 first, then Visual Studio 2013, it fixed the problem.
I should also note that I was installing this on a Windows 7 w SP 1 VM and at no point during the installation did it have a connection to the internet (I have read elsewhere some folks think an internet connection during install will fix the problem, but I was personally unable to verify that, and now that I have it working I'm not going to backtrack and test it).

Can't get visual studio C++ include file 'excpt.h' to get installed

I'm trying to compile a visual studio C++ project and I can't get anywhere because of the compiler reporting "Cannot open include file: 'excpt.h': No such file or directory". The problem has been reported numerous times on the Internet but I can't find any help regarding my particular situation. The problem is not that the include path of the project are not correctly setup, the problem is that this include file (and probably a bunch of other files) are just missing from my computer. There is no such file on my hard drive. So I tried installing Windows SDK 7.1. The file is not inside the installed SDK (although it should be). I tried repairing the install, uninstall it, reinstall it... all numerous time. I also try to install, repair, uninstall, reinstall Visual Studio 2010 professional numerous time, with and without the Windows SDK installed. I even tried uninstalling the professional version to install the express VC++... nothing seems to work, no 'excpt.h' never get installed on my computer. I am clueless... someone has a hint of a solution? I'm on Windows 7.
As supplementary information, note that 'excpt.h' is included in by "windows.h". Also, the "excpt.h" file is normally installed with the Windows SDK under a path like "c:\program files (x86)\microsoft sdks\windows\v7.1\include\" and with Visual Studio under a path like "C:\Program Files\Microsoft Visual Studio 10.0\VC\include\".
EDIT: If it might help, I might add that the folder C:\Program Files\Microsoft Visual Studio 10.0\VC\include related my Visual Studio install has only two files... which is certainly not normal!!! However, I can't find any ways to get the installer to install all the .h files that should appear in this repertory.
See if you have it at C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\excpt.h Check to be sure that the system include-paths are correct in Visual Studio. If all else fails, uninstall everything, all SDK's, etc., and re-install Visual C++.
Third party search programs do a better job than the Windows one for finding things. Try Agent Ransack. It's free.
For those who have the same problem, here is the solution I found after about 10h of install/uninstall/cleaning cycles... I've uninstalled completely visual studio using this. After that, using the control panel, I've uninstalled the Windows SDK and everything that can be associated with it or with visual studio (e.g. .NET framework). Then, I've removed all the left overs by manually deleting the visual studio and the Windows SDK folders located in C:/Program files. Finally, I deleted all the entries related to the Windows SDK or to Visual Studio in the registry (they are located in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft). Then, I reinstalled Visual Studio... and it was finally working correctly. I should add that I restarted and cleaned the registry using CCleaner after any install or uninstall step.
I had this problem with a project that had been updated to VS2017 from VS2015.
This was a header included via windows.h. I knew this header should have no problems as I had other projects created directly in VS2017 that used windows.h.
Another symptom was that the intellisense was highlighting includes of standard headers (e.g string, vector etc), although these were not generating compile errors.
The fix for me was similar to VS 2010 Cannot open source file “string”.
Initially, I retargeted the project, hoping this would help (right-click the project, select retarget projects), but this did not in itself cure the problem.
I then took a working project and copied the include directories from project properties->Configuration Properties->VC++ Directories and used these to replace the same property for my broken project. This fixed the problem.
Initially, the value for this property was
$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSDK_IncludePath);
The replacement value was
$(VC_IncludePath);$(WindowsSDK_IncludePath);
I had the same problem, and tried the answer given by OP, but it did not work. However, copying the contents of C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC (specifically bin, lib, and include) from a machine that did work to this machine worked.
It seems the Visual Studio 2012 installer is buggy when it comes to installing into a different drive letter than C:. I have installed the VS2012 into the D: drive and got the same error. I found that for some unknown reason the installer put some of the files into the correct location at:
D:\Program Files (x86)\Microsoft Visual Studio 11.0
but the remaining files were at
C:\Program Files (x86)\Microsoft Visual Studio 11.0
so I have moved the files from the C: into the D: location and it fixed the problem.
Some situation cause such problem. If you have uninstalled vs2010. you lost platform C++ binaries for .net framework 4 forever. You have to delete all of VS 2010 2012 2013, clean system up and its accompany components and reinstall them from scratch.
Or you can download this package. Include them in your project that may solve your problem properly.
one simeple way,just copy vc directory(C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC) from other computer
Fixing your Visual Studio installation is a good idea, but you don't necessarily need to re-install the same old version of VS. I uninstalled VS 2015, then modified my VS 2017 installation to add the VC++ v140 build tools, and now my project builds.