Not able to Build project using MSBuild

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 :)

4 answers

This widget could not be displayed.
Timothy Chin Community Champion Nov 07, 2013

Screenshot?

This widget could not be displayed.
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'
This widget could not be displayed.

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.

This widget could not be displayed.

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.

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Tuesday in Jira

What modern development practices are at the heart of how your team delivers software?

Hey Community mates! Claire here from the Software Product Marketing team. We all know software development changes rapidly, and it's often tough to keep up. But from our research, we've found the h...

169 views 1 3
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you