SharedContent/ContentBuilder.cs
/// <summary>
/// Adds a new content file to the MSBuild project. The importer and
/// processor are optional: if you leave the importer null, it will
/// be autodetected based on the file extension, and if you leave the
/// processor null, data will be passed through without any processing.
/// </summary>
Adds a new content file to the MSBuild project. The importer and
processor are optional: if you leave the importer null, it will
be autodetected based on the file extension, and if you leave the
processor null, data will be passed through without any processing.
Adds a new content file to the MSBuild project . The importer and processor are optional : if you leave the importer null it will be autodetected based on the file extension and if you leave the processor null data will be passed through without any processing .
public void Add(string filename, string name, string importer, string processor)
        {
            BuildItem buildItem = msBuildProject.AddNewItem("Compile", filename);
            buildItem.SetMetadata("Link", Path.GetFileName(filename));
            buildItem.SetMetadata("Name", name);
            if (!string.IsNullOrEmpty(importer))
                buildItem.SetMetadata("Importer", importer);
            if (!string.IsNullOrEmpty(processor))
                buildItem.SetMetadata("Processor", processor);
        }
public void Add ( string filename , string name , string importer , string processor ) { BuildItem buildItem = msBuildProject . AddNewItem ( " " , filename ) ; buildItem . SetMetadata ( " " , Path . GetFileName ( filename ) ) ; buildItem . SetMetadata ( " " , name ) ; if ( ! string . IsNullOrEmpty ( importer ) ) buildItem . SetMetadata ( " " , importer ) ; if ( ! string . IsNullOrEmpty ( processor ) ) buildItem . SetMetadata ( " " , processor ) ; }
Adds a new content file to the MSBuild project.
Adds a new content file to the MSBuild project .
filename
string
name
string
importer
string
processor
string