bmelt
2010-01-12 22:42:03 UTC
I use code like following and it works fine with VS 2005 and 2008:
foreach (Project prjo in GetApplicationObject().Solution.Projects)
{
VCProject prj = (VCProject)prjo.Object;
IVCCollection cfgs = (IVCCollection)prj.Configurations;
foreach (VCConfiguration c in cfgs)
{
c.Build();
}
}
With VS 2010 Beta 2, only first configuration get built, then
An unhandled exception of type 'System.InvalidOperationException' occurred
in SamplesTester.exe
Additional information: Cannot perform this operation while this is not the
active configuration in the project.
What should be changed to get it working with 2010?
Thanks!
-Boris
foreach (Project prjo in GetApplicationObject().Solution.Projects)
{
VCProject prj = (VCProject)prjo.Object;
IVCCollection cfgs = (IVCCollection)prj.Configurations;
foreach (VCConfiguration c in cfgs)
{
c.Build();
}
}
With VS 2010 Beta 2, only first configuration get built, then
An unhandled exception of type 'System.InvalidOperationException' occurred
in SamplesTester.exe
Additional information: Cannot perform this operation while this is not the
active configuration in the project.
What should be changed to get it working with 2010?
Thanks!
-Boris