简体   繁体   中英

VS10 Generate Release Build from Debug Build

We have a large solution here, with several dozen projects. The only build configuration which has been maintained is the Debug. When switching to release, I get over 300 error messages, mainly:

"Error The type or namespace name 'XXX' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?) C:\\TFS\\...\\SomeClass.cs"

and a few

"Error Metadata file 'C:\\TFS\\...\\some.dll' could not be found SomeProject"

Is there a way to take the debug configuration completely, and generate a working release one? Preferably automatically/script based, to be done by build server for each release? Most projects are C#, with one or two in C++ or Managed C++ (these dont throw errors).

Could it be that those errors are coming from not building all the projects in the Release configuration?

Check this trough the Configuration Manager and see if all projects are selected to build for the Release configuration.

You can also create a new configuration and then select a configuration to inherit the settings from. Maybe you can create a copy of your debug configuration this way?

For automating a build, you can always use a combination of Powershell and MSBuild to script your build. If you have Team Foundation Server you can use TFS automated builds and publish them to a specified location.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM