9

Visual Studio 2013 has a problem when building, it displays an error message as follows:

c:>devenv /build debug /project (project name) /projectconfig "debug|x64" (solution Name).sln

1>This operation should only take place on the UI thread.

cbuchart
  • 10,847
  • 9
  • 53
  • 93
Amit
  • 111
  • 1
  • 6

2 Answers2

20

I just ran into this with Visual Studio 2015 compiling C++ code (error: This operation should only take place on the UI thread). Finally traced it to the .vcxproj.filters file for the project that was failing to compile. This file had been merged from another code stream and was missing a closing "ClCompile" XML tag in one spot. Apparently this leads to the error, although compiling in the IDE worked fine.

Dave
  • 371
  • 3
  • 3
2

There is a workaround : use

msbuild /p:Configuration=Debug;Platform=x64 (solution Name).sln..

moreover I have no issues using devenv /build once I have used msbuild.

Black magic !

Amit
  • 111
  • 1
  • 6