3

I am building my site with a web deployment project but the build fails with a number of errors all relating to the "#include virtual" directives in my master page.

The includes are necessary to import a set of centrally managed html template files.

Here is an example of the include directive and associated error:

<!-- #include virtual="/v3/sits/pdpdev/assets-templates/inc/head.html" -->

/PDPRegistration.csproj/Pages/ContentPage.Master(15): 
error ASPPARSE: Failed to map the path 
'/v3/sits/pdpdev/assets-templates/inc/head.html'.

The error for each included file actually appears multiple times. I'm not sure what is being mapped or why, but this was never a problem until I started using WDP (which I wanted to alter web.config depending on the build environment, among other things.)

The project is built locally on my PC and then copied to the web server via a mapped drive. I found a few solutions on the 'net involving IIS metabase - they weren't quite clear to me, and I'm not sure if they apply given how I build and deploy the project (that is, would I have to build on the same system as IIS in order to make use of the metabase?)

Can anyone suggest how I can get my project to build with WDP?

Raj Kaimal
  • 8,304
  • 27
  • 18
Matt
  • 1,041
  • 1
  • 16
  • 28
  • Is the checkbox that says "allow this precompiled site to be updatable" checked? http://i.msdn.microsoft.com/cc163448.fig01_L%28en-us%29.gif – Raj Kaimal May 19 '10 at 16:17
  • 1
    It was.. I just unchecked it and tried another build with the same result. – Matt May 19 '10 at 17:21

1 Answers1

0

Although SSI's are available within the Framework, the preferred way of doing include is to wrap the content from the file into a User Control (.ascx) as per the MSDN documentation See also: support.microsoft.com/kb/306575

immutabl
  • 6,857
  • 13
  • 45
  • 76