Se crea un archivo de ejemplo & continuación refiriéndose a él se puede editar el archivo XML caso ".aspx": {
if ((File.ReadAllText((GlobalVariables.sDestinationPath).Trim() + "" + GlobalVariables.sProjName + "\\" + GlobalVariables.sProjName + projExtention).Contains("<Content Include=\"" + fileName1 + "\" />")) == false)
{
fileReader = File.ReadAllText(GlobalVariables.sDestinationPath + "" + GlobalVariables.sProjName + "\\" + GlobalVariables.sProjName + projExtention + "").Replace("<Content Include=\"Web.config\" />", "<Content Include=\"Web.config\" />" + "\n" + " <Content Include=\"" + fileName1 + "\" />");
File.WriteAllText(GlobalVariables.sDestinationPath.Trim() + "" + GlobalVariables.sProjName + "\\" + GlobalVariables.sProjName + projExtention + "", fileReader);
fileReader = File.ReadAllText(GlobalVariables.sDestinationPath.Trim() + "" + GlobalVariables.sProjName + "\\" + GlobalVariables.sProjName + projExtention + "").Replace("<Compile Include=\"" + pathfol + "\" />", "<Compile Include=\"" + pathfol + "\" />" + "\n" + " <Compile Include=\"" + fileName1 + ".vb\" > " + "\n" + " <DependentUpon>" + fileName1 + "</DependentUpon>" + "\n" + " <SubType>ASPXCodeBehind</SubType>" + "\n" + " </Compile>" + "\n" + " <Compile Include=\"" + fileName1 + ".designer.vb\">" + "\n" + " <DependentUpon>" + fileName1 + "</DependentUpon>" + "\n" + " </Compile> ");
File.WriteAllText(GlobalVariables.sDestinationPath.Trim() + "" + GlobalVariables.sProjName + "\\" + GlobalVariables.sProjName + projExtention + "", fileReader);
}
¿Cómo funciona la interacción de TFS? ¿Tienes algún enlace? –