Asked By Sharon
12-Nov-09 05:16 AM
I want to change some project properties. But the project is under source
control (VSS).
I am using VS2008 pro.
So I am doing:
EnvDTE80.DTE2 dte =
(EnvDTE80.DTE2)Marshal.GetActiveObject("VisualStudio.DTE");
Projects projects = dte.Solution.Projects;
foreach( Project proj in projects )
{
if( proj.Name != string.Empty )
{
dte.SourceControl.CheckOutItem(proj.FileName);
foreach( Property prop in proj.Properties )
{
switch( prop.Name )
{
case "AssemblyOriginatorKeyFile":
prop.Value = "fmr.snk";
break;
case "SignAssembly":
c = true;
break;
default:
break;
}
}
}
}
But the line dte.SourceControl.CheckOutItem(proj.FileName) or the setting of
the prop.Value causes a CheckOut window to popup which waits for button
checkout to be clicked.
I wish the above code will be executed continuously with no user interference.
How can I accomplish that?
--
Thanks
Sharon