Debugging Typemock test case in Visual Studio 2015 throws TypeMockException - typemock

In Visual Studio 2015, when I attempt to debug a test that uses Typemock (and I use the Visual Studio Test Explorer, not Typemock's SmartRunner), on the first call to a Typemock method I get the following exception:
TypeMock.TypeMockException occurred HResult=-2146233088
Message=
*** Typemock Isolator is currently disabled. Enable using
the following:
Within Visual Studio:
Use Typemock Smart Runner
For other runners, Choose Typemock Menu and click "Integrate with Other Runners"
To run Typemock Isolator as part of an automated process you can:
run tests via TMockRunner.exe command line tool
use 'TypeMockStart' tasks for MSBuild or NAnt
I've followed the instructions and verified that:
Typemock is enabled
I already have "Enable Mocking integration" checked in the settings
Also,
The test runs properly when I choose "Run Selected Tests". I only get the exception when I choose "Debug Selected Tests"
Prior to Visual Studio 2015, I did not get this exception during debugging.
Question: What is causing this problem and how do I fix it?

The IntelliTrace functionality does not work with Typemock. Disabling IntelliTrace in the Visual Studio options (Options->IntelliTrace->General->Enable IntelliTrace) works around the issue.
See:
Typemock: Typemock Isolater is not currently enabled
Typemock: Debug Test on 64 bit machine
Typemock: On Windows 7 x64 with VS 2010

Disclaimer: I work at Typemock
This issue is fixed in Isolator 8.3 and will apply to all following versions.
Isolator 8.3 was released on 2.21.2016 and available for download at www.typemock.com.

Related

Can stylecop for jetbrains be run in visual studio 2017

We used to write our code in visual studio 2013 with stylecop as a seperate plugin. When we wanted to check our code qualtiy we pressed ctrl+shift+y to run stylecop and get a log of infractions (if any)
Recently we switched to visual studio 2017 with resharper and integrated stylecop by JetBrains. While stylecop is still running (blue lines underneath infractions) we can't seem to get a complete log with all our errors (and when building a solution stylecop isn't automatically run).
I tried looking in tools -> Options -> environment -> Keyboard -> Show commands containing "Stylecop" (you used to find lots of settings in VS2013, none in 2017)
Is it still possible to run stylecop like we did in VS2013?
Is it possible to have stylecop run after a build is completed (in a post build event)?
In Vsiual Studio 2017, the easiest way to enable and integrate StyleCop is to enable the StyleCop Roslyn package. That way the Roslyn compiler will automatically run StyleCop live in the editor as well as during build.
Resharper should play nice with this as well and sync its settings to the stylecop settings.

Visual Diagnostic is either disabled or is not supported by the current application

with VS 2015 Enterprise i get always following message on a solution while debugging: XAML Visual Diagnostic is either disabled or is not supported by the current application
Tools - Options - Debugging - General:
Enable UI Debugging Tools for XAML is enabled
Preview selected elements in Live Visual Tree is enabled
I have tried:
VS Restart
Clean Solution / Rebuild
Fresh Checkout
Curious: If i start the solution without debugging and i attach the debugger to the process, it works ...
Update:
If i select "Enable native code debugging" in project settings - debug, it works !
I needed an additional debugging option to be disabled in order for the tools to work with my projects:
Tools - Options - Debugging - General:
Use Managed Compatibility Mode --> disabled
I also faced this problem for some WPF projects that came to my pc from various sources. In my case the problem was in the project target framework - it was set to .NET Framework 3.5. The Live Visual Tree and the Live Property Explorer in VS 2015 do not work with .NET 3.5:
Inspect XAML properties while debugging
https://msdn.microsoft.com/en-us/library/mt270227.aspx
So I just changed the target framework to .NET Framework 4.0 in the project properties dialog (the Application tab) to make these 'live' tools work.
I faced the save issue on VS 2019. It happened all of a sudden on a project which it used to work on. Restarting VS did not help. But it got resolved after PC restart.
If you're having that problem in VS 2017 while debugging on a remote machine, installing the Visual C++ 2017 Redistributable (x64 in my case) made UI debugging work.
I always had this VM where UI debugging worked but my colleagues couldn't get it to work on their machines until I was experimenting with something where I had to uninstall all redistributables. After finishing my experiments I realized I couldn't debug the UI anymore. I reinstalled the 2017 redistributable and the functionality got enabled again.

MSBuild SonarQube Runner: "Failed to locate the code coverage command line tool" still with version 1.0.1

I am trying to use MSBuild SonarQube Runner to have my TFS-builds run the Sonar analysis.
I have configured the tool to work with our sonar Server according to this manual. Actually I can start an analysis by building manually via console on my local machine. Additionally, I installed the tool on our build server and when I run it via Visual Studio, I’ll get the error "Failed to locate the code coverage command line tool".
I already found out that the CodeCoverage.exe is needed, but only given with installing an Enterprise version of Visual Studio on the server. I also read that in version 1.0.1, this issue should be fixed (see here and in the changelog this is also mentioned as fixed).
I exchanged the old MSBuild SonarQube Runner with the version 1.0.1, but with building on the TFS in Visual Studio and adding the command lines to run MSBuild SonarQube Runner v1.0.1, I still get the error "Failed to locate the code coverage command line tool".
I also have Visual Studio 2015 Professional installed on the build mashine.
How can I fix this issue without needing an Enterprise version of Visual Studio providing the CodeCoverage.exe?
Code Coverage still requires Visual Studio Enterprise in the 2015 version (see this page).
The bug you referred to fixed an issue in version 1.0 that meant that analysis would fail if the code coverage tool could not be found. Analysis will no longer fail if the code coverage tool was not found, but it doesn't change the requirement to have to VS Enterprise installed if you want to use the Microsoft code coverage tools.

Can't see "Run Pex" in VS2010 after installation

I installed Pex on my Windows 7 machine (Visual Studio 2010 Pex 0.94.51023.0 Power Tools (x64) - (English)). However, when I right click on a piece of code in VS2010, I don't see the "Run Pex" option. When I open another project using VS2008, it is visible. Any idea why it the option does not show up in VS2010?
Firstly, have you tried to reinstall Pex?
Otherwise, as experienced here, if Pex thinks that your project is a test project, e.g. because it references some unit testing framework or Microsoft.Pex.Framework, then Pex will only explore methods marked with the [PexMethod] attribute. Otherwise, Pex should allow the exploration of any public method. Is this possibly your problem?
Otherwise, if you are switching between VS 2008 and VS 2010, perhaps you are running into this problem.

Is it possible to run an FxCop Code Analysis from the MSBuild command line with VS NOT installed?

Our final build server does not have Visual Studio 2010 installed. It uses the MSBuild.exe from the .NET 4 SDK. As part of our code delivery process to our customer we need to allow him to build the projects from the command line on a Visual Studio 'agnostic' server and also to run Code Analysis rules on that machine.
On the visual studio side we started out with AllRules.rules and created exceptions going foreward so naturally we'd like the exceptions to carry over to the code analysis on the build server.
Is this possible ?
Thanks in advance.
Using standalone FxCop you can customize your CI process as you wish. Open this link and go to "Setting up continuous FxCop code analysis" chapter.
Link above seems to be dead now. You can try to look here on this SO question