protected SaveMSBuildProjectFileAs ( string newFileName ) : void | ||
newFileName | string | The new full path of the project file |
return | void |
protected virtual void SaveMSBuildProjectFileAs(string newFileName)
{
Debug.Assert(!string.IsNullOrEmpty(newFileName), "Cannot save project file for an empty or null file name");
buildProject.FullPath = newFileName;
FileName = newFileName;
var newFileNameWithoutExtension = Path.GetFileNameWithoutExtension(newFileName);
// Refresh solution explorer
SetProjectProperty(ProjectFileConstants.Name, newFileNameWithoutExtension);
// Saves the project file on disk.
buildProject.Save(newFileName);
}