How to generate .trx file in vs2012? - visual-studio-2012

I am using VS2012 Ultimate edition for my Coded UI project.
My project is not generating .trx file in the TestResults folder. Please suggest me steps to get .trx file using Visual Studio 2012.

VS 2012 does not generate .trx files and there is not a way to configure it to do so. However, if you use VSTest.Console.exe command line utility, then you can generate a .trx file by passing it /logger:trx command line parameter.

Related

Compiling C# .Net from Command Line

I'm trying to compile a c# .net project only using command line so that I could create a bat file to compile and run the Selenium tests. I exported the code from SVN. And I opened the command prompt and am able to restore packages using below command.
And then when I try to compile with msbuild it could not reference the dll added in through the nuget. I know in visual studio through package manager console I can use a command (update -reinstall) and make it work, but how to do this without visual studio.
==== bat file ======
REM Restore External Pacakages
nuget restore packages.config -PacakgesDirectory D:\Testproject\packages"
msbuid TestProject.sln
Basically you need to reference Msbuild executable
C:\Windows\Microsoft.Net\Framework\v4.0.30319\MSBuild.exe
OR
C:\Windows\Microsoft.Net\Framework64\v4.0.30319\MSBuild.exe
then you need to pass the .sln or .csproj file path (depends on your working folder) as parameter.
You can also specify the msbuild's targets ex. Clean, Rebuild, Build => As they exists in Visual Studio.
The final command could look like this:
Template:
{.NetFrameworkPath}\msbuild.exe {pathToSln} /t:{Build,Clean,Rebuild}
Examples
C:\Windows\Microsoft.Net\Framework64\v4.0.30319\MSBuild.exe TestProject.sln /t:Build
C:\Windows\Microsoft.Net\Framework64\v4.0.30319\MSBuild.exe TestProject.sln /t:Clean;Build

Visual Studio 2013 generates a Backup folder in each build for visual C++ project

I use VC2013 to build and run a VC++ project. It works well, but in each single time I open and build the VC++ project, there will be a folder named like "Backup, Backup1, Backup2, Backup3,..." automatically generated by the VC2013. In the backup folder, there is just a ".sln" file.
Anyone can tell how to stop this automatical process? and what is the function of the backup folder for?

Visual C++ 2012 missing mspdb110.dll

I am trying to compile on cmd using cl and it says that I'm missing mspdb110.dll.
Anyone know how to fix this?
Edit: I added this file path to PATH C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin and the file is a standard hello world program
If you are trying to execute cl.exe from the command line, you need several environment variables added/modified. See here for further details:
Command line compile using cl.exe?
The version mentioned in that post is VS2010, for VS2012, you should be running 'Developer Command Prompt for VS2012', which will set the variables for you.

Execute commands in visual studio 2012 like in makefiles

I have a driver code working for win2008 server compiled using wdk7.1.0. I converted the project to compile in visual studio 2012 with wdk8.1 and created sln and vcxproj files. I compiled successfully and generated .sys and .inf files.
My question is I have some files need to be copied to the output directory as part of build process automatically (after generating .inf and .sys files).
For wdk7.1.0, I wrote a makefile in which I executed "-copy /y src.out dest.out" and copied as part of compilation.
In wdk8.1 as I am compiling using visual studio, is there any way to execute these commands as part of build? like can I edit .sln/.vcxproj files etc etc.
Thanks in Advance
Venkatesh
You can use pre-build or post-build events properties of a project for this. You can call either a specific command or batch file to do such work.

how to build a vc++ file in commandline

How to build a Project developed in VC++ in command line i am not visual studio(2003or 2005 or 2008)
I might not have understood your question fully, but using the /build param to devenv.exe will enable you to build a solution from the command line.

Resources