We recommend using Visual Studio 2017
This documentation is archived and is not being maintained.

How to: Use Reserved XML Characters in Project Files

When you author project files, you might need to use reserved XML characters, for example, in property values or in task parameter values. However, some reserved characters must be replaced by a named entity so that the project file can be parsed.

The following table describes the reserved XML characters that must be replaced by the corresponding named entity so that the project file can be parsed.

Reserved character

Named entity











To use double quotes in a project file

  • Replace the double quotes with the corresponding named entity, &quot;. For example, to place double quotes around the EXEFile item list, type:

    <Message Text="The output file is &quot;@(EXEFile)&quot;."/>

In the following code example, double quotes are used to highlight the file name in the message that is output by the project file.

<Project DefaultTargets="Compile"
    xmlns="http://schemas.microsoft.com/developer/msbuild/2003" >
    <!-- Set the application name as a property -->
    <!-- Specify the inputs -->
        <CSFile Include = "consolehwcs1.cs" />
    <Target Name = "Compile">
        <!-- Run the Visual C# compilation using input
        files of type CSFile -->
        <Csc Sources = "@(CSFile)">
            <!-- Set the OutputAssembly attribute of the CSC task
            to the name of the executable file that is created -->
                TaskParameter = "OutputAssembly"
                ItemName = "EXEFile"/>
        <!-- Log the file name of the output file -->
        <Message Text="The output file is &quot;@(EXEFile)&quot;."/>