Topic: Error - Could not copy built outputs to the Web
Share/Save/Bookmark
SYMPTOMS
In Microsoft Visual Studio .NET 2003, when you build a Web project that is several levels deeper than the root Web folder, the project does not compile. You may receive an error message in the output window that is similar to the following message:
Could not copy built outputs to the Web. Unable to add folder '../SubFolderLevelTwo' to Web project. Server error: '../SubFolderLevelTwo' does not refer to a page or folder in this web. It may be a page or folder in a subweb, or it could be a badly formed URL.
 
NOTE: You create the project in File Share mode.
 
CAUSE
This problem may occur when you create Web pages that are located more than one level under a virtual root entry in a local Microsoft Internet Information Services (IIS) Web site. When Visual Studio .NET 2003 builds the path, it concatenates the base path with the remaining URL. Visual Studio does not convert URL or forward slash characters ("/") to path or backward slash characters ("\"). This behavior causes downstream problems for code that expects backward slash marks.
 
RESOLUTION
A supported hotfix is now available from Microsoft, but it is only intended to correct the problem that is described in this article. Only apply it to systems that are experiencing this specific problem. This hotfix may receive additional testing. Therefore, if you are not severely affected by this problem, we recommend that you wait for the next Visual Studio .NET 2003 service pack that contains this hotfix.
 
To resolve this problem immediately, contact Microsoft Product Support Services to obtain the hotfix. For a complete list of Microsoft Product Support Services telephone numbers and information about support costs, visit the following Microsoft Web site:
http://support.microsoft.com/contactus/?ws=support
 
WORKAROUND
To work around this problem without using this hotfix, do not create projects that are more than two levels deep past the Web root in the folder. For example, if the C:\Inetpub\wwwroot\Level1 folder exists, you can successfully create a project at C:\Inentpub\wwwroot\Level1\Level2.
 
APPLIES TO
• Microsoft Visual Studio .NET 2003 Enterprise Architect
• Microsoft Visual Studio .NET 2003 Professional Edition
• Microsoft Visual Studio .NET 2003 Enterprise Developer