Msbuild runs on the command line, but VS2010 says the project is "not selected",

Relevant decision files and projects for this issue:

http://code.google.com/p/benfwaves/source/browse/trunk/BenfWaves.sln?r=26

http://code.google.com/p/benfwaves/source/browse/trunk/BenfWaves.Library/BenfWaves.Library.csproj?r=26

http://code.google.com/p/benfwaves/source/browse/trunk/BenfWaves.Client/BenfWaves.Client.csproj?r=26

http://code.google.com/p/benfwaves/source/browse/trunk/BenfWaves.Tests/BenfWaves.Tests.csproj?r=26

I tried to reorganize the project files to eliminate redundancy and allow compilation of .NET 3.5 as well as .NET 4.0. Currently, the VS2010 IDE can compile for any processor on .NET 4.0. If I try any processor for .NET 3.5, it says:

Error 1 Failed to load the file or assembly "System.Drawing, Version = 4.0.0.0, Culture = neutral, PublicKeyToken = b03f5f7f11d50a3a" or one of its dependencies. The system cannot find the specified file. Line 123, position 5. D: \ projects \ BenfWaves \ trunk \ BenfWaves.Client \ Properties \ Resources.resx 123 5 BenfWaves.Client

I read that this could be a problem with resgen.exe, but changing the 32-bit flag in this file did not improve the situation. In addition, the IDE does not consider that projects have configurations for anything other than Any CPU, which creates the following problem:

------ Skipped Build: Project: BenfWaves.Library, Configuration: Debug-4.0 Any CPU ------
           Project not selected to build for this solution configuration
------ Build started: Project: BenfWaves.Client, Configuration: Debug-4.0 x86 ------
           BenfWaves.Client -> D:\projects\BenfWaves\trunk\BenfWaves.Client\bin\x86\Debug-4.0\BenfWaves.Client.exe
------ Skipped Build: Project: BenfWaves.Tests, Configuration: Debug-4.0 Any CPU ------
           Project not selected to build for this solution configuration
========== Build: 1 succeeded or up-to-date, 0 failed, 2 skipped ==========

He skips what he should not. msbuild from the command line works on all three platforms and does not skip anything.

Any suggestions would be greatly appreciated. Thank.

: 27 " " , , VS2010 . .NET 3.5 - .

+5
4

, sln. Resx , .

+3
  • Solution
  • Configuration Manager
  • , Build , .
+13

, $() $() , PropertyGroup...

<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>

, IDE , .

+5

All Articles