App.xaml requires an ApplicationDefinition Build Action

I was working on transforming a Windows Store app into an Universal app so that it worked not just for Windows Store but also for Windows Phone. When you do this two new projects are added to the solution. One of them is a special one, called shared project that you can use to keep…

A tale of Visual Studio and SQL Server Compact

I have recently upgraded my SSD disk to a newer and larger one. To avoid the hassle of re-installing everything (I have a lot of things to install) I cloned the disk. Everything worked fine. No problems with the operating system and the applications, except for Visual Studio. Though I could start, edit, build, run,…

MFC Collection Utilities library

This project has been moved to GitHub. New location: https://github.com/mariusbancila/mfccollectionutilities C++11 has provided support for range-based for loops. They allow iterating over the elements of a range without using an index.

However, if you try the following MFC code you get some errors because the compiler is looking for a begin() and end() function…

Extension methods in C++

A few days ago Bjarne Stroustrup has published a proposal paper (N4174) to the C++ standard committee called Call syntax: x.f(y) vs. f(x,y). The following excerpt from the paper summarizes the proposal: The basic suggestion is to define x.f(y) and f(x,y) to be equivalent. In addition, to increase compatibility and modularity, I suggest we explore…

The C++ Ten Commandments

This article presents a list of good practices for C++ development. Obviously there are many other good practices that one should adhere to and perhaps some of them are more important than the ones in this list. The following list is a personal recommendation and should be taken as is. Thou shalt follow the Rule…

Lessons learned from trying PhoneGap\Cordova on Windows

I am investigating using PhoneGap as a platform for building mobile apps for several operating systems including Android. While doing so I have ran into various issues, and this article is intended to help others avoid the same headaches (with a focus on Android). PhoneGap vs Cordova The PhoneGap installation documentation says you could install…

CRT Refactored in Visual Studio “14”

Visual Studio “14” CTP ships with a refactored C Runtime. The first thing you’ll notice is that msvcrXX.dll has been replaced by three new DLLs: appcrtXX.dll, desktopcrtXX.dll and vcruntimeXX.ddl (where XX stands for the version number so in this version it’s appcrt140.dll, desktopcrt140.dll and vcruntime140.dll). You can see in this image that both desktopcrt140.dll and…

Per-project natvis files in Visual Studio “14”

Visual Studio 2012 introduced a new framework for writing debugger visualizers for C++ types that replaced the old autoexp.dat file. The new framework offers xml syntax, better diagnostics, versioning and multiple file support. Visualizers are defined in XML files with extension .natvis. These visualizers are loaded each time the debugger starts. That means if you…