How to use DocSiteTemplate.csproj to my solution?

Topics: General Questions
Aug 7, 2007 at 8:13 PM
I downloaded and installed Microsoft's Web Deployment Project Add-In. Then download the zip file of Then Unzip this file and create a website using folder CSharpDocSiteTemplate.

Then I try to add the project file CSharpDocSiteTemplate.csproj to my solution, I got the error said as:
Unable to read the project file 'CSharpDocSiteTemplate.csproj' ......

or the error: the operation can not be comleted.

How to solve this issue?
Aug 7, 2007 at 9:52 PM

You should use the latest installer from the Releases page and follow the instructions in the latest release notes, which you can find a link to on the Releases page and in the Wikimap.

Note: I'll be releasing 1.7.0 some time this week (possibly tonight even).

I assume that the .zip file was obtained by downloading the latest changeset from the Source Code page? It probably doesn't contain the latest source code anyway and there are a few things that need to be done before you can use DocProject.

The template must be installed in Visual Studio's templates directory, which differs for each language and flavor of VS, DocProject requires the Add-In to be installed and the DocProjectBuildPath environment variable to be set, and several of DocProject's assemblies must be installed in the GAC. You might also be missing some prerequisites on your system. The installer takes care of all of these requirements.

After DocProject is installed you can open your existing solution or create a new one, and then add a new project as you normally would by choosing one of the DocProject templates.
Aug 8, 2007 at 6:40 PM
I downloaded and install Sandcastle and DocProject. Now I can see Project Documentation and DocSite Web Application under My Templates in new project dialog box and I can add new project with template Project Documentation.
But I can add new project with template DocSite Web Application. The error message is:
C:\Documents and Settings\...\temp\Docsite1.csproj(117,11): The imported project "C:\Program files\MSBuild\Microsoft\VisualStudio\v8.0\WebApplications\Microsoft.WebApplication.targets" was not found. Confirm that the path in the <import> declaration is correct, and that the file exists on disk.

Also I can not open existing example \DocProject-24093\DaveSexton.DocProject\CSharpDocSiteTemplate. When I try to open this existing web site, VS try to upgrade this website firstly, then give me following message of converting:

Time of Conversion: August 8, 2007 14:38:28 PM

Project: CSharpDocSiteTemplate.csproj
Filename Status Errors Warnings
CSharpDocSiteTemplate.csproj:(Error List) 1 0
Conversion Issues - CSharpDocSiteTemplate.csproj:(Error List):
ERROR: Unable to parse project file CSharpDocSiteTemplate.csproj.

1 file Converted: 0
Not converted 1 1 0

Conversion Settings
Solution File: C:\Development\ACTRARRM\AJAX1.0\AjaxControlToolkit\AjaxControlToolkit.sln
Log Number: 4

Aug 8, 2007 at 7:35 PM

I'm glad to hear that you've installed DocProject.

1. Are you missing Visual Studio Service Pack 1?. Please read the latest release notes again since it lists all prerequiste software.
2. CSharpDocSiteTemplate, and the other template folders are not examples. They are the actual templates and cannot be opened in Visual Studio directly.

- Dave
Aug 9, 2007 at 5:17 PM
Thank you, Dave. After install VS Service Pack 1, I can add existing website from folder .....\DocProject-24093\DaveSexton.DocProject\CSharpDocSiteTemplate

But When I tried to build website, I got error as:
Error 1 Name cannot begin with the '$' character, hexadecimal value 0x24. Line 75, position 4. (C:\Development\...\DocProject-24093\DaveSexton.DocProject\CSharpDocSiteTemplate\web.config line 75)

This is because of the following tag in web.config file:

How to solve this issue?
Aug 9, 2007 at 6:39 PM

Do not use the templates in the Templates folder. CSharpDocSiteTemplate, and the other templates, cannot be added to Visual Studio as projects. They are not existing projects and are not examples. They are copies of the templates that have already been installed in Visual Studio for you.

To add a new DocSite to your solution follow the instructions in the Creating a DocSite-Quick Start tutorial. Here are the basic steps:

  1. Open an existing solution in Visual Studio.
  2. Go to File > Add > New Project...
  3. Expand the Visual C# node.
  4. Expand the DocProject node.
  5. Select the DocSite Web Application template.
Visual Studio will then create a new project for you based on the CSharpDocSiteTemplate.

- Dave