Last post Jun 10, 2008 02:20 PM by jojobar
Jun 10, 2008 02:20 PM|jojobar|LINK
We have a solution containing a bunch of WAP projects. I have created a vs web deployment project to compile a project that has a bunch of user controls. Whatever I do I am always getting an error, it seems that there might ne some problems with setting
the SourceWebVirtualPath correctly. Here are the details:
The project is organized as follows:
|___ WAP Project : Main(at c:\main which is pointed in IIS so that http://localhost/main /default.aspx brings up this application)
|___ WAP Project : UserControl (at c:\main\usercontrol that contains a bunch of .ascx files, upon compilation the usercontrol.dll is copied to c:\main\bin
|___ WAP Project....
|___ Project ...
I created a web deployment project to compile the UserControl project, upon compilation it gives the following error:
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_compiler.exe -v /ocnew -p C:\officeclipnew\ocwap\UserControl -f -d .\TempBuildDir\
/ocnew/recurrence.ascx(3): error ASPPARSE: The file '/ocnew/UserControl/datetimeui.ascx' does not exist.
/ocnew/recurrence.ascx(140): error ASPPARSE: Unknown server tag 'OCTag:datetimeui'.
The following line is giving the error in recurrence.ascx:
<%@ Register TagPrefix="OCTag" tagname="datetimeui" src="~/UserControl/datetimeui.ascx" mce_src="~/UserControl/datetimeui.ascx" %>
and in the UserControl_csproj_deploy.wdproj file I found the following lines:
Note that the last line SourceWebVirtualPath is probably creating the problem when it hits the Register statement with src="~/UserControl..." mce_src="~/UserControl..."
So when it sees the ~ character it is looking to find the virtualpath and gives the error. If I change the statement to:
src="datetimeui.ascx" mce_src="datetimeui.ascx" everything works fine. However, this solution will not work as we have many wap projects like this having controls that depends on one another.
Without using web deployment project (means compile on demand) everything works fine as the ascx file is evaluated at run time and it hits the virtual directory correctly.
Is there a workaround? I tried changing various values for the better part of today but have not succeeded so far.
Thanks for your time
Web Deployment 2008
Error in VS 2005 Web Deployment Project