title: ASP.Net VirtualPathProvider and Visual Studio Intellisense
body: <p>I'm hoping someone can help me out with this annoyance.</p>
  
  <p>At work we have two independent website projects that share a common MasterPage. The MasterPage is embedded in a class library that both projects reference. We use a custom VirtualPathProvider that lets us reference the MasterPage in each project. This works fine at runtime/compiletime, but it breaks intellisense inside the aspx page markup. </p>
  
  <p>When I set the MasterPageFile property to "~/EmbeddedMasterPage.Master", Visual Studio shows a red squiggley error under it saying "Path not found", with a directory indicating that it's trying to find that file inside the website project(as opposed to the class library project). Since Visual Studio can't figure out where the MasterPage is, it's causing all of the intellisense to break. It won't show anything for the  tags. In fact, the only intellisense it will give me is for basic html tags. From Googling around, the only information I could find is that VS can't find the root html/head/body tags in the embedded MasterPage. I couldn't find a way to fix it, though.</p>
  
  <p>This happens in both Visual Studio 2008 and 2010. </p>
  
  <p><strong>Update(4/10/2011)</strong></p>
  
  <p>For the time being, I'm having to copy the embedded masterpage to the actual site project in order to get it to work. I set the file to not compile/copy and it works out ok.</p>