Not able to Build project using MSBuild
Asked by Kushal Raj:

Hi ,

When i try to build my project using MSBuild in Bamboo, the .dll file is not recognised and hence i get error saying that some variables are not defined.

But when i build my project separately using MSBuild in "Visual Studio 2008 Command Prompt" ,Build is successfull.

Please help .

Thanks in advance :)


Answers:
author: Gretchen
body: In case you didn't see my other post on the subject, do not expect msbuild to work the same as the IDE. The IDE does a lot of things for you that MSBuild does not. The IDE acts more like your mother and "fixes" things so everything is "nice" for you while the MSBuild executable does not. Sometimes you have to be more explicit with MSBuild. All those properties you set in the IDE by hand are not necessarily in the .csproj or .sln files by default.


author: Gretchen
body: Check your .csproj file and make sure that dll's are not excluded or alternately that the desired dll's are included in your build profile. We used to see this a lot with newly added image files and other things that the developers failed to include in their .csproj files. If you have them configured to pull from the local filesystem instead of from the repository file system they will fail on the bamboo build. We had a folder specified for "shared binaries" that contained all the binary files that were created by other projects for inclusion in the build.


author: Kushal Raj
body: |----------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| 05-Nov-2013 09:47:32 | D:\\bamboo-home\\xml-data\\build-dir\\BDG-BFTPSVC-JOB1\\modMainFunctions.vb(1803): warning BC42025: Access of shared member, constant member, enum member or nested type through an instance; qualifying expression will not be evaluated. |
| 05-Nov-2013 09:47:32 | D:\\bamboo-home\\xml-data\\build-dir\\BDG-BFTPSVC-JOB1\\BFTPSVC.vb(562): error BC30002: Type 'MailMessage' is not defined.                                                                                                                 |
| 05-Nov-2013 09:47:32 | D:\\bamboo-home\\xml-data\\build-dir\\BDG-BFTPSVC-JOB1\\BFTPSVC.vb(566): error BC30002: Type 'EmailAddress' is not defined.                                                                                                                |
| 05-Nov-2013 09:47:32 | D:\\bamboo-home\\xml-data\\build-dir\\BDG-BFTPSVC-JOB1\\BFTPSVC.vb(571): error BC30002: Type 'EmailAddress' is not defined.                                                                                                                |
| 05-Nov-2013 09:47:32 | D:\\bamboo-home\\xml-data\\build-dir\\BDG-BFTPSVC-JOB1\\BFTPSVC.vb(571): error BC30451: Name 'AddressType' is not declared.                                                                                                                |
| 05-Nov-2013 09:47:32 | D:\\bamboo-home\\xml-data\\build-dir\\BDG-BFTPSVC-JOB1\\BFTPSVC.vb(577): error BC30002: Type 'OpenSmtp.Mail.Smtp' is not defined.                                                                                                          |
| 05-Nov-2013 09:47:32 | D:\\bamboo-home\\xml-data\\build-dir\\BDG-BFTPSVC-JOB1\\modMainFunctions.vb(2071): error BC30002: Type 'MailMessage' is not defined.                                                                                                       |
| 05-Nov-2013 09:47:32 | D:\\bamboo-home\\xml-data\\build-dir\\BDG-BFTPSVC-JOB1\\modMainFunctions.vb(2077): error BC30002: Type 'EmailAddress' is not defined.                                                                                                      |
| 05-Nov-2013 09:47:32 | D:\\bamboo-home\\xml-data\\build-dir\\BDG-BFTPSVC-JOB1\\modMainFunctions.vb(2078): error BC30002: Type 'EmailAddress' is not defined.                                                                                                      |
| 05-Nov-2013 09:47:32 | D:\\bamboo-home\\xml-data\\build-dir\\BDG-BFTPSVC-JOB1\\modMainFunctions.vb(2078): error BC30451: Name 'AddressType' is not declared.                                                                                                      |
| 05-Nov-2013 09:47:32 | D:\\bamboo-home\\xml-data\\build-dir\\BDG-BFTPSVC-JOB1\\modMainFunctions.vb(2080): error BC30002: Type 'EmailAddress' is not defined.                                                                                                      |
| 05-Nov-2013 09:47:32 | D:\\bamboo-home\\xml-data\\build-dir\\BDG-BFTPSVC-JOB1\\modMainFunctions.vb(2086): error BC30002: Type 'EmailAddress' is not defined.                                                                                                      |
| 05-Nov-2013 09:47:32 | D:\\bamboo-home\\xml-data\\build-dir\\BDG-BFTPSVC-JOB1\\modMainFunctions.vb(2086): error BC30451: Name 'AddressType' is not declared.                                                                                                      |
| 05-Nov-2013 09:47:32 | D:\\bamboo-home\\xml-data\\build-dir\\BDG-BFTPSVC-JOB1\\modMainFunctions.vb(2091): error BC30002: Type 'EmailAddress' is not defined.                                                                                                      |
| 05-Nov-2013 09:47:32 | D:\\bamboo-home\\xml-data\\build-dir\\BDG-BFTPSVC-JOB1\\modMainFunctions.vb(2091): error BC30451: Name 'AddressType' is not declared.                                                                                                      |
| 05-Nov-2013 09:47:32 | D:\\bamboo-home\\xml-data\\build-dir\\BDG-BFTPSVC-JOB1\\modMainFunctions.vb(2100): error BC30002: Type 'OpenSmtp.Mail.Smtp' is not defined.                                                                                                |
| 05-Nov-2013 09:47:32 | D:\\bamboo-home\\xml-data\\build-dir\\BDG-BFTPSVC-JOB1\\modMainFunctions.vb(2394): error BC30002: Type 'MailMessage' is not defined.                                                                                                       |
| 05-Nov-2013 09:47:32 | D:\\bamboo-home\\xml-data\\build-dir\\BDG-BFTPSVC-JOB1\\modMainFunctions.vb(2412): error BC30002: Type 'EmailAddress' is not defined.                                                                                                      |
| 05-Nov-2013 09:47:32 | D:\\bamboo-home\\xml-data\\build-dir\\BDG-BFTPSVC-JOB1\\modMainFunctions.vb(2417): error BC30002: Type 'EmailAddress' is not defined.                                                                                                      |
| 05-Nov-2013 09:47:32 | D:\\bamboo-home\\xml-data\\build-dir\\BDG-BFTPSVC-JOB1\\modMainFunctions.vb(2417): error BC30451: Name 'AddressType' is not declared.                                                                                                      |
| 05-Nov-2013 09:47:32 | D:\\bamboo-home\\xml-data\\build-dir\\BDG-BFTPSVC-JOB1\\modMainFunctions.vb(2422): error BC30002: Type 'EmailAddress' is not defined.                                                                                                      |
| 05-Nov-2013 09:47:32 | D:\\bamboo-home\\xml-data\\build-dir\\BDG-BFTPSVC-JOB1\\modMainFunctions.vb(2422): error BC30451: Name 'AddressType' is not declared.                                                                                                      |
| 05-Nov-2013 09:47:32 | D:\\bamboo-home\\xml-data\\build-dir\\BDG-BFTPSVC-JOB1\\modMainFunctions.vb(2429): error BC30002: Type 'OpenSmtp.Mail.Smtp' is not defined.                                                                                                |
| 05-Nov-2013 09:47:32 | 31 Warning(s)                                                                                                                                                                                                                              |
| 05-Nov-2013 09:47:32 | 22 Error(s)                                                                                                                                                                                                                                |
| 05-Nov-2013 09:47:32 |                                                                                                                                                                                                                                            |
| 05-Nov-2013 09:47:32 | Time Elapsed 00:00:04.96                                                                                                                                                                                                                   |
| 05-Nov-2013 09:47:33 | Failing task since return code was 1 while expected 0                                                                                                                                                                                      |
| 05-Nov-2013 09:47:33 | Finished task 'BFTPSVC_Build'                                                                                                                                                                                                              |


author: Timothy
body: Screenshot?