public void UnloadedProjectDiscardsHostServices() { HostServices hostServices = new HostServices(); TestHostObject th = new TestHostObject(); ProjectCollection.GlobalProjectCollection.HostServices = hostServices; Project project1 = LoadDummyProject("foo.proj"); Project project2 = LoadDummyProject("foo.proj"); hostServices.RegisterHostObject(project1.FullPath, "test", "Message", th); ProjectCollection.GlobalProjectCollection.UnloadProject(project1); Assert.True(hostServices.HasInProcessHostObject(project2.FullPath)); ProjectCollection.GlobalProjectCollection.UnloadProject(project2); Assert.False(hostServices.HasInProcessHostObject(project2.FullPath)); }