Visual Basic build error

My Visual Basic project is generating an error, not in the code itself, but in the project. When I enable "MSBuild project build verbosity" to "Detailed" I can see a large listing, with this section below that failed. There are no errors within the VBCode. The problem is how do I isolate which of the modules below is the actual cause of the build error?


  C:\Program Files (x86)\MSBuild\12.0\bin\Vbc.exe /noconfig /imports:Microsoft.VisualBasic,System,System.Collections,System.Collections.Generic,System.Data,System.Drawing,System.Diagnostics,System.Windows.Forms,System.Linq,System.Xml.Linq /optioncompare:Binary /optionexplicit+ /optionstrict:custom /nowarn:42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 /optioninfer+ /nostdlib /platform:x86 /rootnamespace:PayMonitor /sdkpath:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5" /highentropyva+ /doc:obj\x86\Release\PayMonitor.xml /define:"CONFIG=\"Release\",TRACE=-1,_MyType=\"WindowsForms\",PLATFORM=\"x86\"" /link:"C:\Program Files (x86)\Microsoft.NET\Primary Interop Assemblies\Microsoft.mshtml.dll",obj\x86\Release\Interop.SHDocVw.dll /reference:"C:\Program Files (x86)\ComponentOne\Studio for WinForms\bin\v2.0\C1.Win.C1Input.2.dll","C:\Program Files (x86)\ComponentOne\Studio for WinForms\bin\v2.0\C1.Win.C1List.2.dll",C:\ChilKat\ChilkatDotNet45.dll,"C:\Program Files (x86)\DevExpress 14.2\Components\Bin\Framework\DevExpress.Data.v14.2.dll","C:\Program Files (x86)\DevExpress 14.2\Components\Bin\Framework\DevExpress.Printing.v14.2.Core.dll","C:\Program Files (x86)\DevExpress 14.2\Components\Bin\Framework\DevExpress.Sparkline.v14.2.Core.dll","C:\Program Files (x86)\DevExpress 14.2\Components\Bin\Framework\DevExpress.Utils.v14.2.dll","C:\Program Files (x86)\DevExpress 14.2\Components\Bin\Framework\DevExpress.XtraEditors.v14.2.dll","C:\Users\DrSolveIT\Documents\Visual Studio 2013\Projects\GeckoFx\GeckoFx\Geckofx-Core.dll","C:\Users\DrSolveIT\Documents\Visual Studio 2013\Projects\GeckoFx\GeckoFx\Geckofx-Winforms.dll","C:\Program Files (x86)\MySQL\Connector NET 6.8.3\Assemblies\v4.5\MySql.Data.dll",E:\PayMonitor\bin\Release\SourceGrid.dll,"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.ComponentModel.DataAnnotations.dll","C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Configuration.dll","C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Core.dll","C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Data.DataSetExtensions.dll","C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Data.dll","C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Data.Linq.dll","C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Deployment.dll","C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Design.dll","C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.dll","C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Drawing.dll","C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Security.dll","C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Windows.Forms.dll","C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Xml.dll","C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Xml.Linq.dll" /main:PayMonitor.My.MyApplication /debug:pdbonly /filealign:512 /optimize+ /out:obj\x86\Release\PayMonitor.exe /subsystemversion:6.00 /resource:obj\x86\Release\PayMonitor.frmMain.resources /resource:obj\x86\Release\PayMonitor.frmOptions.resources /resource:obj\x86\Release\PayMonitor.Resources.resources /resource:obj\x86\Release\PayMonitor.exe.licenses /target:winexe /win32manifest:"My Project\app.manifest" ApplicationEvents.vb PayrollItem.vb BaseSite.vb PayderTimeTracking.vb PayTimeSync.vb Component1.Designer.vb Component1.vb frmMain.Designer.vb frmMain.vb frmOptions.Designer.vb frmOptions.vb FridayPayDay.vb "My Project\AssemblyInfo.vb" "My Project\Application.Designer.vb" "My Project\Resources.Designer.vb" "My Project\Settings.Designer.vb" Parse.vb Pay.vb "C:\Users\DrSolveIT\AppData\Local\Temp\.NETFramework,Version=v4.5.AssemblyAttributes.vb"
Done executing task "Vbc" -- FAILED.
Who is Participating?
Jacques Bourgeois (James Burger)PresidentCommented:
Some errors are not caused by the code, but by the compilation that comes before the application starts. When you see something with a problem with the build, it's something that occurs during compilation. The Error window is useless in such cases.

Is the stated missing file really missing in the indicated path?

Is PayMonitor.exe your application or is it something else? If it is something else, what is its relation with your application, what do you do with it. Is it referenced properly? If so, when you click on the file in the References window, is the CopyLocal property set to True in the Properties window?

If it is your application, what is the E: drive? This is not a standard or default path, so maybe there are some constraints that prevents you from writing to that drive. The OutputPath is were Visual Studio tries to compile your application. It is run from there when you are in Visual Studio. It will have problems if E:\PennySolver does not exists or is not available for some reason. There is also something I do not understand about that output path. The OutputPath is in the Debug sub-directory, but your verbose out seems to indicate that the compiler is working on the Release.

You can try changing the path where the application is compiled by going into the project's Properties window, last option in the Project menu. In the Compile tab, you can set the output path. Try another drive or directory. The default is usually bin\Debug. This compiles and run the application in a subdirectory of the project, so you are usually sure that this directory is readily accessible. And it does not cause problems when you move the code between computers. Something that references an E: drive can easily bomb when you move it, because an E: drive does not always exists, and if it does, it might be anything and not writable.

You say the problem appeared after adding a ListBox. Is this the standard ListBox or something custom or from a third party? If it is from a third party, adding it to the Form usually can have added references to your project. If the problem comes from that reference, you will still have it because while adding a control can add a reference, removing the control won't remove the reference. You can go in the References window, and click the Unused References button at the top of the window. If you see something listed, then remove it, it might correct your build problem.

I see a PayMonitor.exe.license file in your verbose output. License files usually come with third party components, and they can impose restrictions on the way that you work with the components. If this is the case here, you might contact your vendor about your problem.

Good luck. Luck is often necessary for that type of problem, because there are many possible causes, and the information we have to work with does not pinpoint precisely the source of the problem.
Jacques Bourgeois (James Burger)PresidentCommented:
It's almost impossible to understand a problem when all you have to work with is that kind of output.

This is the last place you will look, because you first need to have an idea of where you should be looking in that mess, which is impossible without first knowing the error message, and then, maybe, by looking at a less verbose output that is usually enough to understand what is happening.

So, what is the error message?
tolvorAuthor Commented:
"There were build errors. Would you like to continue and run the last successful build?" Selecting "yes" gives "Visual Studio cannot start debugging because the debug target 'E:\PennySolver\bin\Debug\PayMonitor.exe' is missing. Please build the project and retry, or set the OutputPath and AssemblyName properties appropriately to point at the correct location for the target assembly."

However the Error List does not show any errors in code. Researching this shows when this happens the issue is in the builder itself. (Ref (recommends deleting a registry key) and this (recommends deleting .suo files). I tried both and still get the error.

The only futher item I can provide is the full build output listing, but it doesn't really provide much info, the part of interest is where it is failing.

One further note... this program was working yesterday and I added one control to the project, a listbox, and the build failed. I removed the listbox, still failed. Went to the "Build" menu and selected "Clean Solution". Still failed. Rebooted. No help. Tried on a second computer. Still no.

Any suggestions would be appreciated.
"There were build errors. Would you like to continue and run the last successful build?"
this message doesn't come from build but when you try to start a program where the last build has failed. because of that the next message that there is no exe found is a logical consequence since before the build which probably had failed the "old" executable was deleted.

did i miss the statement from you that you tried to make a rebuild of your program? best would be a 'rebuild all' if that is available? if you do a rebuild, you must get any error message different to those already posted. if they are strange nevertheless (for example complaining about missing modules or system resources) you may reboot and try again.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.