Problem with mouse speed (Visual Studio and vstest.console.exe) - visual-studio-2017

The mouse speed displacement is not constant when using command prompt depending if Visual Studio is open or not.
I am looking for a resolution to this problem.
Environment:
Windows 10 Enterprise 1803 (17134.407)
VS Test Agent 2017 15.9.2
VS Enterprise 2017 15.9.2
Steps
Creates a Coded UI project (.net 4.7.1).
Add the following test method :
public void CodedUITestMethod1()
{
Mouse.Move(new Point(10, 10));
var start = DateTime.Now;
Console.WriteLine($"MouseMoveSpeed={Mouse.MouseMoveSpeed.ToString()}");
Mouse.Move(new Point(500, 500));
Console.WriteLine($"Time= {DateTime.Now - start}, MouseMoveSpeed= Mouse.MouseMoveSpeed.ToString()}");
}
Run the test from Visual Studio and note the standard output (I got: Time=00:00:01.7835117, MouseMoveSpeed=450).
Close all instances of Visual Studio and execute the previous test method from a command prompt:
"C:\Program Files (x86)\Microsoft Visual Studio\2017\TestAgent\Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe" "C:\Users\fakeUser\Source\Repos\CodedUITestProject1\bin\Release\CodedUITestProject1.dll" /Logger:trx
Check the standard output from the test result in trx file (I got: Time=00:00:10.3616613, MouseMoveSpeed=450)
Open an instance of Visual Studio (don't need to open the project, it can be the view of the Trx file for example) and run again the test method from the command prompt.
Check the standard output from the test result in trx file (I got: Time=00:00:01.8037781, MouseMoveSpeed=450)
Actual Result:
When Visual Studio is open, the mouse is faster when executing the test method by vstest.console.exe.
Expected Result:
The mouse displacement remains the same no matter the executive method.
FYI:
I have the same result on a fresh installation of Windows 10 Professional with only VS Test Agent installed (no Visual Studio).
MSTest instead of VSTest from command prompt gives the same result (slower than when Visual Studio session is opened).
You have to execute a Test method from Visual Studio first before to run command prompt (follow the steps order). Maybe a dependency loaded by Visual Studio creates this behavior.

Related

The directory containing the assemblies for the Visual Studio Test Runner is not valid

Our CI environment setup with [TFS Server 2015 + Visual studio build tools 2017]. When I try to run C# based unit test on environment it shows this error
TF900547: The directory containing the assemblies for the Visual Studio Test Runner is not valid ''.
Then I tried to fix the error by fallowing ways
Installed VS test agent 2015 in the machine https://learn.microsoft.com/en-us/visualstudio/test/lab-management/install-configure-test-agents
Copied C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\CommonExtensions\Microsoft\TestWindow from my computer to exact location to CI machine.
Changed test runner from Visual Studio Test Runner to MS Test Runner
But still same error. Looks like tfs server not able to find the test agent folder. Anyone has idea how to fix this
Seems you have VS 2017 Build Tools installed only, no VS IDE on the CI environment.
You need to install VS IDE. VS build tools doesn't contain the "test
platform". In order to run the tests, you require to install full
IDE.
Currently to run the VsTest task, the task has dependency on Visual Studio IDE. But some changes will have in the near future.
We have decided to go with a 'tools installer' which can be used to
get the test platform instead of needing the IDE. If you have the IDE,
great. If you don't, the tools installer will get the test platform on
the agent for you. It is already on backlog and expected to be available on VSTS in a few sprints.
More details please take a look at the discussion in this issue: vstest capability not detected when installed without Visual Studio

VS 2015: TF900547: The directory containing the assemblies for the Visual Studio Test Runner is not valid ''

I Have VS 2015 only installed on my TFS 2013 build server, and get the following error:
TF900547: The directory containing the assemblies for the Visual Studio Test Runner is not valid ''.
Other sites say to install VS 2013, but why would I have to install VS 2013 on the build server to run unit tests when I have VS 2015 installed?
I have the following switches on my build:
/p:VisualStudioVersion=14.0 /tv:14.0
(This is not a duplicate question as I am using TFS 2013 and am trying to use the Agile Test Runner not MS Test)
Check the solution in this case:
Install VS 2015 or Microsoft Build Tools 2015.
Edit build to use a build process template called TfvcTemplate.12.xaml.
Set MSBuild arguments to /tv:14.0.
But this setting only works for build, not test. As there is no way to set the tool version or tool path for "Run VS Test Runner" activity, installing VS 2013 should be the only way to get rid of this error.
I had a similar problem - was getting the error
TF900547: The directory containing the assemblies for the Visual Studio Test Runner is not valid 'D:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\CommonExtensions\Microsoft\TestWindow'.
It ended up being that even though Visual Studio 2015 was installed on the build agent, the user that the Build Agent was running as didn't have read/execute permissions to that folder.

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 fix Rational Rhapsody error :"Current value is "VC11", but no Visual Studio installation was not found in the directory ""."

Im working on Windows 7, 64-bit and I'm trying to run Rational Rhapsody 8.0.5 for C++ with Visual Studio Professional 2013. After creating a simple coding example for a class, I tried to compile it, but I got the following error :
Current value is "VC11", but no Visual Studio installation was not found in the directory "".
Is there something wrong with my installation, or do I need an older version of Visual Studios? I've tried everything, but nothing I've done is working. Any help will be appreciated
Follow these steps to configure IBM Rational Rhapsody 8.x to use the Microsoft Visual Studio 2013 compiler, borrowed from here:
Install Rational Rhapsody 8.x and Microsoft Visual Studio 2013.
In <RHAPSODY _ROOT>\Share\Properties, set the factoryC++.prp file to read/write permissions and open the file in a text editor.
Under the metaclass sections: MSVC, MSVCDLL, MSVCStandardLibrary add the string VC12 to the Property IDEVersion. For example,
Metaclass MSVC
Property IDEVersion Enum "VC9,VC10,VC11,VC12" "VC10"
Browse to the <RHAPSODY _ROOT>\Share\etc folder and open the msvcmake.bat file
Copy the line
if "%4"=="VC11" set VS_PATH=C:\Program Files (x86)\Microsoft Visual Studio 11.0\
and paste a new line beneath with the following changes
if "%4"=="VC12" set VS_PATH=C:\Program Files (x86)\Microsoft Visual Studio 12.0\6
Copy the line
#echo VC11 - Visual Studio 2012
And paste with changes
#echo VC12 - Visual Studio 2013
Open Rational Rhapsody8.1 and load a sample project. For example,
<RHAPSODY _ROOT>\Samples\CppSamples\Dishwasher
Select the Project’s Active Component/Configuration. For example, EXE and Host
Double-click the configuration in the browser and open the features window. Select the Properties tab and find the CPP_CG::MSVC::IDEVersion property. Switch the value to VC12
Run the Build Framework command in the Code menu. You will see a lot of deprecation warnings.
Once this is completed you can then build and run the sample project via the Code > Generate/Make/Run command
Visual Studio 2013 is not supported. VS2012 is the latest that it supports.
I'm assuming you know how to select your version of visual studio within Rhapsody.

How to compile from command line using visual studio 2005

I need to be able to compile a visual studio 2005 c++ project from the command line. I have found this post in the SOF archives but it does not seem to help me solve my problem. I am not able to find neither msbuild or vcexpress. Can someone point me to where they must be or is there a different command for visual studio 2005?
What I need is to create a batch file that does the compiling.
Click Start, point to All Programs, point to Microsoft Visual Studio, point to Visual Studio Tools, and then click Visual Studio Command Prompt.
To open the Windows SDK Command Prompt window (Windows SDK version 6.1 or later):
Click Start, point to All Programs, point to Microsoft Windows SDK , and then click SDK Command Prompt or CMD Shell.
And read How to: Compile a Native C++ Program from the Command Line in Visual Studio
You're looking for cl.exe.
But, ehm, batch file? Don't you mean makefile?