Fixing project names to fix VS bugs

For whatever reason, Visual Studio throws a fit if a referenced project has a name
and the folder name (which is used to reference the project) is different than that name.
To solve this issue, I've renamed all the projects and folders to match their project
names as stated in the project.json.
This commit is contained in:
Benjamin Russell
2016-07-29 16:55:44 -07:00
parent bb0cd461b6
commit e83d2704b9
83 changed files with 5 additions and 5 deletions

View File

@@ -0,0 +1,86 @@
using System.IO;
using Microsoft.SqlTools.EditorServices.Utility;
namespace Microsoft.SqlTools.ServiceLayer.SqlContext
{
/// <summary>
/// Class for serialization and deserialization of the settings the SQL Tools Service needs.
/// </summary>
public class SqlToolsSettings
{
// TODO: Is this needed? I can't make sense of this comment.
// NOTE: This property is capitalized as 'SqlTools' because the
// mode name sent from the client is written as 'SqlTools' and
// JSON.net is using camelCasing.
//public ServiceHostSettings SqlTools { get; set; }
public SqlToolsSettings()
{
this.ScriptAnalysis = new ScriptAnalysisSettings();
}
public bool EnableProfileLoading { get; set; }
public ScriptAnalysisSettings ScriptAnalysis { get; set; }
public void Update(SqlToolsSettings settings, string workspaceRootPath)
{
if (settings != null)
{
this.EnableProfileLoading = settings.EnableProfileLoading;
this.ScriptAnalysis.Update(settings.ScriptAnalysis, workspaceRootPath);
}
}
}
/// <summary>
/// Sub class for serialization and deserialization of script analysis settings
/// </summary>
public class ScriptAnalysisSettings
{
public bool? Enable { get; set; }
public string SettingsPath { get; set; }
public ScriptAnalysisSettings()
{
this.Enable = true;
}
public void Update(ScriptAnalysisSettings settings, string workspaceRootPath)
{
if (settings != null)
{
this.Enable = settings.Enable;
string settingsPath = settings.SettingsPath;
if (string.IsNullOrWhiteSpace(settingsPath))
{
settingsPath = null;
}
else if (!Path.IsPathRooted(settingsPath))
{
if (string.IsNullOrEmpty(workspaceRootPath))
{
// The workspace root path could be an empty string
// when the user has opened a SqlTools script file
// without opening an entire folder (workspace) first.
// In this case we should just log an error and let
// the specified settings path go through even though
// it will fail to load.
Logger.Write(
LogLevel.Error,
"Could not resolve Script Analyzer settings path due to null or empty workspaceRootPath.");
}
else
{
settingsPath = Path.GetFullPath(Path.Combine(workspaceRootPath, settingsPath));
}
}
this.SettingsPath = settingsPath;
}
}
}
}