Unable to compile CPP project

I’m using Visual Studio 2013 Professional. I created a CPP project so I could start playing around with the code and getting a feel for how things work, but out of the box, with no code changes whatsoever, I’m getting a compilation error. I am guessing the error is somehow related to my unique setup, though I can’t imagine what I’m doing wrong. The error doesn’t mean enough to me to give me an idea what I need to fix.

Error 14 The “SetEnv” task could not be instantiated from the assembly “C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.Build.CppTasks.Common.dll”. Please verify the task assembly has been built using the same version of the Microsoft.Build.Framework assembly as the one installed on your computer and that your host application is not missing a binding redirect for Microsoft.Build.Framework. Unable to cast object of type ‘Microsoft.Build.CPPTasks.SetEnv’ to type ‘Microsoft.Build.Framework.ITask’. C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.Cpp.targets 67 5

Any assistance would be much appreciated.

What version of Windows are you using? And which MS VS redist packages do you have installed?

You look like you’re using incompatible or outdated versions of MSBuild. Have you installed multiple versions of Visual Studio on that machine? You may want to uninstall your earlier versions aside from 2013.

The problem seems to be with .Net Demon. When I disabled that, compilation started working. Even so, uninstalling previous versions isn’t the answer, I’d done that already and was still getting this issue. I’ve emailed RedGate to get some help.

Windows 8.1, and more than I can count! Every time I download a steam game it adds another redist version, it seems.

Try uninstalling all redists and re-install the ones you need :smiley: