PDA

View Full Version : Unable to build .NET Web apps


jcox
08-06-2003, 12:56 PM
Using VSS 6c, I can get the files on to my build system but if I try to build the Project I get:

The project you are trying to open is a Web project. You need to open it by specifying its URL path.
Process completed with exit code 1

If I build first in .NET and answer Yes to create the Web directory, it will build correctly. I am build from a CLEAN machine with no refs and no binaries. I should be able to build the project and create the binaries and save them to the localhost.

How can I capture the request to create the virtual directory in VBP so I can build from my Local VSS structure to the Local virtual directory then copy to the Web Farm?

JC

kinook
08-06-2003, 03:25 PM
One way to automate this is to create a virtual directory for the project before building it. This is demonstrated in the VStudio.bld sample (using the vbld_CreateVirtualDir system script function).

When building individual web projects, you need to specify the project filename as a URL, like it is stored in a SLN file (i.e., http://localhost/ProjectX/ProjectX.csproj), and this may require your IIS server to be updated to allow files with a .csproj extension to be retrieved. These issues don't apply when specifying the local filename of a .SLN file that contains the project.

fsolvsten
08-06-2004, 03:31 AM
I was hoping for such a solution too. Afterall we do need to able to make automated builds.

I have looked into the sample build script "VStudio.bld". Sorry guys but it does noe work for me! VStudio.bld ends with a "Build successfully completed." but it is not builded correctly. Scanning through the log the following it is seen that the build of CSWebApp failed. Extract of log inserted at bottom of post.

The problem seems to arise in the creation of the virtual directory. It just does not work as the ones created from the IDE. It is e.g. impossible to open the project with "Project From Web".

/Finn

Log:
Building project step 'Build VS.NET Projects'...
Step default property 'Filename' = 'C:\DOCUME~1\FSOLVS~1\LOCALS~1\Temp\VisBuildPro\VS tudio\work\Source\MyNETProjects.71.sln'
Pre-processing...
C:\DOCUME~1\FSOLVS~1\LOCALS~1\Temp\VisBuildPro\VSt udio\work\Source\NET\CPPNETApp\CPPNETApp.71.vcproj ...setting base address...
C:\DOCUME~1\FSOLVS~1\LOCALS~1\Temp\VisBuildPro\VSt udio\work\Source\NET\CSNETLib\CSNETLib.71.csproj.. .setting base address...
C:\DOCUME~1\FSOLVS~1\LOCALS~1\Temp\VisBuildPro\VSt udio\work\Source\NET\CSWebApp\CSWebApp.csproj...se tting base address...setting properties...
C:\DOCUME~1\FSOLVS~1\LOCALS~1\Temp\VisBuildPro\VSt udio\work\Source\NET\ManagedCPPApp\ManagedCPPApp.7 1.vcproj...setting base address...
C:\DOCUME~1\FSOLVS~1\LOCALS~1\Temp\VisBuildPro\VSt udio\work\Source\NET\VBNETApp\VBNETApp.71.vbproj.. .setting base address...

Building configuration 'Release'...

Microsoft (R) Development Environment Version 7.10.3077.
Copyright (C) Microsoft Corp 1984-2001. All rights reserved.

Visual Studio .NET cannot create or open the application. The likeliest problem is that required components are not installed on the local Web server. Run Visual Studio .NET setup and add the Web Development component.------ Skipped Build: Project: NETSetup, Configuration: Release ------

Project configuration skipped because it is not selected in this solution configuration

kinook
08-06-2004, 06:59 AM
This occurs only because the sample builds in the TEMP folder, whose value is provided as a short filename, and VS.NET thinks the virtual directory path is different than the project file's path (because it does an [invalid] comparison of a long filename to a short filename) and issues the error message. As long as you avoid performing your builds in the TEMP path (or change your TEMP path to something like c:\Temp) this shouldn't be a problem.

Another option for more robust automated builds of web applications is to avoid VS.NET web projects altogether: http://www.pluralsight.com/fritz/Samples/aspdotnet_without_web_projects.htm

fsolvsten
08-06-2004, 08:48 AM
I have just tried running the VStudio.bld again with TEMP set to C:\Temp. Slightly different failure but still a failue. Extract from the log file:

------ Skipped Build: Project: CSWebApp (unavailable) ------

Project configuration skipped because it is not loaded

I am stariting to wonder if my problems is related to the fact that I have WSE 2.0 installed, but then again why should it cause any problems in your sample build.

So far I believe the problem arises because the virtual directory do not have server extensions installed and Visual Studio 2003 seems to need these.

Thanks for the reference. I already had a printout of on my table as it also seems to be the best approach for me, but so far I have not been able to get it running. I still need a virtual directory and I seem unable to create it properly.

Ofcourse there is always hope for tomorrow
/Finn