Project.Save Method

Definition

Saves the project to the file system, if modified, using the default character encoding.

Overloads

Save()

Save the project to the file system, if dirty. Uses the default encoding.

Save(TextWriter)

Save the project to the provided TextWriter, whether or not it is dirty. Uses the encoding of the TextWriter. Clears the Dirty flag.

Save(String)

Save the project to the file system, if dirty or the path is different. Uses the default encoding.

Save(Encoding)

Save the project to the file system, if dirty.

Save(String, Encoding)

Save the project to the file system, if dirty or the path is different.

Save()

Source:
Project.cs

Save the project to the file system, if dirty. Uses the default encoding.

C#
public void Save();

Applies to

MSBuild 17 and other versions
Product Versions
MSBuild 15, 16, 17
MSBuild (.NET Core) 15, 16, 17

Save(TextWriter)

Source:
Project.cs

Save the project to the provided TextWriter, whether or not it is dirty. Uses the encoding of the TextWriter. Clears the Dirty flag.

C#
public void Save(System.IO.TextWriter writer);

Parameters

writer
TextWriter

The text writer to save the project to.

Applies to

MSBuild 17 and other versions
Product Versions
MSBuild 15, 16, 17
MSBuild (.NET Core) 15, 16, 17

Save(String)

Source:
Project.cs

Save the project to the file system, if dirty or the path is different. Uses the default encoding.

C#
public void Save(string path);

Parameters

path
String

The path to the project source code.

Applies to

MSBuild 17 and other versions
Product Versions
MSBuild 15, 16, 17
MSBuild (.NET Core) 15, 16, 17

Save(Encoding)

Source:
Project.cs

Save the project to the file system, if dirty.

C#
public void Save(System.Text.Encoding encoding);

Parameters

encoding
Encoding

The character encoding used to save the project.

Applies to

MSBuild 17 and other versions
Product Versions
MSBuild 15, 16, 17
MSBuild (.NET Core) 15, 16, 17

Save(String, Encoding)

Source:
Project.cs

Save the project to the file system, if dirty or the path is different.

C#
public void Save(string path, System.Text.Encoding encoding);

Parameters

path
String

The path to the project source code.

encoding
Encoding

The character encoding used to save the project.

Applies to

MSBuild 17 and other versions
Product Versions
MSBuild 15, 16, 17
MSBuild (.NET Core) 15, 16, 17