When you add MVC and Razor deployment dependencies I got a lot more assemblies than I expected. But I also get a load of XML files too. Namely:
- Microsoft.Web.Infrastructure.xml
- System.Web.Helpers.xml
- System.Web.Razor.xml
- System.Web.WebPages.Deployment.xml
- System.Web.WebPages.Razor.xml
- WebMatrix.Data.xml
- WebMatric.WebData.xml
What are these for? They don’t seem to be necessary for a deployed ASP.NET MVC and Razor site to work but I’d like to know what they’re for and why or if I actually do need them before I start telling people, “No, you definitely don’t need them to run MVC 3 apps.” Plus, I’m just interested.
Namespace.xmlfiles are documentation files. It contains whichever three slash comments you have on classes, methods, properties, …You can create from your files, for that go on
Project Settings > Build > XML Documentation File. It will extract///comments from your code to generate the documentation.Example:
Then if you send the DLL to someone they will not necessarily have the code, so they will not have this documentation and VS intelisense will not find any information about the method. With the XML file they can see the method information even without the code.
From MSDN:
To clarify these are not needed when deployed to you production servers.