Archive

Posts Tagged ‘Visual Studio’

Running unit tests from a command line

February 23rd, 2019 No comments

VSTest.Console.exe should be used from .NET Framework 4.6.1 instead of MSTest.exe to run unit tests from command line.

MSTest.exe brings “No tests to execute” error message.

More info:

Code Analysis for C++

January 8th, 2016 No comments

run Visual Studio manage and unmanage unit tests from command line

January 28th, 2015 Comments off

MSTest is used for Managed C#, C++ Tests and Test Execution Command Line Tool (vstest.console.exe) for unmanaged C++ tests.

MSTest example:

>"C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\MSTest.exe" /testcontainer:managed_unitTest.dll /testsettings:mysettings.testsettings

Test Execution Command Line Tool example:

>"C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe" unmanaged_unitTest.dll /Settings:mysettings.testsettings /platform:x86

 

Additional links:

10 new C++11 features in Visual Studio 2013

February 3rd, 2014 No comments

The Visual Studio 2013 C++ compiler has a number of new C++11 features. I’d like to give you a quick overview of these features using examples from the upcoming VS2013 edition of my book, C++11 Rocks.

Alex Korban

“Professional Scrum Development with Microsoft® Visual Studio® 2012”

January 27th, 2013 No comments

BookDiscover how to turn requirements into working software increments—faster and more efficiently—using Visual Studio 2012 in combination with Scrum and Agile engineering practices. Designed for software development teams, this guide delivers pragmatic, role-based guidance for exploiting the capabilities of Application Lifecycle Management (ALM) tools in Visual Studio and Team Foundation Server. Team members will learn proven practices and techniques for implementing Scrum to manage an application’s life cycle, as well as seamlessly plan, manage, and track their Scrum projects.

C9 Lectures: Core C++

July 19th, 2012 No comments

We know lots of folks are either coming back to C++, coming to C++, or have never left C++. This lecture series, in n parts, is for all of you! Only STL can make that work (novice, intermediate, and advanced all bundled together and presented in a way only STL can do.)

C9 Lectures: Stephan T. Lavavej – Core C++

Windows 8: Unit testing native code

May 23rd, 2012 No comments

Unit testing native code with Unit Test Explorer

In Visual Studio, you can create unit tests for unmanaged code written in C++. Unmanaged code is sometimes referred to as native code.

The following procedure contains the essential information that will get you started. The later sections provide a walkthrough that describes the steps in more detail.

patterns & practices – Hilo: dev a Windows Metro style app using C++ & XAML

Hilo guides you though the development of a Windows Metro style app. The Hilo sample is a photo viewing and tagging app using C++ and XAML. Hilo demonstrates how to create live tiles, virtualize scrolling, suspend and resume the app, implement search, share and other contracts.

Verifying Code by Using Unit Tests

The Visual Studio 11 unit test tools are designed to support developers and teams who incorporate unit testing in their software development practices. Unit tests give developers and testers a quick way to look for logic errors in the methods of classes in Visual C#, Visual Basic, and Visual C++ projects.

Clean memory

February 20th, 2012 No comments
// Swaps the process out of physical RAM memory
SetProcessWorkingSetSize(GetCurrentProcess(), (SIZE_T)-1, (SIZE_T)-1);

Можно ещё делать так, когда память процесса превышает некую “норму”:

EmptyWorkingSet(GetCurrentProcess());

pragma warning

February 3rd, 2012 No comments

#pragma warning – enables selective modification of the behavior of compiler warning messages.

Additional “pragma warning” parameter is suppress – pushes the current state of the pragma on the stack, disables the specified warning for the next line, and then pops the warning stack so that the pragma state is reset.

Also __pragma() can be used instead of #pragma which allows it to use inside macros:

#define __const_cond( c ) \
 __pragma(warning(push)) \
 __pragma(warning(disable:4127)) \
 ( c ) \
 __pragma(warning(pop))

Writing modern C++ code: how C++ has evolved over the years

September 19th, 2011 No comments
Many people think of C++ as the same language they experienced in college or just as “C with classes”, but the C++ language has evolved extensively over the years. In this session, we’ll cover how you can use C++ to write innovative, expressive and beautiful apps that deliver power and performance apps. Join us to see how the newly finished C++0x standard can make writing C++ as productive as many other languages.