When you run MsTest tests using Visual Studio 2008 or the command line with default options, the binaries are copied to an "Out" folder. The same doesn't happens when you run it with the Visual Studio 2010. What is the command line options that enable me to achieve the same result as VS2010?
Open up the ".testsettings" in the solution items. (Add one if need be.) Edit it, choose "Deployment," then check "Enable deployment." Save the SLN.
Related
I have made a few change in simplescalar sim-fast.c, but I don't able to debug this change in visual studio 2019.
are there any way to do this?
Thanks.
From your comment, it seems you are trying to debug an opened file/folder right?
Visual Studio is not supported to build/debug a file/folder, at least it is not possible for a single file. For folders, some may be supported, but need to have some files been included, such as a .sln file, a .vcxproj file and so on. Instead, Visual Studio supports to build/debug a project/solution.
I'm not familiar with simplescalar, I guess it is not possible to open it as a project/solution in Visual Studio to build and debug though. You can have a try open it as a project, and perhaps consider using other editor tools, if it can't be opened as a project, for example Visual Studio Code.
Since some days the feature files are broken.
VS2017:
Colors dissapeard, everything is white.
When I press F12 nothing happens.
When I run the test from solution explorer the tests work fine.
VS2015:
Everything works fine.
What I tried to do:
Option 1: Run Binding Tool
Right-click on the feature file
Select "Run Custom Tool"
This causes the SpecFlowSingleFileGenerator to regenerate the code-behind for your test framework.
Option 2: Restart Visual Studio
Close Visual Studio
Open Visual Studio
Reopen solution
This causes any bindings that haven't been cached to rerun.
Option 3: Clear SpecFlow Step Mapping Cache
Close Visual Studio
Open Windows Explorer
Type %TEMP% in Address Bar and hit Enter
Search for "specflow-stepmap-*.cache"
Delete those files
Open Visual Studio
Reopen solution
Option4: Uninstall and reinstall visual studio 2017
None of them fixes the issues for VS2017.
Some help is more than welcome.
I solved this issue by updating VS2017 to v15.6.1. Prior to that I've tried all the steps you mentioned and it did not work.
Also, found this article: https://github.com/techtalk/SpecFlow/issues/1049 which is saying the same.
These symptoms sound like you haven't installed Specflow extension on your VisualStudio 2017.
What happens when you dont have it is that VS can't work with feature files and can't navigate to anything when pressing F12.
Tests are working because VisualStudio executes already generated NUnit tests from feature.cs files.
Double check your VisualStudio Tools -> Extensions And Updates -> Check in Installed if you have Specflow for Visual Studio 2017 installed and Enabled.
Note: Each time you install a new Visual Studio you have to install the extension.
Came across the same issue, installed Specflow for Visual Studio 2017 from Tools >> Extensions And Updates and found as working fine.
Go the colours for feature file lines back and F12 is working fine.
Thanks.
I'm using Visual Studio 2012 (11.0.61219.00) Update 5 on Windows 7 Professional SP1. I'd like to profile NUnit tests, which I've done in the past using VS2010 on a different system. This is the first time I've tried this on this box, which has a fairly fresh VS2012 install. When I try to attach the profiler to a running process using the Analyze | Profiler | Attach/Detach menu option, I get a dialog box containing the following error message:
Could not load file or assembly 'VSPerfControl.Interop, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
I've done the following diagnostics:
Verified that VSPerfControl.Interop.dll exists in the folder C:\Program Files (x86)\Microsoft Visual Studio 11.0\Team Tools\Performance Tools with file version 11.0.50727.1
Made sure I'm running Visual Studio in elevated (Administrator) mode
Added the above directory to my system's PATH variable
Checked C:\Windows\assembly and did not see the DLL loaded in the GAC
I haven't found any helpful posts on this, so I'm hoping someone here can help me figure out what's wrong.
Update:
The final solution to this problem can be found in HelpfulPaul's post below, in the comments.
I had this same issue. I used the VS cmd prompt to fix.
Go to the start menu -> all programs -> Visual Studio 2015 -> Visual
Studio tools
Open the Developer command prompt
Change folders to the directory you listed above by using the
command: cd C:\Program Files (x86)\Microsoft Visual Studio 14.0\Team Tools\Performance Tools
Use the command: gacutil /i VSPerfControl.Interop.dll
Restart Visual Studios
It seems you don't use the Test Explorer which have direct connection with the profiler.
In Visual Studio 2012 and upwards you have a test explorer that can handle different 3rd party test frameworks, among them NUnit. What you need to do is to either add a NUnit test adapter to your project (as a nuget package) or to Visual Studio (as a vsix extension). Once you have done that, you will see your tests in the Visual Studio Test Explorer.
Profiling is then available from the Test Explorer as a context sensitive menu item.
There are 2 versions of the NUnit Test Adapter, on for NUnit V2 and one NUnit V3.
The corresponding NUnit adapters for VS can be found here: https://visualstudiogallery.msdn.microsoft.com/6ab922d0-21c0-4f06-ab5f-4ecd1fe7175d and https://visualstudiogallery.msdn.microsoft.com/0da0f6bd-9bb6-4ae3-87a8-537788622f2d.
According to this Microsoft article on VS2015 there should be a "Run tests after every build" option in the test explorer. There is not. Any idea how to enable it?
I am running VS2015 Update 2, but perhaps there are some additional settings I need to enable?
The referred article in your question has a note on the availability on that feature:
Warning
Running unit tests after every build is supported in Visual
Studio Enterprise.
I use Community at home and Professional at work and don't have that feature in either of them.
I am using Visual Studio 2017 Professional and I really want to run tests after build, a feature is only available in Visual Studio Enterprise and currently in Visual Studio 2019 Professional Preview as well. Visual Studio 2019's IntelliSense doesn't do "code completion" well, so I still mainly use Visual Studio 2017.
A work-around to run tests after build in VS 2017 is to run the test from the command line using dotnet vstest.
Simply create a batch file to run dotnet vstest [Your Test Project].dll and add to Project Properties > Build Events > Post-build event command line: call $(ProjectDir)YourBatchFile.bat > Run the post-build event: On successful build.
Below is a sample Output after the build:
I am writing a Visual Studio template wizard. And to debug it I have it start a new instance of Visual Studio 2010.
My Visual Studio 2010 takes a good while to start up. I believe that this is due the the add-ins and extensions that I have installed for visual studio.
I would rather not go disable them all (I really like them). So I was hoping there was a way to disable them via the command line.
Just run a clean Visual Studio instance.
Is there a way to do that?
Try safemode
devenv.exe /safemode
which
Starts Visual Studio in safe mode, and loads only the default environment and services, and shipped versions of third-party packages.
See http://msdn.microsoft.com/en-us/library/xee0c8y7.aspx