I have a VCProject and try to get the Platform from one of its Configurations.
I found the Visual Studio hangs at VCConfiguration.Platform, the rate is about 50% (5 out of 10 runs). The code isn't executed in the main thread. If there any specify care should I take to get property form a VCConfiguration instance? The version of Visual
Studio is 2010 Professional SP1.
Thanks for your help.
VCProject vcpj = (VCProject)info.project.Object; IVCCollection cfgs = (IVCCollection)vcpj.Configurations; foreach (VCConfiguration vcc in cfgs) { string configName = vcc.ConfigurationName; if (configName == "Debug") { VCPlatform vcPlatform = vcc.Platform; ...
The call stack from Visual Studio is:
[sleep、wait、or join]
mscorlib.dll!System.Threading.Monitor.Enter(object obj, ref bool lockTaken) + 0x14 byte
Microsoft.VisualStudio.Project.Framework.Implementation.dll!Microsoft.VisualStudio.Project.Framework.Implementation.MSBuildProjectCollectionXmlServiceImpl.AcquireGlobalLock(bool writeAccess, Microsoft.Build.Construction.ProjectRootElement
elementToChange) + 0x5e byte
Microsoft.VisualStudio.Project.Framework.Implementation.dll!Microsoft.VisualStudio.Project.Framework.Implementation.MSBuildProjectXmlContainerImpl.GlobalCheckout(bool writeAccess) + 0x19 byte
Microsoft.VisualStudio.Project.Framework.Implementation.dll!Microsoft.VisualStudio.Project.Framework.Implementation.MSBuildProjectServiceImpl.CheckoutProjectXmlWrapper(bool writeAccess) + 0x24 byte
Microsoft.VisualStudio.Project.Framework.Implementation.dll!Microsoft.VisualStudio.Project.Framework.Implementation.MSBuildProjectServiceImpl.GlobalCheckout(bool writeAccess) + 0x67 byte
Microsoft.VisualStudio.Project.Framework.Implementation.dll!Microsoft.VisualStudio.Project.Framework.Implementation.ConfiguredProjectImpl.ConfiguredProjectImpl(Microsoft.VisualStudio.Project.Framework.Implementation.UnconfiguredProjectImpl
unconfiguredProject, System.ComponentModel.Composition.Primitives.ComposablePartCatalog completeCatalog, System.ComponentModel.Composition.Hosting.CompositionContainer parentContainer, Microsoft.VisualStudio.Project.Framework.INTERNAL.VS2010ONLY.ProjectConfiguration
projectConfig, Microsoft.Build.Evaluation.Project project) + 0x217 byte
Microsoft.VisualStudio.Project.Framework.Implementation.dll!Microsoft.VisualStudio.Project.Framework.Implementation.UnconfiguredProjectImpl.LoadConfiguredProject(string name, System.Collections.Generic.IDictionary<string,string>
configurationProperties) + 0x1e5 byte
Microsoft.VisualStudio.Project.VisualC.VCProjectEngine.dll!Microsoft.VisualStudio.Project.VisualC.VCProjectEngine.VCConfigurationShim.InitializeWithEvaluation() + 0x97 byte
Microsoft.VisualStudio.Project.VisualC.VCProjectEngine.dll!Microsoft.VisualStudio.Project.VisualC.VCProjectEngine.VCConfigurationShim.PlatformShim.get() + 0x2d byte
Microsoft.VisualStudio.Project.VisualC.VCProjectEngine.dll!Microsoft.VisualStudio.Project.VisualC.VCProjectEngine.VCConfigurationShim.Platform.get() + 0x5 byte