# Devenv returns error: "The first argument for devenv is usually a solution file"

**URL:** <https://www.finalbuilder.com/forums/t/devenv-returns-error-the-first-argument-for-devenv-is-usually-a-solution-file/1390>\
**Category:** Discussion\
**Created:** [November 30, 2009, 9:09am UTC](https://www.finalbuilder.com/forums/t/devenv-returns-error-the-first-argument-for-devenv-is-usually-a-solution-file/1390 "2009-11-30T09:09:12Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![deleted\_user](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/deleted_user/32/937_2.png) [@deleted\_user](https://www.finalbuilder.com/forums/u/deleted_user)\
**Post date:** [November 30, 2009, 9:09am UTC](https://www.finalbuilder.com/forums/t/devenv-returns-error-the-first-argument-for-devenv-is-usually-a-solution-file/1390/1 "2009-11-30T09:09:12Z")

</div>

&nbsp;Using FB v6.3.0 and VS 2008 9.0.30729.1 SP and a Build VS.Net solution action without 'use MS build' checked I get a failure returned from devenv:

```
Running C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE\devenv.com with parameters : /clean "Debug|Any CPU"/project "Source\MSVC.90\wrxlp.vcproj" "D:\continuous_integration\src\lib\WRXLP_DLL\wrxlp_MS_2008.sln"------Microsoft (R) Visual Studio Version 9.0.21022.8.Copyright (C) Microsoft Corp. All rights reserved.Invalid solution configurationUse:devenv [solutionfile | projectfile | anyfile.ext] [switches]The first argument for devenv is usually a solution file or project file.You can also use any other file as the first argument if you want to have thefile open automatically in an editor. When you enter a project file, the IDElooks for an .sln file with the same base name as the project file in theparent directory for the project file. If no such .sln file exists, then theIDE looks for a single .sln file that references the project. If no such single.sln file exists, then the IDE creates an unsaved solution with a default .slnfile name that has the same base name as the project file.Command line builds:devenv solutionfile.sln /build [solutionconfig] [/project projectnameorfile [ /projectconfig name] ]Available command line switches:
```

#### &nbsp;

#### &nbsp;

#### If at the command line I give the solution as the first command to devenv it works fine. Where did I go wrong in FB?

```

```

---

<div class="post-metadata">

**Author:** ![Vincent](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/vincent/32/938_2.png) [@Vincent](https://www.finalbuilder.com/forums/u/Vincent)\
**Post date:** [November 30, 2009, 9:41am UTC](https://www.finalbuilder.com/forums/t/devenv-returns-error-the-first-argument-for-devenv-is-usually-a-solution-file/1390/2 "2009-11-30T09:41:58Z")

</div>

_Invalid solution configuration_    
  
 That suggests you are specifying a Configuration in FB that isn’t defined in the solution?

---

<div class="post-metadata">

**Author:** ![deleted\_user](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/deleted_user/32/937_2.png) [@deleted\_user](https://www.finalbuilder.com/forums/u/deleted_user)\
**Post date:** [November 30, 2009, 12:48pm UTC](https://www.finalbuilder.com/forums/t/devenv-returns-error-the-first-argument-for-devenv-is-usually-a-solution-file/1390/3 "2009-11-30T12:48:46Z")

</div>

I checked 'All projects in solution' - where the solution is from a fileset iterator - but even before I introduced the fileset iterator it still gave the same message

---

<div class="post-metadata">

**Author:** ![deleted\_user](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/deleted_user/32/937_2.png) [@deleted\_user](https://www.finalbuilder.com/forums/u/deleted_user)\
**Post date:** [November 30, 2009, 12:56pm UTC](https://www.finalbuilder.com/forums/t/devenv-returns-error-the-first-argument-for-devenv-is-usually-a-solution-file/1390/4 "2009-11-30T12:56:21Z")

</div>

&nbsp;For Configuration I selected 'Debug|Any CPU' as was show in the drop down list. &nbsp;I have no idea what the configurations might be in the various projects I am trying to build - since I obtain the list of solutions from a search and don't want to have any prior knowledge of the individual configurations available

---

<div class="post-metadata">

**Author:** ![deleted\_user](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/deleted_user/32/937_2.png) [@deleted\_user](https://www.finalbuilder.com/forums/u/deleted_user)\
**Post date:** [November 30, 2009, 1:00am UTC](https://www.finalbuilder.com/forums/t/devenv-returns-error-the-first-argument-for-devenv-is-usually-a-solution-file/1390/5 "2009-11-30T01:00:59Z")

</div>

Here is another   
  
 Running C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE\[devenv.com](http://devenv.com) with parameters : /clean “Release|x86”/project “Source\MSVC.90\Logger.vcproj” “d:\continuous\_integration\src\lib\Logger\Logger\_MS\_2008.sln”   
  
  
 which I think should be:   
  
 Running C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE\[devenv.com](http://devenv.com) with parameters : “d:\continuous\_integration\src\lib\Logger\Logger\_MS\_2008.sln” /rebuild

---

<div class="post-metadata">

**Author:** ![Vincent](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/vincent/32/938_2.png) [@Vincent](https://www.finalbuilder.com/forums/u/Vincent)\
**Post date:** [November 30, 2009, 10:10am UTC](https://www.finalbuilder.com/forums/t/devenv-returns-error-the-first-argument-for-devenv-is-usually-a-solution-file/1390/6 "2009-11-30T10:10:25Z")

</div>

_Running C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE\devenv.com with parameters : /clean "Release|x86"/project "Source\MSVC.90\Logger.vcproj" "d:\continuous\_integration\src\lib\Logger\Logger\_MS\_2008.sln_

This suggests that you have the action set to Clean instead of Rebuild :

The fact that a project is specified on the command line along with a solution suggests that you are specifying that selected projects be built, in which case they are built one at a time. There is no way to tell deven to build selected projects, you can either build the entire solution or one project at a time.

![001_Action.jpg](https://www.finalbuilder.com/forums/uploads/default/original/2X/2/27b2dd042606610127c8af33a0761b0309ff9d45.jpeg)

---

<div class="post-metadata">

**Author:** ![deleted\_user](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/deleted_user/32/937_2.png) [@deleted\_user](https://www.finalbuilder.com/forums/u/deleted_user)\
**Post date:** [December 21, 2009, 10:58am UTC](https://www.finalbuilder.com/forums/t/devenv-returns-error-the-first-argument-for-devenv-is-usually-a-solution-file/1390/7 "2009-12-21T10:58:07Z")

</div>

Definitely selected ‘Build’   
  
 Here is the relevant log:   
  
 Solution d:\continuous\_integration\src\lib\WRXLP\_DLL\wrxlp\_MS\_2008.sln   
 MSBuild Properties   
 Configuration=“Debug”   
 Platform=“Any CPU”   
 Running C:\Windows\[Microsoft.NET](http://Microsoft.NET)\Framework\v3.5\MSBuild.exe with parameters : /t:Build /logger:FinalBuilderLogger,“C:\Program Files (x86)\FinalBuilder 6\FinalBuilder.MSBuild.Tasks.dll” /noconlog /p:Configuration=“Debug”;Platform=“Any CPU” /v:normal /m “d:\continuous\_integration\src\lib\WRXLP\_DLL\wrxlp\_MS\_2008.sln”   
 ------   
 Microsoft ® Build Engine Version 3.5.30729.1   
 [Microsoft .NET Framework, Version 2.0.50727.4200]   
 Copyright © Microsoft Corporation 2007. All rights reserved.   
 Target ValidateSolutionConfiguration   
 ERROR MSB4126 in d:\continuous\_integration\src\lib\WRXLP\_DLL\wrxlp\_MS\_2008.sln(0,0) : The specified solution configuration “Debug|Any CPU” is invalid. Please specify a valid solution configuration using the Configuration and Platform properties (e.g. MSBuild.exe Solution.sln /p:Configuration=Debug /p

---

<div class="post-metadata">

**Author:** ![paulsamways](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/p/e8c25b/32.png) [@paulsamways](https://www.finalbuilder.com/forums/u/paulsamways)\
**Post date:** [December 21, 2009, 10:19am UTC](https://www.finalbuilder.com/forums/t/devenv-returns-error-the-first-argument-for-devenv-is-usually-a-solution-file/1390/8 "2009-12-21T10:19:08Z")

</div>

Hi Paul,   
  
 \> For Configuration I selected ‘Debug|Any CPU’ as was show in the drop down list. I have no idea what the configurations might be in the various projects I am trying to build   
  
 This is the problem as not all projects have a ‘Debug|Any CPU’ configuration (for example, ‘wrxlp\_MS\_2008.sln’). If you want to iterate over solutions like this you’ll need to either make sure they all have ‘Debug|Any CPU’ or parse the solution file to pick a configuration for each solution.   
  
 Regards,   
 Paul.
