View Single Post
  #1  
Old 10-28-2004, 08:43 AM
sodablue sodablue is online now
Registered User
 
Join Date: 04-30-2004
Posts: 2
Build failed, wasn't caught

I had a ASP.NET web project fail to build because the IIS service was shut down, and VS.NET couldn't connect the project to the virtual directory. This was with VS.NET 2002, and it didn't report an error instead just spitting out this message and exiting:

Unable to open Web project 'Host'. Unable to validate that the file path 'D:\src\Host' matches the URL path 'http://localhost/Host'. A connection with the server could not be established


I had checked on the option to parse build output, but apparently Visual Build(v5.5) doesn't look for this particular error.

I found a workaround, which was to put something in the StepDone event to check for this and throw an error if the step failed.

Function vbld_StepDone()

dim macros, macro, LastOutput
set macros =Application.Macros(vbldMacroAll )
set macro = macros.Item("LASTSTEP_OUTPUT")
LastOutput = macro.Value

If instr(1, LastOutput, "Unable to open Web project", 1) > 0 then
builder.LogMessage("Unable to open Web project")
Err.Raise 1, "", "Step failed"
end if

End Function

I thought I'd pass that tip along to others.
Reply With Quote