Welcome to TechNet Blogs Sign in | Join | Help

Workaround for the "CMS" virtual directory problem with VS.NET 2005 (Update: 02.06.2006)

With VS.NET 2005 the VS.NET product team decided to change the behaviour of VS.NET for web applications. Up to VS.NET 2003 only virtual directories and files explicitly added to the projects were taken into consideration for the compilation.

With VS.NET 2005 all virtual directories and files are taken into consideration for compilation.

As the "CMS" virtual directory required by MCMS contains lots of ASCX and ASPX files VS.NET tries to compile these files as well - which leads to warnings.

Spencer already discussed a possible solution for this by using Webapplication projects - currently in beta - which allow to use the project model from VS.NET 2003 in VS.NET 2005.

A couple of days ago Andree H. pointed me to a much more elegant solution: VS.NET 2005 ignores all directories and files which are marked as hidden in the file system. So what is required to do is to set the hidden attribute for all physical directories inside the IIS_CMS directory.

After setting this hidden property VS.NET will compile much quicker and the warnings will not show up. In addition this method avoids using unsupported methods like using the web application projects.

Update: when hiding the directories you need to ensure that the content inside the directories is not hidden! So please choose the "Apply changes to this folder only" option in the confirmation dialog!

Published Tuesday, January 31, 2006 3:31 PM by Stefan_Gossner

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

Wednesday, February 01, 2006 2:03 AM by Alvis

# re: Workaround for the "CMS" virtual directory problem with VS.NET 2005

Its look like when other products made swift trasaction towards VS 2005 the CMS 2002 is just one painfull product to do much in this regard. Why not Microsoft simply let SPS v3 do the cleanup for this un sucessfull product
Wednesday, February 01, 2006 3:01 AM by Stefan_Gossner

# re: Workaround for the "CMS" virtual directory problem with VS.NET 2005

The problem here is VS.NET - not MCMS.
The behaviour of VS.NET changed in a way that it is no longer possible to exclude specific virtual directories easily.
As you can see in Spencers article the VS.NET team recognized the limitations of the current implementation of VS.NET 2005 and are working on a solution for this.
Wednesday, February 08, 2006 7:42 AM by Stefan_Gossner

# re: Workaround for the "CMS" virtual directory problem with VS.NET 2005

That is not correct!
Changing the CMS virtual directory into a web application will cause serious problems during authoring!

See here for details:
http://download.microsoft.com/download/4/2/5/4250f79a-c3a1-4003-9272-2404e92bb76a/MCMS+2002+-+(complete)+FAQ.htm#A68A7EBB-3DD3-42EC-96DC-0D6BBEB271D9

Cheers,
Stefan
Wednesday, February 08, 2006 3:00 PM by Mark Zak

# re: Workaround for the "CMS" virtual directory problem with VS.NET 2005

Just wanted to add a note that you must not cascade the hidden attribute down the directory tree as this causes 404 errors when MCMS tries to access the files contained within.
Sunday, February 12, 2006 2:00 PM by Andrew Connell [MVP MCMS]

# Microsoft Content Management Server 2002 Service Pack 2 Resources

Sunday, February 12, 2006 2:09 PM by Andrew Connell [MVP MCMS]

# Microsoft Content Management Server 2002 Service Pack 2 Resources

# Tech Talk PT » Blog Archive » Microsoft Content Management SP2

Monday, April 03, 2006 10:22 AM by Alastair

# re: Workaround for the "CMS" virtual directory problem with VS.NET 2005

This 'workaround' appears to break the Publish Website facility. Great.
Monday, April 03, 2006 11:32 AM by Stefan_Gossner

# re: Workaround for the "CMS" virtual directory problem with VS.NET 2005

Hi Alastair, seems you did not only apply this to the directories but also to all content inside these directories.
You should NOT apply this to the subdirectories.
Saturday, June 10, 2006 3:51 AM by Stefan Goßner

# ASP.NET 2.0 and MCMS article series

Now after MCMS 2002 SP2 has been released I would like to point you again to an article series I have...
Friday, July 28, 2006 6:08 PM by G

# re: Workaround for the "CMS" virtual directory problem with VS.NET 2005 (Update: 02.06.2006)

Works great for our current project w/o switching back and forth on IIS. Thanks!
Tuesday, November 14, 2006 2:41 PM by Philip

# re: Workaround for the "CMS" virtual directory problem with VS.NET 2005 (Update: 02.06.2006)

This does NOT work for me. I have set IIS_CMS to hidden but still the project builds with errors from the CMS folder. Here is the error:

Error 'Microsoft.ContentManagement.SharePoint.Dialogs.DialogBase' does not contain a definition for 'IDS_CSS_BACKGROUND1' c:\Program Files\Microsoft Content Management Server\Server\IIS_CMS\WssIntegration\Controls\DialogTitle.ascx 5

Tuesday, November 14, 2006 3:17 PM by PhilipS

# re: Workaround for the "CMS" virtual directory problem with VS.NET 2005 (Update: 02.06.2006)

I have to also set sub directory WssIntegration to hidden.

Wednesday, November 15, 2006 3:24 AM by Stefan_Gossner

# re: Workaround for the "CMS" virtual directory problem with VS.NET 2005 (Update: 02.06.2006)

Hi Philip, this is as expected.

You need to set the CONTENT of IIS_CMS to hidden - not IIS_CMS itself.

Wednesday, November 15, 2006 9:17 AM by Phil

# re: Workaround for the "CMS" virtual directory problem with VS.NET 2005 (Update: 02.06.2006)

Thanks Stefan,   I misread your post.

Leave a Comment

(required) 
required 
(required) 

  
Enter Code Here: Required
 
Page view tracker