DLL profiling in Visual Studio 2013 professional cannot find VSPerfControl.Interop - c++

I have tried debugging DLL in Visual Studio 2013 Pro and I keep getting these errors
Could not load file or assembly 'VSPerfControl.Interop, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
I have been stuck with this for a while and I would appreciate any comments. The MSDN website talks only about VS premium so I am not sure if profiling dll actually works on Professional
http://msdn.microsoft.com/en-us/library/bb385752.aspx

Problem was resolved by re-installing it in default folder.

The problem can be resolved without a re-install
You need to do:
1 - Open the Start menu, by pressing the Windows logo key Windows logo on your keyboard for example.
2 - On the Start menu, enter dev. This will bring a list of installed apps that match your search pattern. If you're looking for a different command prompt, try entering a different search term such as prompt.
3 - Choose the Developer Command Prompt (or the command prompt you want to use) - RUN AS ADMINISTRATOR
4 - Now you have to check if the VSPerfControl.Interop is in this path: C:\Program Files\Microsoft Visual Studio 12.0\Team Tools\Performance Tools
5 - If isn't there, you have to re-install. If is there, you have to go to this path with your command prompt (cd C:\Program Files\Microsoft Visual Studio 12.0\Team Tools\Performance Tools)
6 - After this, you have to execute this command line:
gacutil /i VSPerfControl.Interop.dll
Now re-open Visual Studio and be happy!!!

Related

How to install SignTool.exe for VS 2017?

After upgrade to VS 2017 i got
"Error An error occurred while signing: SignTool.exe not found."
But only using MSbuild on the Visual Studio publish there's no problem.
I already checked folder
"C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin"
and in fact there's no SignTool.exe present.
But there was before installing VS2017, any ideas?
I followed this issue but no luck
How to install SignTool.exe for Windows 10
Signtool is included with the Windows 10 SDK
Open Visual Studio installer.
Switch to the "Individual Components" tab
Choose the version of the SDK that suits your needs.
Multiple copies may be installed.
Start Developer Command Prompt for VS 2017 then it is in the path variable
signtool
That seems to do the trick, now the problem is with setup.bin file.
error MSB3147: Could not find required file 'setup.bin' in csproj folder
C:\Program Files (x86)\Microsoft SDKs\ClickOnce\SignTool>
This is where its there in my System.
The all solutions didn't worked for me ; finally i just copied signtool.exe to the project folder and then worked. You can download the signtool.exe from internet or install Windows 10 SDK by visual studio installer and then copy from "C:\Program Files (x86)\Microsoft SDKs\ClickOnce\SignTool".
I found it under C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Bin
It could be because it was there before the vs2017 installation.
It doesn't harm to check :)
So the problem I had with this was that the path variable wasn't set up. I ran
set PATH="C:\Program Files (x86)\Microsoft SDKs\ClickOnce\SignTool";%PATH%
in the Developer Command window before trying to sign anything.
If you do it this way you will need to run the set path every time you want to use it unless you add it to the path environment variable.
I hope this helps.

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.

Why can't I create a new win32 console visual c++?

I'm running visual studio 2013 professional on windows 8
Now, every time I try to start a new project solution in C++ win32 application, the idle-cursor turns to wait-cursor, nothing seems to happen for a long time, the minute i hit the screen, windows tells me visual studio isn't responding, then I'm forced to kill visual studio.
It keeps crashing
I tried searching for answers, found one about not able to create a win32 console application had a resolution, tried it but I get access denied.
C:\Program Files (x86)\Microsoft Visual Studio 12.0>devenv /setup
Microsoft Visual Studio 2013 Version 12.0.30723.0.
Copyright (C) Microsoft Corp. All rights reserved.
The operation could not be completed. Access is denied.
C:\Program Files (x86)\Microsoft Visual Studio 12.0>
After first feedback
I rebooted, retried using the visual studio command prompt, while running it as an administrator. This time it didn't complain, nor outputted anything.
I also tried running visual studio itself as an administrator, but still get same the effect when attempting to create a new c++ win32 console project.
After more searching
Based on this reference
I tried
devenv /Resetsettings ... didn't resolve it
devenv /ResetSkipPkgs ... didn't resolve it
devenv /Safemode ... resolved it, but not sure if it's ideal
The current resolution is to create a project in safe mode
Procedure
Run visual studio command prompt
Type in: devenv /Safemode
Create a new project
The project should now be accessible by going through the standard way of opening visual studio
Update
I uninstalled visual studio, then reinstalled. Unfortunately, I still can't run visual studio normally just to create a project, it continues to hang indefinitely every time I do. The procedure above is still the only resolution at the moment.
I guess you run this on Windows 8 ?
In win8, folder "program files" are not allowed to write except for adminstrators

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

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.

How to compile with Visual Studio x64?

I would like to compile in VS2008 x64 from bat file.
When I compile in VS2008 32 bits I call vsvars32.bat.
What do I need to call to compile in x64?
Nowadays the recommendation is not to use vsvar32.bat and use SetEnv.cmd instead to set up your build environment. Pass the /x64 argument to select a 64 bit build environment. This MSDN page has some more information about SetEnv.cmd.
A simple way is to go in the directory : "C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin\amd64" and execute the file : "vcvarsamd64.bat"
You need to install "X64 Compilers and Tools" feature in your VS2008 IDE.
Please try adding "X64 Compilers and Tools" feature via Control Panel >> Add/Remove Programs (For Vista or later OS, please go to "Programs and Features").
After entering Visual Studio 2008 Maintenance Mode, please expand "Visual C++" node >> click "X64 Compilers and Tools" >> click "Update" button.
Then you can enter "Visual Studio 2008 Command Prompt (x64)"
Hope this helps!
Visual Studio will install shortcuts to launch command prompts that setup an appropriate environment for triggering builds. You can see where the shortcut for the x64 Command Prompt points to by right clicking on it and checking out its target property. It typically points to:
"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" amd64
There is more information here: https://msdn.microsoft.com/en-us/library/x4d2c09s.aspx