// virtual for testing public virtual void SaveConfig(XmlDocument contents) { Debug.Assert(contents != null, "contents is null"); var configFilePath = GetConfigPath(); Debug.Assert(configFilePath != null, "config project item does not exist"); try { _vsUtils.WriteCheckoutXmlFilesInProject(new Dictionary <string, object> { { configFilePath, contents } }); } catch (Exception e) { VsUtils.LogOutputWindowPaneMessage( _project, string.Format( CultureInfo.CurrentCulture, Resources.ConnectionManager_SaveXmlError, configFilePath, e.Message)); throw; } }