Stefan Goßner

Senior Escalation Engineer for SharePoint Products and Technologies

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!