checkin bism norm

This commit is contained in:
Christian Wade 2017-06-30 19:03:33 -07:00
parent bec7efc1f6
commit 769310cce3
219 changed files with 55315 additions and 0 deletions

View File

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
</startup>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-9.0.0.0" newVersion="9.0.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>

View File

@ -0,0 +1,69 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{4C77E665-FA37-4793-8950-69AABD3DC626}</ProjectGuid>
<OutputType>Exe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>BismNormalizer.CommandLine</RootNamespace>
<AssemblyName>BismNormalizer</AssemblyName>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<SccProjectName>SAK</SccProjectName>
<SccLocalPath>SAK</SccLocalPath>
<SccAuxPath>SAK</SccAuxPath>
<SccProvider>SAK</SccProvider>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="BismNormalizer, Version=3.0.0.0, Culture=neutral, PublicKeyToken=aa6675aad991a644, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\BismNormalizer\bin\Release\BismNormalizer.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

View File

@ -0,0 +1,241 @@
using System;
using System.IO;
using System.Collections.Generic;
using System.Xml.Serialization;
using BismNormalizer.TabularCompare;
using BismNormalizer.TabularCompare.Core;
namespace BismNormalizer.CommandLine
{
class Program
{
private const int ERROR_SUCCESS = 0;
private const int ERROR_FILE_NOT_FOUND = 2;
private const int ERROR_BAD_ARGUMENTS = 160;
private const int ERROR_GENERIC_NOT_MAPPED = 1360;
private const int ERROR_NULL_REF_POINTER = 1780;
static int Main(string[] args)
{
string bsmnFile = null;
string logFile = null;
string scriptFile = null;
List<string> skipOptions = null;
StreamWriter writer = null;
Comparison _comparison = null;
try
{
#region Argument validation / help message
if (!(args?.Length > 0))
{
Console.WriteLine("No arguments received. Exiting.");
return ERROR_BAD_ARGUMENTS;
}
else if (args[0].ToLower() == "help" || args[0].ToLower() == "?" || args[0].ToLower() == "/?" || args[0].ToLower() == "/h" || args[0].ToLower() == "/help" || args[0].ToLower() == "-help" || args[0].ToLower() == "-h")
{
Console.WriteLine("");
Console.WriteLine(" BISM Normalizer Command-Line Utility");
Console.WriteLine("");
Console.WriteLine(" Executes BISM Normalizer in command-line mode, based on content of BSMN file");
Console.WriteLine("");
Console.WriteLine(" USAGE:");
Console.WriteLine("");
Console.WriteLine(" BismNormalizer.exe BsmnFile [/Log:LogFile] [/Script:ScriptFile] [/Skip:{MissingInSource | MissingInTarget | DifferentDefinitions}]");
Console.WriteLine("");
Console.WriteLine(" BsmnFile : Full path to the .bsmn file.");
Console.WriteLine("");
Console.WriteLine(" /Log:LogFile : All messages are output to the LogFile.");
Console.WriteLine("");
Console.WriteLine(" /Script:ScriptFile : Does not perform actual update to target database; instead, a deployment script is generated and stored to the ScriptFile.");
Console.WriteLine("");
Console.WriteLine(" /Skip:{MissingInSource | MissingInTarget | DifferentDefinitions} : Skip all objects that are missing in source/missing in target/with different definitions. Can pass a comma separated list of multiple skip options; e.g. 'MissingInSource,MissingInTarget,DifferentDefinitions'.");
Console.WriteLine("");
return ERROR_SUCCESS;
}
bsmnFile = args[0];
const string logPrefix = "/log:";
const string scriptPrefix = "/script:";
const string skipPrefix = "/skip:";
for (int i = 1; i < args.Length; i++)
{
if (args[i].Length >= logPrefix.Length && args[i].Substring(0, logPrefix.Length).ToLower() == logPrefix)
{
logFile = args[i].Substring(logPrefix.Length, args[i].Length - logPrefix.Length).Replace("\"", "");
}
else if (args[i].Length >= scriptPrefix.Length && args[i].Substring(0, scriptPrefix.Length).ToLower() == scriptPrefix)
{
scriptFile = args[i].Substring(scriptPrefix.Length, args[i].Length - scriptPrefix.Length).Replace("\"", "");
}
else if (args[i].Length >= skipPrefix.Length && args[i].Substring(0, skipPrefix.Length).ToLower() == skipPrefix)
{
skipOptions = new List<string>(args[i].Substring(skipPrefix.Length, args[i].Length - skipPrefix.Length).Split(','));
foreach (string skipOption in skipOptions)
{
if (!(skipOption == ComparisonObjectStatus.MissingInSource.ToString() || skipOption == ComparisonObjectStatus.MissingInTarget.ToString() || skipOption == ComparisonObjectStatus.DifferentDefinitions.ToString()))
{
Console.WriteLine($"Argument '{args[i]}' is invalid. Valid skip options are '{ComparisonObjectStatus.MissingInSource.ToString()}', '{ComparisonObjectStatus.MissingInTarget.ToString()}' or '{ComparisonObjectStatus.DifferentDefinitions.ToString()}'");
return ERROR_BAD_ARGUMENTS;
}
}
}
else
{
Console.WriteLine($"'{args[i]}' is not a valid argument.");
return ERROR_BAD_ARGUMENTS;
}
}
if (logFile != null)
{
// Attempt to open output file.
writer = new StreamWriter(logFile);
// Redirect output from the console to the file.
Console.SetOut(writer);
}
#endregion
if (!File.Exists(bsmnFile))
{
throw new FileNotFoundException($"File not found {bsmnFile}");
}
Console.WriteLine($"About to deserialize {bsmnFile}");
ComparisonInfo comparisonInfo = ComparisonInfo.DeserializeBsmnFile(bsmnFile);
Console.WriteLine();
if (comparisonInfo.ConnectionInfoSource.UseProject)
{
Console.WriteLine($"Source Project File: {comparisonInfo.ConnectionInfoSource.ProjectFile}");
}
else
{
Console.WriteLine($"Source Database: {comparisonInfo.ConnectionInfoSource.ServerName};{comparisonInfo.ConnectionInfoSource.DatabaseName}");
}
if (comparisonInfo.ConnectionInfoTarget.UseProject)
{
Console.WriteLine($"Target Project: {comparisonInfo.ConnectionInfoTarget.ProjectName}");
}
else
{
Console.WriteLine($"Target Database: {comparisonInfo.ConnectionInfoTarget.ServerName};{comparisonInfo.ConnectionInfoTarget.DatabaseName}");
}
Console.WriteLine();
Console.WriteLine("--Comparing ...");
_comparison = ComparisonFactory.CreateComparison(comparisonInfo);
_comparison.ValidationMessage += HandleValidationMessage;
_comparison.Connect();
_comparison.CompareTabularModels();
if (skipOptions != null)
{
foreach (string skipOption in skipOptions)
{
SetSkipOptions(skipOption, _comparison.ComparisonObjects);
}
}
Console.WriteLine("--Done");
Console.WriteLine();
Console.WriteLine("--Validating ...");
_comparison.ValidateSelection();
Console.WriteLine("--Done");
Console.WriteLine();
if (scriptFile != null)
{
Console.WriteLine("--Generating script ...");
//Generate script
File.WriteAllText(scriptFile, _comparison.ScriptDatabase());
Console.WriteLine($"Generated script '{scriptFile}'");
}
else
{
Console.WriteLine("--Updating ...");
//Update target database/project
_comparison.Update();
if (comparisonInfo.ConnectionInfoTarget.UseProject)
{
Console.WriteLine($"Applied changes to project {comparisonInfo.ConnectionInfoTarget.ProjectName}.");
}
else
{
Console.WriteLine($"Deployed changes to database {comparisonInfo.ConnectionInfoTarget.DatabaseName}.");
Console.WriteLine("Passwords have not been set for impersonation accounts (setting passwords is not supported in command-line mode). Ensure the passwords are set before processing.");
if (comparisonInfo.OptionsInfo.OptionProcessingOption != ProcessingOption.DoNotProcess)
{
Console.WriteLine("No processing has been done (processing is not supported in command-line mode).");
}
}
}
Console.WriteLine("--Done");
}
catch (FileNotFoundException exc)
{
Console.WriteLine("The following exception occurred:");
Console.WriteLine(exc.ToString());
return ERROR_FILE_NOT_FOUND;
}
catch (ArgumentNullException exc)
{
Console.WriteLine("The following exception occurred. Try re-saving the BSMN file from Visual Studio using latest version of BISM Normalizer to ensure all necessary properties are deserialized and stored in the file.");
Console.WriteLine();
Console.WriteLine(exc.ToString());
return ERROR_NULL_REF_POINTER;
}
catch (Exception exc)
{
Console.WriteLine("The following exception occurred:");
Console.WriteLine(exc.ToString());
return ERROR_GENERIC_NOT_MAPPED;
}
finally
{
if (writer != null)
{
writer.Close();
}
if (_comparison != null)
{
_comparison.Disconnect();
}
}
return ERROR_SUCCESS;
}
private static void SetSkipOptions(string skipOption, List<ComparisonObject> comparisonObjects)
{
foreach (ComparisonObject comparisonObj in comparisonObjects)
{
if ( ((skipOption == ComparisonObjectStatus.MissingInSource.ToString() && comparisonObj.Status == ComparisonObjectStatus.MissingInSource) ||
(skipOption == ComparisonObjectStatus.MissingInTarget.ToString() && comparisonObj.Status == ComparisonObjectStatus.MissingInTarget) ||
(skipOption == ComparisonObjectStatus.DifferentDefinitions.ToString() && comparisonObj.Status == ComparisonObjectStatus.DifferentDefinitions)
) && comparisonObj.MergeAction != MergeAction.Skip
)
{
comparisonObj.MergeAction = MergeAction.Skip;
string objectName = (string.IsNullOrEmpty(comparisonObj.SourceObjectName) ? comparisonObj.TargetObjectName : comparisonObj.SourceObjectName).TrimStart();
Console.WriteLine($"Skip due to /Skip argument {skipOption} on {comparisonObj.ComparisonObjectType.ToString()} object {objectName}");
}
SetSkipOptions(skipOption, comparisonObj.ChildComparisonObjects);
}
}
private static void HandleValidationMessage(object sender, ValidationMessageEventArgs e)
{
Console.WriteLine($"{e.ValidationMessageStatus.ToString()} Message for {e.ValidationMessageType.ToString()}: {e.Message}");
}
}
}

View File

@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Bism Normalizer Command Line")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Bism Normalizer")]
[assembly: AssemblyProduct("BismNormalizerCommandLine")]
[assembly: AssemblyCopyright("Bism Normalizer")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("4c77e665-fa37-4793-8950-69aabd3dc626")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("4.0.0.11")]
[assembly: AssemblyFileVersion("4.0.0.11")]

View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="MSBuild.Extension.Pack" version="1.8.0" targetFramework="net452" />
</packages>

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1"/>
</startup>
</configuration>

View File

@ -0,0 +1,67 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{849693FC-AD82-4323-8A96-D6A0F6D97566}</ProjectGuid>
<OutputType>Exe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>BismNormalizer.IconSetup</RootNamespace>
<AssemblyName>BismNormalizer.IconSetup</AssemblyName>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<SccProjectName>SAK</SccProjectName>
<SccLocalPath>SAK</SccLocalPath>
<SccAuxPath>SAK</SccAuxPath>
<SccProvider>SAK</SccProvider>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup>
<ApplicationManifest>app.manifest</ApplicationManifest>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
<None Include="app.manifest" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

View File

@ -0,0 +1,101 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.IO;
using Microsoft.Win32;
namespace BismNormalizer.IconSetup
{
class Program
{
[System.Runtime.InteropServices.DllImport("shell32.dll")]
private static extern int SHChangeNotify(int eventId, int flags, IntPtr item1, IntPtr item2);
const string _extension = ".bsmn";
const string _progId = "BismNormalizer.BismNormalizerPackage";
static void Main(string[] args)
{
try
{
string exeFullName = System.Reflection.Assembly.GetExecutingAssembly().Location;
//Copy icon to program files
string iconFullName = Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles) + "\\BISM Normalizer";
CreateDirIfNecessary(iconFullName);
iconFullName += "\\Icon";
CreateDirIfNecessary(iconFullName);
iconFullName += "\\Package.ico";
if (!File.Exists(iconFullName))
{
File.Copy(exeFullName.Replace("BismNormalizer.IconSetup.exe", "Resources\\Package.ico"), iconFullName);
}
//----------------------
//Find VS install path and create dos command
string vsVersion = "14.0";
if (exeFullName.Contains("VisualStudio"))
{
int endVsChar = exeFullName.LastIndexOf("VisualStudio") + 13;
if (exeFullName.Length > endVsChar + 4)
{
string candidateVsVersion = exeFullName.Substring(endVsChar, 4);
decimal vsVersionDecimal;
if (decimal.TryParse(candidateVsVersion, out vsVersionDecimal))
{
vsVersion = candidateVsVersion;
}
}
}
string command = "\"" + (String)Registry.GetValue(String.Format("HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\" + vsVersion), "InstallDir", "") + "devenv.exe\" \"%1\"";
//Console.WriteLine("VS Install Path: " + vsInstallPath);
RegistryKey fileReg = Registry.ClassesRoot.CreateSubKey(".bsmn");
fileReg.SetValue("", _progId);
fileReg.CreateSubKey("DefaultIcon").SetValue("", iconFullName);
fileReg.CreateSubKey("PerceivedType").SetValue("", "Text");
RegistryKey appReg = Registry.ClassesRoot.CreateSubKey(_progId);
appReg.SetValue("", "BISM Normalizer file");
appReg.CreateSubKey("DefaultIcon").SetValue("", iconFullName);
RegistryKey shell = appReg.CreateSubKey("Shell");
shell.CreateSubKey("open").CreateSubKey("command").SetValue("", command);
shell.CreateSubKey("edit").CreateSubKey("command").SetValue("", command);
fileReg.Close();
appReg.Close();
shell.Close();
RegistryKey appAssoc = Registry.CurrentUser.CreateSubKey("Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\FileExts\\.bsmn");
appAssoc.CreateSubKey("UserChoice").SetValue("Progid", _progId, RegistryValueKind.String);
appAssoc.Close();
SHChangeNotify(0x8000000, 0x1000, IntPtr.Zero, IntPtr.Zero);
Console.WriteLine("Set up of icon complete. Re-open Visual Studio to see the icon in Solution Explorer. Can also open .bsmn files from Windows Explorer.");
}
catch (Exception exc)
{
Console.WriteLine("Exception occurred:");
Console.WriteLine(exc.Message);
}
finally
{
Console.WriteLine();
Console.WriteLine("Press any key to exit");
Console.ReadKey();
}
}
private static void CreateDirIfNecessary(string targetDir)
{
if (!Directory.Exists(targetDir))
{
Directory.CreateDirectory(targetDir);
}
}
}
}

View File

@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Bism Normalizer IconSetup")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Bism Normalizer")]
[assembly: AssemblyProduct("BismNormalizerIconSetup")]
[assembly: AssemblyCopyright("Bism Normalizer")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("d7cfb625-abcb-4ea4-899e-7d16196a6776")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("4.0.0.11")]
[assembly: AssemblyFileVersion("4.0.0.11")]

View File

@ -0,0 +1,58 @@
<?xml version="1.0" encoding="utf-8"?>
<asmv1:assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1" xmlns:asmv1="urn:schemas-microsoft-com:asm.v1" xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<assemblyIdentity version="1.0.0.0" name="MyApplication.app"/>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
<security>
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
<!-- UAC Manifest Options
If you want to change the Windows User Account Control level replace the
requestedExecutionLevel node with one of the following.
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
<requestedExecutionLevel level="highestAvailable" uiAccess="false" />
Specifying requestedExecutionLevel node will disable file and registry virtualization.
If you want to utilize File and Registry Virtualization for backward
compatibility then delete the requestedExecutionLevel node.
-->
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
</requestedPrivileges>
</security>
</trustInfo>
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
<application>
<!-- A list of all Windows versions that this application is designed to work with.
Windows will automatically select the most compatible environment.-->
<!-- If your application is designed to work with Windows Vista, uncomment the following supportedOS node-->
<!--<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"></supportedOS>-->
<!-- If your application is designed to work with Windows 7, uncomment the following supportedOS node-->
<!--<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>-->
<!-- If your application is designed to work with Windows 8, uncomment the following supportedOS node-->
<!--<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"></supportedOS>-->
<!-- If your application is designed to work with Windows 8.1, uncomment the following supportedOS node-->
<!--<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/>-->
</application>
</compatibility>
<!-- Enable themes for Windows common controls and dialogs (Windows XP and later) -->
<!-- <dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.0.0"
processorArchitecture="*"
publicKeyToken="6595b64144ccf1df"
language="*"
/>
</dependentAssembly>
</dependency>-->
</asmv1:assembly>

View File

@ -0,0 +1,129 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{3AE5D06F-A054-4AD1-83A9-9F0B8B1FC0B4}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>BismNormalizer.Tests</RootNamespace>
<AssemblyName>BismNormalizer.Tests</AssemblyName>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
<ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\$(VisualStudioVersion)\UITestExtensionPackages</ReferencePath>
<IsCodedUITest>False</IsCodedUITest>
<TestProjectType>UnitTest</TestProjectType>
<SccProjectName>SAK</SccProjectName>
<SccLocalPath>SAK</SccLocalPath>
<SccAuxPath>SAK</SccAuxPath>
<SccProvider>SAK</SccProvider>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.AnalysisServices, Version=13.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>C:\Program Files (x86)\Microsoft SQL Server\130\SDK\Assemblies\Microsoft.AnalysisServices.DLL</HintPath>
</Reference>
<Reference Include="Microsoft.AnalysisServices.Core, Version=13.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>C:\Program Files (x86)\Microsoft SQL Server\130\SDK\Assemblies\Microsoft.AnalysisServices.Core.DLL</HintPath>
</Reference>
<Reference Include="Microsoft.AnalysisServices.Tabular, Version=13.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>C:\Program Files (x86)\Microsoft SQL Server\130\SDK\Assemblies\Microsoft.AnalysisServices.Tabular.DLL</HintPath>
</Reference>
<Reference Include="System" />
</ItemGroup>
<Choose>
<When Condition="('$(VisualStudioVersion)' == '10.0' or '$(VisualStudioVersion)' == '') and '$(TargetFrameworkVersion)' == 'v3.5'">
<ItemGroup>
<Reference Include="Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=10.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" />
</ItemGroup>
</When>
<Otherwise>
<ItemGroup>
<Reference Include="Microsoft.VisualStudio.QualityTools.UnitTestFramework" />
</ItemGroup>
</Otherwise>
</Choose>
<ItemGroup>
<Compile Include="BismNormalizerTests.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="CreateDbsRunBSMN.bat">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="DeleteDbs.bat">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Test1103.bsmn">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Test1103_Source.xmla">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Test1103_Target.xmla">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Test1200.bsmn">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Test1200_Source.xmla">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Test1200_Target.xmla">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="TestPrep.ps1">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<Choose>
<When Condition="'$(VisualStudioVersion)' == '10.0' And '$(IsCodedUITest)' == 'True'">
<ItemGroup>
<Reference Include="Microsoft.VisualStudio.QualityTools.CodedUITestFramework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<Private>False</Private>
</Reference>
<Reference Include="Microsoft.VisualStudio.TestTools.UITest.Common, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<Private>False</Private>
</Reference>
<Reference Include="Microsoft.VisualStudio.TestTools.UITest.Extension, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<Private>False</Private>
</Reference>
<Reference Include="Microsoft.VisualStudio.TestTools.UITesting, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<Private>False</Private>
</Reference>
</ItemGroup>
</When>
</Choose>
<Import Project="$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets" Condition="Exists('$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets')" />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

View File

@ -0,0 +1,68 @@
using System;
using System.IO;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System.Diagnostics;
using Amo=Microsoft.AnalysisServices;
using Tom=Microsoft.AnalysisServices.Tabular;
namespace BismNormalizer.Tests
{
[TestClass]
public class BismNormalizerTests
{
[ClassInitialize]
public static void InitializeDbs(TestContext testContext)
{
ExecBatFile("CreateDbsRunBSMN.bat");
}
[ClassCleanup]
public static void CleanupDbs()
{
ExecBatFile("DeleteDbs.bat");
}
[TestMethod]
public void TableCount1103()
{
using (Amo.Server server = new Amo.Server())
{
server.Connect("localhost");
Amo.Database db = server.Databases.FindByName("Test1103_Target");
Assert.IsNotNull(db);
Assert.AreEqual(3, db.Cubes[0].Dimensions.Count);
server.Disconnect();
}
}
[TestMethod]
public void TableCount1200()
{
using (Tom.Server server = new Tom.Server())
{
server.Connect("localhost");
Tom.Database db = server.Databases.FindByName("Test1200_Target");
Assert.IsNotNull(db);
Assert.AreEqual(6, db.Model.Tables.Count);
server.Disconnect();
}
}
private static void ExecBatFile(string batFileName)
{
Assert.IsTrue(File.Exists(batFileName));
Process proc = new Process();
proc.StartInfo.UseShellExecute = false;
proc.StartInfo.RedirectStandardOutput = true;
proc.StartInfo.FileName = batFileName;
proc.Start();
Console.WriteLine(proc.StandardOutput.ReadToEnd());
proc.WaitForExit();
Assert.AreEqual(proc.ExitCode, 0);
}
}
}

View File

@ -0,0 +1,13 @@
Powershell.exe -Command Set-ExecutionPolicy Unrestricted
Powershell.exe .\TestPrep.ps1
echo About to run Test1103.bsmn ...
.\..\..\..\BismNormalizer.CommandLine\bin\Release\BismNormalizer.exe Test1103.bsmn
if %ERRORLEVEL% gtr 0 exit /b %ERRORLEVEL%
echo About to run Test1200.bsmn ...
.\..\..\..\BismNormalizer.CommandLine\bin\Release\BismNormalizer.exe Test1200.bsmn
exit /b %ERRORLEVEL%

View File

@ -0,0 +1 @@
Powershell.exe .\TestPrep.ps1 -DeleteOnly

View File

@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("BismNormalizer.Tests")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Microsoft Corporation")]
[assembly: AssemblyProduct("BismNormalizer.Tests")]
[assembly: AssemblyCopyright("Copyright © Microsoft Corporation 2016")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("3ae5d06f-a054-4ad1-83a9-9f0b8b1fc0b4")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("3.1.0.23")]
[assembly: AssemblyFileVersion("3.1.0.23")]

View File

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
<ComparisonInfo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<ConnectionInfoSource>
<UseProject>false</UseProject>
<ServerName>localhost</ServerName>
<DatabaseName>Test1103_Source</DatabaseName>
</ConnectionInfoSource>
<ConnectionInfoTarget>
<UseProject>false</UseProject>
<ServerName>localhost</ServerName>
<DatabaseName>Test1103_Target</DatabaseName>
</ConnectionInfoTarget>
<OptionsInfo>
<OptionPerspectives>true</OptionPerspectives>
<OptionMergePerspectives>true</OptionMergePerspectives>
<OptionCultures>true</OptionCultures>
<OptionMergeCultures>true</OptionMergeCultures>
<OptionRoles>true</OptionRoles>
<OptionPartitions>false</OptionPartitions>
<OptionMeasureDependencies>true</OptionMeasureDependencies>
<OptionProcessingOption>Default</OptionProcessingOption>
<OptionAffectedTables>false</OptionAffectedTables>
</OptionsInfo>
<SkipSelections />
</ComparisonInfo>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,26 @@
<?xml version="1.0" encoding="utf-8"?>
<ComparisonInfo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<ConnectionInfoSource>
<UseProject>false</UseProject>
<ServerName>localhost</ServerName>
<DatabaseName>Test1200_Source</DatabaseName>
<ProjectName>Tabular1200</ProjectName>
</ConnectionInfoSource>
<ConnectionInfoTarget>
<UseProject>false</UseProject>
<ServerName>localhost</ServerName>
<DatabaseName>Test1200_Target</DatabaseName>
</ConnectionInfoTarget>
<OptionsInfo>
<OptionPerspectives>true</OptionPerspectives>
<OptionMergePerspectives>true</OptionMergePerspectives>
<OptionCultures>true</OptionCultures>
<OptionMergeCultures>true</OptionMergeCultures>
<OptionRoles>true</OptionRoles>
<OptionPartitions>false</OptionPartitions>
<OptionMeasureDependencies>true</OptionMeasureDependencies>
<OptionProcessingOption>Default</OptionProcessingOption>
<OptionAffectedTables>false</OptionAffectedTables>
</OptionsInfo>
<SkipSelections />
</ComparisonInfo>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,46 @@
Function script:deletedb($databasename)
{
$dbstring=$server.Databases |select-object name| select-string -simplematch $databasename
if ($dbstring)
{
$db=$server.databases.item($databasename)
$db.drop()
Write-host "Deleted " $databasename
}
else
{
Write-host "Database " $databasename " DOES NOT exist"
}
}
[Reflection.Assembly]::LoadWithPartialName("Microsoft.AnalysisServices") >$NULL
$server = New-Object Microsoft.AnalysisServices.Server
$server.connect("localhost")
deletedb "Test1103_Source"
deletedb "Test1103_Target"
deletedb "Test1200_Source"
deletedb "Test1200_Target"
if (!($args.Length -eq 1 -and $args[0] -eq "-DeleteOnly"))
{
$scriptcontent = Get-Content .\Test1103_Source.xmla
$server.Execute($scriptcontent)
Write-host "Created Test1103_Source"
$scriptcontent = Get-Content .\Test1103_Target.xmla
$server.Execute($scriptcontent)
Write-host "Created Test1103_Target"
$scriptcontent = Get-Content .\Test1200_Source.xmla
$server.Execute($scriptcontent)
Write-host "Created Test1200_Source"
$scriptcontent = Get-Content .\Test1200_Target.xmla
$server.Execute($scriptcontent)
Write-host "Created Test1200_Target"
}
# Clean up
$server.Disconnect()
Write-host ""
Write-host "Disconnected"

View File

@ -0,0 +1,40 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.25420.1
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BismNormalizer", "BismNormalizer\BismNormalizer.csproj", "{E54D1347-06AE-41AC-A750-5BF8ECC80EC5}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BismNormalizer.CommandLine", "BismNormalizer.CommandLine\BismNormalizer.CommandLine.csproj", "{4C77E665-FA37-4793-8950-69AABD3DC626}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BismNormalizer.IconSetup", "BismNormalizer.IconSetup\BismNormalizer.IconSetup.csproj", "{849693FC-AD82-4323-8A96-D6A0F6D97566}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BismNormalizer.Tests", "BismNormalizer.Tests\BismNormalizer.Tests.csproj", "{3AE5D06F-A054-4AD1-83A9-9F0B8B1FC0B4}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{E54D1347-06AE-41AC-A750-5BF8ECC80EC5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E54D1347-06AE-41AC-A750-5BF8ECC80EC5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E54D1347-06AE-41AC-A750-5BF8ECC80EC5}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E54D1347-06AE-41AC-A750-5BF8ECC80EC5}.Release|Any CPU.Build.0 = Release|Any CPU
{4C77E665-FA37-4793-8950-69AABD3DC626}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4C77E665-FA37-4793-8950-69AABD3DC626}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4C77E665-FA37-4793-8950-69AABD3DC626}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4C77E665-FA37-4793-8950-69AABD3DC626}.Release|Any CPU.Build.0 = Release|Any CPU
{849693FC-AD82-4323-8A96-D6A0F6D97566}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{849693FC-AD82-4323-8A96-D6A0F6D97566}.Debug|Any CPU.Build.0 = Debug|Any CPU
{849693FC-AD82-4323-8A96-D6A0F6D97566}.Release|Any CPU.ActiveCfg = Release|Any CPU
{849693FC-AD82-4323-8A96-D6A0F6D97566}.Release|Any CPU.Build.0 = Release|Any CPU
{3AE5D06F-A054-4AD1-83A9-9F0B8B1FC0B4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3AE5D06F-A054-4AD1-83A9-9F0B8B1FC0B4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3AE5D06F-A054-4AD1-83A9-9F0B8B1FC0B4}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3AE5D06F-A054-4AD1-83A9-9F0B8B1FC0B4}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

View File

@ -0,0 +1,524 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="12.0">
<PropertyGroup>
<MinimumVisualStudioVersion>15.0</MinimumVisualStudioVersion>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">12.0</VisualStudioVersion>
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
<SccProjectName>SAK</SccProjectName>
<SccLocalPath>SAK</SccLocalPath>
<SccAuxPath>SAK</SccAuxPath>
<SccProvider>SAK</SccProvider>
<FileUpgradeFlags>
</FileUpgradeFlags>
<UpgradeBackupLocation>
</UpgradeBackupLocation>
<OldToolsVersion>12.0</OldToolsVersion>
<TargetFrameworkProfile />
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
<UpdateEnabled>false</UpdateEnabled>
<UpdateMode>Foreground</UpdateMode>
<UpdateInterval>7</UpdateInterval>
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<IsWebBootstrapper>false</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup>
<PropertyGroup>
<DelaySign>false</DelaySign>
</PropertyGroup>
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{E54D1347-06AE-41AC-A750-5BF8ECC80EC5}</ProjectGuid>
<ProjectTypeGuids>{82b43b9b-a64c-4715-b499-d71e9ca2bd60};{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>BismNormalizer</RootNamespace>
<AssemblyName>BismNormalizer</AssemblyName>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>Key.snk</AssemblyOriginatorKeyFile>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<RunRegRiched>true</RunRegRiched>
<RunCodeAnalysis>true</RunCodeAnalysis>
<DocumentationFile>
</DocumentationFile>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DelaySign>true</DelaySign>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<RunCodeAnalysis>true</RunCodeAnalysis>
<RunRegRiched>true</RunRegRiched>
</PropertyGroup>
<ItemGroup>
<Reference Include="envdte, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<EmbedInteropTypes>False</EmbedInteropTypes>
</Reference>
<Reference Include="envdte80, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<EmbedInteropTypes>False</EmbedInteropTypes>
</Reference>
<Reference Include="Microsoft.AnalysisServices, Version=14.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>C:\Program Files (x86)\Microsoft SQL Server\140\SDK\Assemblies\Microsoft.AnalysisServices.DLL</HintPath>
</Reference>
<Reference Include="Microsoft.AnalysisServices.Core, Version=14.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>C:\Program Files (x86)\Microsoft SQL Server\140\SDK\Assemblies\Microsoft.AnalysisServices.Core.DLL</HintPath>
</Reference>
<Reference Include="Microsoft.AnalysisServices.Tabular, Version=14.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>C:\Program Files (x86)\Microsoft SQL Server\140\SDK\Assemblies\Microsoft.AnalysisServices.Tabular.DLL</HintPath>
</Reference>
<Reference Include="Microsoft.AnalysisServices.Tabular.Json, Version=14.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>C:\Program Files (x86)\Microsoft SQL Server\140\SDK\Assemblies\Microsoft.AnalysisServices.Tabular.Json.DLL</HintPath>
</Reference>
<Reference Include="Microsoft.CSharp" />
<Reference Include="Microsoft.Office.Interop.Excel, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Office.Interop.Excel.15.0.4795.1000\lib\net20\Microsoft.Office.Interop.Excel.dll</HintPath>
<EmbedInteropTypes>True</EmbedInteropTypes>
</Reference>
<Reference Include="Microsoft.VisualStudio.CommandBars, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<EmbedInteropTypes>True</EmbedInteropTypes>
</Reference>
<Reference Include="Microsoft.VisualStudio.Imaging, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.VisualStudio.Imaging.14.3.25407\lib\net45\Microsoft.VisualStudio.Imaging.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.VisualStudio.OLE.Interop, Version=7.1.40304.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<HintPath>..\packages\Microsoft.VisualStudio.OLE.Interop.7.10.6070\lib\Microsoft.VisualStudio.OLE.Interop.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.VisualStudio.Shell.14.0, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.VisualStudio.Shell.14.0.14.3.25407\lib\Microsoft.VisualStudio.Shell.14.0.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.VisualStudio.Shell.Immutable.10.0, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.VisualStudio.Shell.Immutable.10.0.10.0.30319\lib\net40\Microsoft.VisualStudio.Shell.Immutable.10.0.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.VisualStudio.Shell.Immutable.11.0, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.VisualStudio.Shell.Immutable.11.0.11.0.50727\lib\net45\Microsoft.VisualStudio.Shell.Immutable.11.0.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.VisualStudio.Shell.Immutable.12.0, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.VisualStudio.Shell.Immutable.12.0.12.0.21003\lib\net45\Microsoft.VisualStudio.Shell.Immutable.12.0.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.VisualStudio.Shell.Immutable.14.0, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.VisualStudio.Shell.Immutable.14.0.14.3.25407\lib\net45\Microsoft.VisualStudio.Shell.Immutable.14.0.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.VisualStudio.Shell.Interop, Version=7.1.40304.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<HintPath>..\packages\Microsoft.VisualStudio.Shell.Interop.7.10.6071\lib\Microsoft.VisualStudio.Shell.Interop.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.VisualStudio.Shell.Interop.8.0, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<HintPath>..\packages\Microsoft.VisualStudio.Shell.Interop.8.0.8.0.50727\lib\Microsoft.VisualStudio.Shell.Interop.8.0.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.VisualStudio.Shell.Interop.10.0" />
<Reference Include="Microsoft.VisualStudio.Shell.Interop.11.0">
<EmbedInteropTypes>true</EmbedInteropTypes>
</Reference>
<Reference Include="Microsoft.VisualStudio.Shell.Interop.12.0">
<EmbedInteropTypes>true</EmbedInteropTypes>
</Reference>
<Reference Include="Microsoft.VisualStudio.Shell.Interop.9.0, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<HintPath>..\packages\Microsoft.VisualStudio.Shell.Interop.9.0.9.0.30729\lib\Microsoft.VisualStudio.Shell.Interop.9.0.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.VisualStudio.TextManager.Interop, Version=7.1.40304.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<HintPath>..\packages\Microsoft.VisualStudio.TextManager.Interop.7.10.6070\lib\Microsoft.VisualStudio.TextManager.Interop.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.VisualStudio.TextManager.Interop.8.0, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<HintPath>..\packages\Microsoft.VisualStudio.TextManager.Interop.8.0.8.0.50727\lib\Microsoft.VisualStudio.TextManager.Interop.8.0.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.VisualStudio.Threading, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.VisualStudio.Threading.14.1.111\lib\net45\Microsoft.VisualStudio.Threading.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.VisualStudio.Utilities, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.VisualStudio.Utilities.14.3.25407\lib\net45\Microsoft.VisualStudio.Utilities.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.VisualStudio.Validation, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.VisualStudio.Validation.14.1.111\lib\net45\Microsoft.VisualStudio.Validation.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="stdole, Version=7.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<EmbedInteropTypes>True</EmbedInteropTypes>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Data" />
<Reference Include="System.Design" />
<Reference Include="System.DirectoryServices.AccountManagement" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
<Reference Include="PresentationCore" />
<Reference Include="PresentationFramework" />
<Reference Include="WindowsBase" />
<Reference Include="System.Xaml" />
</ItemGroup>
<ItemGroup>
<Compile Include="TabularCompare\ComparisonFactory.cs" />
<Compile Include="TabularCompare\DatabaseDeploymentEventArgs.cs" />
<Compile Include="TabularCompare\DeploymentCompleteEventArgs.cs" />
<Compile Include="TabularCompare\DeploymentMessageEventArgs.cs" />
<Compile Include="TabularCompare\Enums.cs" />
<Compile Include="TabularCompare\BlobKeyEventArgs.cs" />
<Compile Include="TabularCompare\PasswordPromptEventArgs.cs" />
<Compile Include="TabularCompare\TabularMetadata\Expression.cs" />
<Compile Include="TabularCompare\TabularMetadata\ExpressionCollection.cs" />
<Compile Include="TabularCompare\TabularMetadata\CalcDependency.cs" />
<Compile Include="TabularCompare\TabularMetadata\CalcDependencyCollection.cs" />
<Compile Include="TabularCompare\UI\HighDpiUtils.cs" />
<Compile Include="TabularCompare\UI\BlobCredentials.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="TabularCompare\UI\BlobCredentials.Designer.cs">
<DependentUpon>BlobCredentials.cs</DependentUpon>
</Compile>
<Compile Include="TabularCompare\ValidationMessageEventArgs.cs" />
<Compile Include="DemoHarness.cs" />
<Compile Include="TabularCompare\MultidimensionalMetadata\Action.cs" />
<Compile Include="TabularCompare\MultidimensionalMetadata\ActionCollection.cs" />
<Compile Include="TabularCompare\MultidimensionalMetadata\DataSource.cs" />
<Compile Include="TabularCompare\MultidimensionalMetadata\DataSourceCollection.cs" />
<Compile Include="TabularCompare\MultidimensionalMetadata\TabularModel.cs" />
<Compile Include="TabularCompare\MultidimensionalMetadata\Comparison.cs" />
<Compile Include="TabularCompare\MultidimensionalMetadata\ComparisonObject.cs" />
<Compile Include="TabularCompare\MultidimensionalMetadata\Kpi.cs" />
<Compile Include="TabularCompare\MultidimensionalMetadata\KpiCollection.cs" />
<Compile Include="TabularCompare\MultidimensionalMetadata\Measure.cs" />
<Compile Include="TabularCompare\MultidimensionalMetadata\MeasureCollection.cs" />
<Compile Include="TabularCompare\MultidimensionalMetadata\Perspective.cs" />
<Compile Include="TabularCompare\MultidimensionalMetadata\PerspectiveCollection.cs" />
<Compile Include="TabularCompare\MultidimensionalMetadata\Relationship.cs" />
<Compile Include="TabularCompare\MultidimensionalMetadata\RelationshipCollection.cs" />
<Compile Include="TabularCompare\MultidimensionalMetadata\Role.cs" />
<Compile Include="TabularCompare\MultidimensionalMetadata\RoleCollection.cs" />
<Compile Include="TabularCompare\MultidimensionalMetadata\Table.cs" />
<Compile Include="TabularCompare\MultidimensionalMetadata\TableCollection.cs" />
<Compile Include="TabularCompare\MultidimensionalMetadata\ITabularObject.cs" />
<Compile Include="TabularCompare\UI\ComparisonControl.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="TabularCompare\UI\ComparisonControl.Designer.cs">
<DependentUpon>ComparisonControl.cs</DependentUpon>
</Compile>
<Compile Include="TabularCompare\Core\Comparison.cs" />
<Compile Include="TabularCompare\Core\ComparisonObject.cs" />
<Compile Include="TabularCompare\PartitionRowCounter.cs" />
<Compile Include="TabularCompare\ProcessingTable.cs" />
<Compile Include="TabularCompare\ProcessingTableCollection.cs" />
<Compile Include="TabularCompare\UI\Deployment.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="TabularCompare\UI\Deployment.Designer.cs">
<DependentUpon>Deployment.cs</DependentUpon>
</Compile>
<Compile Include="TabularCompare\UI\ProcessingErrorMessage.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="TabularCompare\UI\ProcessingErrorMessage.Designer.cs">
<DependentUpon>ProcessingErrorMessage.cs</DependentUpon>
</Compile>
<Compile Include="TabularCompare\UI\ImpersonationCredentials.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="TabularCompare\UI\ImpersonationCredentials.Designer.cs">
<DependentUpon>ImpersonationCredentials.cs</DependentUpon>
</Compile>
<Compile Include="Settings.Designer.cs">
<DependentUpon>Settings.settings</DependentUpon>
<AutoGen>True</AutoGen>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
<Compile Include="TabularCompare\TabularMetadata\DataSource.cs" />
<Compile Include="TabularCompare\TabularMetadata\DataSourceCollection.cs" />
<Compile Include="TabularCompare\TabularMetadata\Culture.cs" />
<Compile Include="TabularCompare\TabularMetadata\CultureCollection.cs" />
<Compile Include="TabularCompare\TabularMetadata\TabularModel.cs" />
<Compile Include="TabularCompare\TabularMetadata\Comparison.cs" />
<Compile Include="TabularCompare\TabularMetadata\ComparisonObject.cs" />
<Compile Include="TabularCompare\TabularMetadata\Measure.cs" />
<Compile Include="TabularCompare\TabularMetadata\MeasureCollection.cs" />
<Compile Include="TabularCompare\TabularMetadata\Perspective.cs" />
<Compile Include="TabularCompare\TabularMetadata\PerspectiveCollection.cs" />
<Compile Include="TabularCompare\TabularMetadata\Relationship.cs" />
<Compile Include="TabularCompare\TabularMetadata\RelationshipCollection.cs" />
<Compile Include="TabularCompare\TabularMetadata\Role.cs" />
<Compile Include="TabularCompare\TabularMetadata\RoleCollection.cs" />
<Compile Include="TabularCompare\TabularMetadata\Table.cs" />
<Compile Include="TabularCompare\TabularMetadata\TableCollection.cs" />
<Compile Include="TabularCompare\ComparisonInfo.cs" />
<Compile Include="TabularCompare\ConnectionInfo.cs" />
<Compile Include="TabularCompare\TabularMetadata\TabularObject.cs" />
<Compile Include="TabularCompare\UI\DiffMatchPatch.cs" />
<Compile Include="TabularCompare\OptionsInfo.cs" />
<Compile Include="TabularCompare\TabularMetadata\RelationshipLink.cs" />
<Compile Include="TabularCompare\TabularMetadata\RelationshipChain.cs" />
<Compile Include="TabularCompare\SkipSelection.cs" />
<Compile Include="TabularCompare\SkipSelectionCollection.cs" />
<Compile Include="TabularCompare\UI\SynchronizedScrollRichTextBox.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="TabularCompare\UI\TreeGridCell.cs" />
<Compile Include="TabularCompare\UI\TreeGridEvents.cs" />
<Compile Include="TabularCompare\UI\TreeGridNode.cs" />
<Compile Include="TabularCompare\UI\TreeGridNodeCollection.cs" />
<Compile Include="TabularCompare\UI\TreeGridView.cs" />
<Compile Include="TabularCompare\UI\TreeGridViewComparison.cs" />
<Compile Include="TabularCompare\UI\TreeGridViewValidationOutput.cs" />
<Compile Include="TabularCompare\UI\Connections.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="TabularCompare\UI\Connections.Designer.cs">
<DependentUpon>Connections.cs</DependentUpon>
</Compile>
<Compile Include="WarningList.cs" />
<Compile Include="EditorFactory.cs" />
<Compile Include="EditorPane.cs" />
<Compile Include="TabularCompare\UI\EditorTextBox.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="TabularCompare\UI\EditorTextBox.designer.cs">
<DependentUpon>EditorTextBox.cs</DependentUpon>
</Compile>
<Compile Include="NativeMethods.cs" />
<Compile Include="TabularCompare\UI\Options.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="TabularCompare\UI\Options.Designer.cs">
<DependentUpon>Options.cs</DependentUpon>
</Compile>
<Compile Include="Settings.cs" />
<Compile Include="TabularCompare\UI\ValidationOutput.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="TabularCompare\UI\ValidationOutput.Designer.cs">
<DependentUpon>ValidationOutput.cs</DependentUpon>
</Compile>
<Compile Include="TabularCompare\UI\ValidationOutputButton.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="TabularCompare\UI\ValidationOutputButton.Designer.cs">
<DependentUpon>ValidationOutputButton.cs</DependentUpon>
</Compile>
<Compile Include="TabularCompare\UI\ValidationOutputButtons.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="TabularCompare\UI\ValidationOutputButtons.Designer.cs">
<DependentUpon>ValidationOutputButtons.cs</DependentUpon>
</Compile>
<Compile Include="VSPackage.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>VSPackage.resx</DependentUpon>
</Compile>
<Resource Include="Resources\1.png" />
<Resource Include="Resources\2.png" />
<Resource Include="Resources\3.png" />
<Resource Include="Resources\4.png" />
<Resource Include="Resources\5.png" />
<Resource Include="Resources\Action.png" />
<Resource Include="Resources\BismMeasure.png" />
<Resource Include="Resources\6.png" />
<Resource Include="Resources\7.png" />
<Resource Include="Resources\8.png" />
<Content Include="BismNormalizer.shfbproj" />
<Content Include="Resources\BismNormalizerLogo.png">
<IncludeInVSIX>true</IncludeInVSIX>
</Content>
<Content Include="Resources\BismNormalizerLogoText.png">
<IncludeInVSIX>true</IncludeInVSIX>
</Content>
<Resource Include="Resources\CompareBismModels_Small.png" />
<Resource Include="Resources\Connection.png" />
<Resource Include="Resources\CreateAction.png" />
<Resource Include="Resources\DeleteAction.png" />
<Resource Include="Resources\Informational.png" />
<Resource Include="Resources\KPI.png" />
<Resource Include="Resources\CreateActionGrey.png" />
<Resource Include="Resources\DeleteActionGrey.png" />
<Resource Include="Resources\ButtonSwitch.png" />
<Resource Include="Resources\Check.png" />
<Resource Include="Resources\Error.png" />
<Resource Include="Resources\Culture.png" />
<Resource Include="Resources\Expression.png" />
<Content Include="Resources\LicenseTerms.txt">
<IncludeInVSIX>true</IncludeInVSIX>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Resource Include="Resources\LogoSmall.png" />
<Resource Include="Resources\Minus.png" />
<Resource Include="Resources\Perspective.png" />
<Resource Include="Resources\Plus.png" />
<Resource Include="Resources\Relationship.png" />
<Resource Include="Resources\Role.png" />
<Resource Include="Resources\SkipAction.png" />
<Resource Include="Resources\Table.png" />
<Resource Include="Resources\UpdateAction.png" />
<Resource Include="Resources\Warning.png" />
<Resource Include="Resources\WarningToolWindow.png" />
<Resource Include="Resources\SkipActionGrey.png" />
<None Include="TabularCompare\TabularCompare.dgml">
<SubType>Designer</SubType>
</None>
<None Include="BismNormalizer.targets">
<SubType>Designer</SubType>
</None>
<None Include="Resources\Progress.gif" />
<Resource Include="Resources\ProgressCheck.png" />
<Resource Include="Resources\ProgressError.png" />
<Resource Include="Resources\ProgressWarning.png" />
<Resource Include="Resources\Processing.png" />
<Content Include="Templates\TabularCompare.bsmn">
<IncludeInVSIX>true</IncludeInVSIX>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="Templates\BismNormalizer.vsdir">
<IncludeInVSIX>true</IncludeInVSIX>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Compile Include="Guids.cs" />
<Compile Include="Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<Compile Include="GlobalSuppressions.cs" />
<Compile Include="BismNormalizerPackage.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="PkgCmdID.cs" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="TabularCompare\UI\ComparisonControl.resx">
<DependentUpon>ComparisonControl.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="TabularCompare\UI\Connections.resx">
<DependentUpon>Connections.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="TabularCompare\UI\Deployment.resx">
<DependentUpon>Deployment.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="EditorPane.resx">
<DependentUpon>EditorPane.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="TabularCompare\UI\EditorTextBox.resx">
<DependentUpon>EditorTextBox.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="TabularCompare\UI\BlobCredentials.resx">
<DependentUpon>BlobCredentials.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="TabularCompare\UI\ProcessingErrorMessage.resx">
<DependentUpon>ProcessingErrorMessage.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="TabularCompare\UI\ImpersonationCredentials.resx">
<DependentUpon>ImpersonationCredentials.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="TabularCompare\UI\Options.resx">
<DependentUpon>Options.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="TabularCompare\UI\ValidationOutput.resx">
<DependentUpon>ValidationOutput.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="TabularCompare\UI\ValidationOutputButton.resx">
<DependentUpon>ValidationOutputButton.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="TabularCompare\UI\ValidationOutputButtons.resx">
<DependentUpon>ValidationOutputButtons.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="VSPackage.resx">
<MergeWithCTO>true</MergeWithCTO>
<ManifestResourceName>VSPackage</ManifestResourceName>
<SubType>Designer</SubType>
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>VSPackage.Designer.cs</LastGenOutput>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<None Include="app.config" />
<None Include="TabularCompare\TabularMetadata\TabularMetadataClassDiagram.cd" />
<None Include="packages.config" />
<None Include="Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
<None Include="source.extension.vsixmanifest">
<SubType>Designer</SubType>
</None>
</ItemGroup>
<ItemGroup>
<None Include="Key.snk" />
</ItemGroup>
<ItemGroup>
<VSCTCompile Include="BismNormalizer.vsct">
<ResourceName>Menus.ctmenu</ResourceName>
</VSCTCompile>
</ItemGroup>
<ItemGroup>
<None Include="Resources\Images.png" />
</ItemGroup>
<ItemGroup>
<Content Include="Resources\File.ico" />
<Content Include="Resources\Package.ico">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
<IncludeInVSIX>true</IncludeInVSIX>
</Content>
</ItemGroup>
<ItemGroup>
<BootstrapperPackage Include=".NETFramework,Version=v4.5.2">
<Visible>False</Visible>
<ProductName>Microsoft .NET Framework 4.5.2 %28x86 and x64%29</ProductName>
<Install>true</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1</ProductName>
<Install>false</Install>
</BootstrapperPackage>
</ItemGroup>
<PropertyGroup>
<UseCodebase>true</UseCodebase>
</PropertyGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<Import Project="$(VSToolsPath)\VSSDK\Microsoft.VsSDK.targets" Condition="'$(VSToolsPath)' != ''" />
<Import Project="..\packages\MSBuild.Extension.Pack.1.8.0\build\net40\MSBuild.Extension.Pack.targets" />
<Import Project="$(MSBuildProjectDirectory)\BismNormalizer.targets" />
</Project>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,89 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<!-- The configuration and platform will be used to determine which assemblies to include from solution and
project documentation sources -->
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{6ca43b3a-3a45-4c6a-9e5f-1a4e7a45d9f2}</ProjectGuid>
<SHFBSchemaVersion>2015.6.5.0</SHFBSchemaVersion>
<!-- AssemblyName, Name, and RootNamespace are not used by SHFB but Visual Studio adds them anyway -->
<AssemblyName>Documentation</AssemblyName>
<RootNamespace>Documentation</RootNamespace>
<Name>Documentation</Name>
<!-- SHFB properties -->
<FrameworkVersion>.NET Framework 4.5</FrameworkVersion>
<OutputPath>.\Help\</OutputPath>
<HtmlHelpName>Documentation</HtmlHelpName>
<Language>en-US</Language>
<DocumentationSources>
<DocumentationSource sourceFile=".\bin\Debug\BismNormalizer.XML" />
<DocumentationSource sourceFile=".\bin\Debug\BismNormalizer.dll" />
</DocumentationSources>
<SaveComponentCacheCapacity>100</SaveComponentCacheCapacity>
<BuildAssemblerVerbosity>OnlyWarningsAndErrors</BuildAssemblerVerbosity>
<HelpFileFormat>Website</HelpFileFormat>
<IndentHtml>False</IndentHtml>
<KeepLogFile>True</KeepLogFile>
<DisableCodeBlockComponent>False</DisableCodeBlockComponent>
<CleanIntermediates>True</CleanIntermediates>
<NamespaceSummaries>
<NamespaceSummaryItem name="BismNormalizer.TabularCompare" isDocumented="True">Provides an object API used to perform database comparison and merging for SQL Server Analysis Services tabular models.</NamespaceSummaryItem>
<NamespaceSummaryItem name="BismNormalizer.TabularCompare.Core" isDocumented="True">Provides abstract classes and interfaces to be inherited or implemented by classes in the BismNormalizer.TabularCompare.MultidimensionalMetadata and BismNormalizer.TabularCompare.TabularMetadata namespaces.</NamespaceSummaryItem>
<NamespaceSummaryItem name="BismNormalizer.TabularCompare.TabularMetadata" isDocumented="True">Provides classes for comparisons of tabular models that use tabular metadata (not multidimensional) with compatibility level 1200.</NamespaceSummaryItem>
<NamespaceSummaryItem name="BismNormalizer.TabularCompare.UI" isDocumented="False" />
<NamespaceSummaryItem name="BismNormalizer.TabularCompare.MultidimensionalMetadata" isDocumented="True">Provides classes for comparisons of tabular models that use multidimensional metadata (not tabular) with compatibility level 1100 and 1103.</NamespaceSummaryItem>
<NamespaceSummaryItem name="BismNormalizer" isDocumented="False" /></NamespaceSummaries>
<TocParentId>-1</TocParentId>
<TocParentVersion>100</TocParentVersion>
<TopicVersion>100</TopicVersion>
<TocOrder>-1</TocOrder>
<ProductTitle>BISM Normalizer</ProductTitle>
<VendorName>BISM Normalizer</VendorName>
<MSHelpViewerSdkLinkType>Msdn</MSHelpViewerSdkLinkType>
<CatalogVersion>100</CatalogVersion>
<CatalogProductId>VS</CatalogProductId>
<HelpFileVersion>1.0.0.0</HelpFileVersion>
<MaximumGroupParts>2</MaximumGroupParts>
<NamespaceGrouping>False</NamespaceGrouping>
<SyntaxFilters>C#</SyntaxFilters>
<SdkLinkTarget>Blank</SdkLinkTarget>
<RootNamespaceContainer>False</RootNamespaceContainer>
<PresentationStyle>VS2013</PresentationStyle>
<Preliminary>False</Preliminary>
<NamingMethod>Guid</NamingMethod>
<HelpTitle>BISM Normalizer API Reference</HelpTitle>
<ContentPlacement>AboveNamespaces</ContentPlacement>
<VisibleItems>InheritedMembers, InheritedFrameworkMembers, ProtectedInternalAsProtected</VisibleItems>
</PropertyGroup>
<!-- There are no properties for these groups. AnyCPU needs to appear in order for Visual Studio to perform
the build. The others are optional common platform types that may appear. -->
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|Win32' ">
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|Win32' ">
</PropertyGroup>
<!-- Import the SHFB build targets -->
<Import Project="$(SHFBROOT)\SandcastleHelpFileBuilder.targets" />
<!-- The pre-build and post-build event properties must appear *after* the targets file import in order to be
evaluated correctly. -->
<PropertyGroup>
<PreBuildEvent>
</PreBuildEvent>
<PostBuildEvent>
</PostBuildEvent>
<RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent>
</PropertyGroup>
</Project>

View File

@ -0,0 +1,186 @@
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="12.0">
<!--
10/13/16: commented out obfuscation
We intercept the build (just before GeneratePkgDef). There are subsequent build operations for extensions that require a compiled assembly,
so we must temporarily disable strong name-verificataion (the assembly is already delay-signed for Release configuration). These operations
modify the assembly file, so don't perform obfuscation before the VSIX file has been generated; we do it after the build.
In addition to disabling strong-name verification, this is also a good point to compile other assemblies, and copy exes for inclusion in
the VSIX file.
Later (AfterBuild), we can 1) run tests to execute the newly built BismNormalizer command-line exe and check results, and 2) extract the
assembly from the VSIX file, obfuscate it, sign it, re-register for strong-name verification, and replace the assembly in the VSIX file
with the obfuscated one.
================
When do new release,
- Increment version number in manifest file (if major increment, also InstalledProductRegistration [package object attribute])
- Run following command:
msbuild BismNormalizer.csproj /verbosity:m /target:Rebuild /property:Configuration=Release
- Take VSIX from \ReleaseObfusc folder
-->
<Target Name="BeforeBuild" Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<!--Initialize dynamic ItemGroups-->
<ItemGroup>
<AssemblyInfoFiles Include="Properties\AssemblyInfo.cs" />
<AssemblyInfoFiles Include="..\BismNormalizer.CommandLine\Properties\AssemblyInfo.cs" />
<AssemblyInfoFiles Include="..\BismNormalizer.IconSetup\Properties\AssemblyInfo.cs" />
</ItemGroup>
<!--Take package version from manifest file and set assembly/file versions for all projects to match-->
<XmlPeek
Namespaces="&lt;Namespace Prefix='n' Uri='http://schemas.microsoft.com/developer/vsx-schema/2011'/&gt;"
XmlInputPath="source.extension.vsixmanifest"
Query="//n:PackageManifest/n:Metadata/n:Identity/@Version"
>
<Output PropertyName="ManifestVersion" TaskParameter="Result" />
</XmlPeek>
<Message Text="- About to set all assembly versions to $(ManifestVersion) on AssemblyInfoFiles: @(AssemblyInfoFiles)" Importance="high" />
<Message Text=" " Importance="high" />
<AssemblyInfo
AssemblyInfoFiles="@(AssemblyInfoFiles)"
AssemblyVersion="$(ManifestVersion)"
AssemblyFileVersion="$(ManifestVersion)"
/>
</Target>
<!--List exe content for VSIX here rather than in main csproj file so doesn't include in source control, and get checked out every build-->
<ItemGroup>
<Content Include="BismNormalizer.exe">
<IncludeInVSIX>true</IncludeInVSIX>
</Content>
<Content Include="BismNormalizer.IconSetup.exe">
<IncludeInVSIX>true</IncludeInVSIX>
</Content>
</ItemGroup>
<Target Name="CustomBeforePkgDef" BeforeTargets="GeneratePkgDef" Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<!--Disable strong-name verification-->
<Message Text=" " Importance="high" />
<Message Text="- About to disable strong-name verification on $(TargetPath)" Importance="high" />
<Exec Command="&quot;$(TargetFrameworkSDKToolsDirectory)sn.exe&quot; -Vr &quot;$(TargetPath)&quot;" />
<!--Initialize dynamic Item/PropertyGroups-->
<ItemGroup>
<AssociatedProjects Include="..\BismNormalizer.CommandLine\BismNormalizer.CommandLine.csproj" />
<AssociatedProjects Include="..\BismNormalizer.IconSetup\BismNormalizer.IconSetup.csproj" />
<AssociatedProjects Include="..\BismNormalizer.Tests\BismNormalizer.Tests.csproj" />
<SolutionDir Include="..\" />
<TrxFiles Include="TestResults\*.trx" />
</ItemGroup>
<PropertyGroup>
<SolutionDir>@(SolutionDir->'%(Fullpath)')</SolutionDir>
</PropertyGroup>
<!--Build 3 associated projects in parallel, which will pick up newly built BismNormalizer.dll as reference-->
<Message Text=" " Importance="high" />
<Message Text="- About to build associated projects: @(AssociatedProjects)" Importance="high" />
<Message Text=" " Importance="high" />
<MSBuild
Projects="@(AssociatedProjects)"
Targets="Rebuild;"
Properties="Configuration=Release"
BuildInParallel="true"
>
<Output ItemName="OutputAssemblies" TaskParameter="TargetOutputs" />
</MSBuild>
<ItemGroup>
<OutputExes Include="@(OutputAssemblies)" Exclude="$(SolutionDir)**\*.dll" />
<OutputDlls Include="@(OutputAssemblies)" Exclude="$(SolutionDir)**\*.exe" />
</ItemGroup>
<!--Copy newly built output exes (BismNormalizer.exe, BismNormalizer.IconSetup.exe) to main project directory to be included in VSIX file-->
<Message Text=" " Importance="high" />
<Message Text="- About to copy exes to proj directory for inclusion in VSIX: @(OutputExes)" Importance="high" />
<Message Text=" " Importance="high" />
<Copy
SourceFiles="@(OutputExes)"
DestinationFolder="$(MSBuildProjectDirectory)"
/>
</Target>
<Target Name="AfterBuild" Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<!--Run tests (BismNormalizer.Tests.dll)-->
<ItemGroup>
<TrxFiles Include="TestResults\*.trx" />
</ItemGroup>
<Message Text=" " Importance="high" />
<Message Text="- About to delete any existing trx files: @(TrxFiles)" Importance="high" />
<Message Text=" " Importance="high" />
<Delete Files="@(TrxFiles)" />
<Message Text="- About to run vstest on: @(OutputDlls)" Importance="high" />
<Message Text=" " Importance="high" />
<Exec Command="vstest.console.exe @(OutputDlls) /Logger:trx" />
<PropertyGroup>
<ObfuscDir>$(MSBuildProjectDirectory)\bin\ReleaseObfusc</ObfuscDir>
<ObfuscExtractDir>$(ObfuscDir)\Extract</ObfuscExtractDir>
<ObfuscDll>$(ObfuscDir)\BismNormalizer.dll</ObfuscDll>
<ObfuscVsix>$(ObfuscDir)\BismNormalizer.vsix</ObfuscVsix>
</PropertyGroup>
<!--Copy BismNormalizer.vsix to ReleaseObfusc-->
<Message Text=" " Importance="high" />
<Message Text="- About to copy $(MSBuildProjectDirectory)\bin\Release\BismNormalizer.vsix to $(ObfuscDir)" Importance="high" />
<Copy
SourceFiles="$(MSBuildProjectDirectory)\bin\Release\BismNormalizer.vsix"
DestinationFolder="$(ObfuscDir)"
/>
<!--Extract files from vsix-->
<Message Text=" " Importance="high" />
<Message Text="- About to extract vsix file to $(ObfuscExtractDir)" Importance="high" />
<Zip
TaskAction="Extract"
ExtractPath="$(ObfuscExtractDir)"
ZipFileName="$(ObfuscVsix)"
/>
<!--10/13/2016: instead of obfuscation, just copy dll to ReleaseObfusc folder for signing
<Message Text=" " Importance="high" />
<Message Text="- About to perform obfuscation with crypto project $(MSBuildProjectDirectory)\BismNormalizer.obproj" Importance="high" />
<Exec Command="&quot;C:\Program Files (x86)\LogicNP Software\Crypto Obfuscator For .Net 2015\co.exe&quot; &quot;projectfile=$(MSBuildProjectDirectory)\BismNormalizer.obproj&quot;" />
-->
<Message Text=" " Importance="high" />
<Message Text="- About to copy $(ObfuscExtractDir)\BismNormalizer.dll to $(ObfuscDir)" Importance="high" />
<Copy
SourceFiles="$(ObfuscExtractDir)\BismNormalizer.dll"
DestinationFolder="$(ObfuscDir)"
/>
<!--Enable strong-name verification-->
<Message Text=" " Importance="high" />
<Message Text="- About to re-enable strong-name verification on $(ObfuscDll)" Importance="high" />
<Exec Command="&quot;$(TargetFrameworkSDKToolsDirectory)sn.exe&quot; -Vu &quot;$(ObfuscDll)&quot;" />
<!--Sign the assembly-->
<Message Text=" " Importance="high" />
<Message Text="- About to sign $(ObfuscDll)" Importance="high" />
<Exec Command="&quot;$(TargetFrameworkSDKToolsDirectory)sn.exe&quot; -R &quot;$(ObfuscDll)&quot; &quot;$(MSBuildProjectDirectory)\Key.snk&quot;" />
<!--Replace dll in vsix with obfuscated version-->
<Message Text=" " Importance="high" />
<Message Text="- About to re-pack vsix file: $(ObfuscVsix)" Importance="high" />
<Zip
TaskAction="AddFiles"
CompressFiles="$(ObfuscDll)"
ZipFileName="$(ObfuscVsix)"
RemoveRoot="$(ObfuscDir)"
/>
</Target>
</Project>

View File

@ -0,0 +1,127 @@
<?xml version="1.0" encoding="utf-8"?>
<CommandTable xmlns="http://schemas.microsoft.com/VisualStudio/2005-10-18/CommandTable" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<Extern href="stdidcmd.h"/>
<Extern href="vsshlids.h"/>
<Extern href="virtkeys.h"/>
<Commands package="guidBismNormalizerPkg">
<Groups>
<Group guid="guidBismNormalizerCmdSet" id="ToolMenuGroup" priority="0x0000">
<Parent guid="guidSHLMainMenu" id="IDM_VS_MENU_TOOLS"/>
</Group>
<Group guid="guidBismNormalizerCmdSet" id="ProjectMenuGroup" priority="0x0000">
<Parent guid="guidSHLMainMenu" id="IDM_VS_CTXT_PROJNODE"/>
</Group>
<Group guid="guidBismNormalizerCmdSet" id="FileMenuGroupCodeBehind" priority="0x0100">
<Parent guid="guidSHLMainMenu" id="IDM_VS_CTXT_ITEMNODE"/>
</Group>
<Group guid="guidBismNormalizerCmdSet" id="FileMenuGroupInstallIcon" priority="0x0200">
<Parent guid="guidSHLMainMenu" id="IDM_VS_CTXT_ITEMNODE"/>
</Group>
</Groups>
<Buttons>
<Button guid="guidBismNormalizerCmdSet" id="cmdidToolMenuNewComparison" priority="0x0100" type="Button">
<Parent guid="guidBismNormalizerCmdSet" id="ToolMenuGroup" />
<Icon guid="guidImages" id="bmpPic1" />
<Strings>
<ButtonText>New Tabular Model Comparison...</ButtonText>
</Strings>
</Button>
<Button guid="guidBismNormalizerCmdSet" id="cmdidProjectMenuNewComparison" priority="0x0100" type="Button">
<Parent guid="guidBismNormalizerCmdSet" id="ProjectMenuGroup" />
<Icon guid="guidImages" id="bmpPic1" />
<CommandFlag>DefaultInvisible</CommandFlag>
<CommandFlag>DynamicVisibility</CommandFlag>
<Strings>
<CommandName>cmdidProjectMenuNewComparison</CommandName>
<ButtonText>Add New Tabular Model Comparison...</ButtonText>
</Strings>
</Button>
<Button guid="guidBismNormalizerCmdSet" id="cmdidFileMenuViewCode" priority="0x0100" type="Button">
<Parent guid="guidBismNormalizerCmdSet" id="FileMenuGroupCodeBehind" />
<Icon guid="guidImages" id="ViewCodePic" />
<CommandFlag>DefaultInvisible</CommandFlag>
<CommandFlag>DynamicVisibility</CommandFlag>
<Strings>
<CommandName>cmdidFileMenuViewCode</CommandName>
<ButtonText>View Code</ButtonText>
</Strings>
</Button>
<Button guid="guidBismNormalizerCmdSet" id="cmdidFileMenuViewDesigner" priority="0x0100" type="Button">
<Parent guid="guidBismNormalizerCmdSet" id="FileMenuGroupCodeBehind" />
<Icon guid="guidImages" id="ViewDesignerPic" />
<CommandFlag>DefaultInvisible</CommandFlag>
<CommandFlag>DynamicVisibility</CommandFlag>
<Strings>
<CommandName>cmdidFileMenuViewDesigner</CommandName>
<ButtonText>View Designer</ButtonText>
</Strings>
</Button>
<Button guid="guidBismNormalizerCmdSet" id="cmdidFileMenuInstallIcon" priority="0x0100" type="Button">
<Parent guid="guidBismNormalizerCmdSet" id="FileMenuGroupInstallIcon" />
<Icon guid="guidImages" id="bmpPic1" />
<CommandFlag>DefaultInvisible</CommandFlag>
<CommandFlag>DynamicVisibility</CommandFlag>
<Strings>
<CommandName>cmdidFileMenuInstallIcon</CommandName>
<ButtonText>Install Solution Explorer Icon</ButtonText>
</Strings>
</Button>
<Button guid="guidBismNormalizerCmdSet" id="cmdidValidationOutput" priority="0x0100" type="Button">
<Parent guid="guidSHLMainMenu" id="IDG_VS_WNDO_OTRWNDWS1"/>
<Icon guid="guidImages" id="bmpPic2" />
<Strings>
<ButtonText>BISM Normalizer Warning List</ButtonText>
</Strings>
</Button>
</Buttons>
<Bitmaps>
<Bitmap guid="guidImages" href="Resources\Images.png" usedList="bmpPic1, bmpPic2, ViewCodePic, ViewDesignerPic"/>
</Bitmaps>
</Commands>
<!--<KeyBindings>
--><!--For context menu in Solution Explorer--><!--
<KeyBinding guid="guidBismNormalizerCmdSet" id="cmdidFileMenuViewCode" editor="guidVSStd97" key1="VK_F7" />
<KeyBinding guid="guidBismNormalizerCmdSet" id="cmdidFileMenuViewDesigner" editor="guidVSStd97" key1="VK_F7" mod1="Shift" />
--><!--For when custom editor is open either as designer or as code behind--><!--
<KeyBinding guid="guidBismNormalizerCmdSet" id="cmdidFileMenuViewCode" editor="guidBismNormalizerEditorFactory" key1="VK_F7" />
<KeyBinding guid="guidBismNormalizerCmdSet" id="cmdidFileMenuViewDesigner" editor="guidBismNormalizerEditorFactory" key1="VK_F7" mod1="Shift" />
</KeyBindings>-->
<Symbols>
<GuidSymbol name="guidBismNormalizerPkg" value="{d094957e-b4bc-493f-b473-a0da301b21a1}" />
<GuidSymbol name="guidBismNormalizerCmdSet" value="{1bbd436a-e530-49da-aea2-0a69108a1c57}">
<IDSymbol name="ToolMenuGroup" value="0x1020" />
<IDSymbol name="ProjectMenuGroup" value="0x1021" />
<IDSymbol name="FileMenuGroupCodeBehind" value="0x1022" />
<IDSymbol name="FileMenuGroupInstallIcon" value="0x1023" />
<IDSymbol name="cmdidToolMenuNewComparison" value="0x0100" />
<IDSymbol name="cmdidValidationOutput" value="0x0101" />
<IDSymbol name="cmdidProjectMenuNewComparison" value="0x0103" />
<IDSymbol name="cmdidFileMenuViewCode" value="0x0104" />
<IDSymbol name="cmdidFileMenuViewDesigner" value="0x0105" />
<IDSymbol name="cmdidFileMenuInstallIcon" value="0x0106" />
</GuidSymbol>
<GuidSymbol name="guidBismNormalizerEditorFactory" value="{53f713ab-4e20-4874-831b-168ad70597b0}" />
<GuidSymbol name="guidImages" value="{e5995535-1e9e-47c4-8678-fe75daad6755}" >
<IDSymbol name="bmpPic1" value="1" />
<IDSymbol name="bmpPic2" value="2" />
<IDSymbol name="ViewCodePic" value="3" />
<IDSymbol name="ViewDesignerPic" value="4" />
</GuidSymbol>
</Symbols>
</CommandTable>

View File

@ -0,0 +1,536 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Globalization;
using System.Runtime.InteropServices;
using System.ComponentModel.Design;
using Microsoft.Win32;
using Microsoft.VisualStudio;
using Microsoft.VisualStudio.Shell.Interop;
using Microsoft.VisualStudio.OLE.Interop;
using Microsoft.VisualStudio.Shell;
using EnvDTE80;
using BismNormalizer.TabularCompare.UI;
using System.Drawing;
namespace BismNormalizer
{
[PackageRegistration(UseManagedResourcesOnly = true)]
[InstalledProductRegistration("#110", "#112", "3", IconResourceID = 400)]
[ProvideMenuResource("Menus.ctmenu", 1)]
[ProvideToolWindow(typeof(WarningList),
Style = VsDockStyle.Tabbed,
Transient = true, //Transient means will not show up automatically when reopen VS
Window = "D78612C7-9962-4B83-95D9-268046DAD23A" //this is the guid of the VS error window (NOT YOUR CUSTOM WINDOW)
)]
[ProvideEditorExtension(typeof(EditorFactory), ".bsmn", 50,
ProjectGuid = VSConstants.CLSID.MiscellaneousFilesProject_string,
TemplateDir = "Templates",
NameResourceID = 105,
DefaultName = "BismNormalizer")]
[ProvideEditorExtension(typeof(EditorFactory), ".bsmn", 1000,
ProjectGuid = "{6870E480-7721-4708-BFB8-9AE898AA21B3}", //GUID for tabular BI projects
TemplateDir = "Templates",
NameResourceID = 105,
DefaultName = "BismNormalizer")]
[ProvideKeyBindingTable(GuidList.guidBismNormalizerEditorFactoryString, 102)]
[ProvideEditorLogicalView(typeof(EditorFactory), VSConstants.LOGVIEWID.Any_string)] //VSConstants.LOGVIEWID.TextView_string)]
[ProvideAutoLoad(UIContextGuids.SolutionHasSingleProject)] //Microsoft.VisualStudio.VSConstants.UICONTEXT.NoSolution_string
[Guid(GuidList.guidBismNormalizerPkgString)]
public sealed class BismNormalizerPackage : Package, IDisposable
{
private DTE2 _dte;
private ValidationOutput _validationOutput;
private List<EditorPane> _editorPanes;
private DteInitializer _dteInitializer;
private IVsWindowFrame _toolWindowFrame;
private EditorFactory _editorFactory;
public BismNormalizerPackage() { }
protected override void Initialize()
{
base.Initialize();
InitializeDTE();
_editorPanes = new List<EditorPane>();
base.RegisterEditorFactory(new EditorFactory(this));
OleMenuCommandService mcs = GetService(typeof(IMenuCommandService)) as OleMenuCommandService;
if ( null != mcs )
{
//Command for New Comparison from Tools menu
CommandID menuToolMenuNewComparisonCommandID = new CommandID(GuidList.guidBismNormalizerCmdSet, (int)PkgCmdIDList.cmdidToolMenuNewComparison);
MenuCommand menuToolMenuNewComparison = new MenuCommand(NewComparison, menuToolMenuNewComparisonCommandID );
mcs.AddCommand( menuToolMenuNewComparison );
//Command for New Comparison from project context menu in solution explorer
CommandID menuProjectMenuNewComparisonCommandID = new CommandID(GuidList.guidBismNormalizerCmdSet, (int)PkgCmdIDList.cmdidProjectMenuNewComparison);
OleMenuCommand menuProjectMenuNewComparison = new OleMenuCommand(AddNewComparison, menuProjectMenuNewComparisonCommandID);
menuProjectMenuNewComparison.BeforeQueryStatus += menuItem_BeforeQueryStatusNewComparison;
mcs.AddCommand(menuProjectMenuNewComparison);
//Command for View Code from file context menu in solution explorer
CommandID menuFileMenuViewCodeCommandID = new CommandID(GuidList.guidBismNormalizerCmdSet, (int)PkgCmdIDList.cmdidFileMenuViewCode);
OleMenuCommand menuFileMenuViewCode = new OleMenuCommand(ViewCode, menuFileMenuViewCodeCommandID);
menuFileMenuViewCode.BeforeQueryStatus += menuItem_BeforeQueryStatusCodeBehind;
mcs.AddCommand(menuFileMenuViewCode);
//Command for View Designer from file context menu in solution explorer
CommandID menuFileMenuViewDesignerCommandID = new CommandID(GuidList.guidBismNormalizerCmdSet, (int)PkgCmdIDList.cmdidFileMenuViewDesigner);
OleMenuCommand menuFileMenuViewDesigner = new OleMenuCommand(ViewDesigner, menuFileMenuViewDesignerCommandID);
menuFileMenuViewDesigner.BeforeQueryStatus += menuItem_BeforeQueryStatusCodeBehind;
mcs.AddCommand(menuFileMenuViewDesigner);
//Command for View Designer from file context menu in solution explorer
CommandID menuFileMenuInstallIconCommandID = new CommandID(GuidList.guidBismNormalizerCmdSet, (int)PkgCmdIDList.cmdidFileMenuInstallIcon);
OleMenuCommand menuFileMenuInstallIcon = new OleMenuCommand(InstallIcon, menuFileMenuInstallIconCommandID);
menuFileMenuInstallIcon.BeforeQueryStatus += menuItem_BeforeQueryStatusInstallIcon;
mcs.AddCommand(menuFileMenuInstallIcon);
//Command for BISM Normalizer Warning List
CommandID toolwndCommandID = new CommandID(GuidList.guidBismNormalizerCmdSet, (int)PkgCmdIDList.cmdidValidationOutput);
MenuCommand menuValidationOutput = new MenuCommand(InitializeToolWindow, toolwndCommandID);
mcs.AddCommand( menuValidationOutput );
}
}
private void NewComparison(object sender, EventArgs e)
{
try
{
_dte.ItemOperations.NewFile(@"BISM Normalizer\Tabular Compare");
}
catch (Exception)
{
ShowMessage("Cannot launch BISM Normalizer. Please check installation, or try creating a new text file with .bsmn extension.", OLEMSGBUTTON.OLEMSGBUTTON_OK, OLEMSGICON.OLEMSGICON_CRITICAL);
}
}
private void AddNewComparison(object sender, EventArgs e)
{
try
{
EnvDTE.ProjectItem projItem = _dte.ItemOperations.AddNewItem(@"BISM Normalizer\Tabular Compare");
//Can't use while can't change name of file while editor open:
//_dte.ItemOperations.OpenFile(projItem.FileNames[0]);
}
catch (Exception)
{
ShowMessage("Cannot add BISM Normalizer comparison. Please check installation, or try creating a new text file with .bsmn extension.", OLEMSGBUTTON.OLEMSGBUTTON_OK, OLEMSGICON.OLEMSGICON_CRITICAL);
}
}
private void ViewCode(object sender, EventArgs e)
{
try
{
OleMenuCommand menuCommand = sender as OleMenuCommand;
if (menuCommand != null)
{
menuCommand.Visible = false; // default to not visible
if (_dte != null && _dte.SelectedItems != null && _dte.SelectedItems.Count == 1) //only support 1 selected file
{
foreach (EnvDTE.SelectedItem selectedItem in _dte.SelectedItems)
{
if (selectedItem.Name != null &&
selectedItem.Name.ToUpper().EndsWith(".bsmn".ToUpper()) &&
selectedItem.ProjectItem != null
)
{
EnvDTE.ProjectItem projItem = selectedItem.ProjectItem;
_dte.ItemOperations.OpenFile(projItem.FileNames[0], EnvDTE.Constants.vsViewKindCode);
break;
}
}
}
}
}
catch (Exception)
{
ShowMessage("Cannot view code. Please check installation.", OLEMSGBUTTON.OLEMSGBUTTON_OK, OLEMSGICON.OLEMSGICON_CRITICAL);
}
}
private void ViewDesigner(object sender, EventArgs e)
{
try
{
OleMenuCommand menuCommand = sender as OleMenuCommand;
if (menuCommand != null)
{
menuCommand.Visible = false; // default to not visible
if (_dte != null && _dte.SelectedItems != null && _dte.SelectedItems.Count == 1) //only support 1 selected file
{
foreach (EnvDTE.SelectedItem selectedItem in _dte.SelectedItems)
{
if (selectedItem.Name != null &&
selectedItem.Name.ToUpper().EndsWith(".bsmn".ToUpper()) &&
selectedItem.ProjectItem != null
)
{
EnvDTE.ProjectItem projItem = selectedItem.ProjectItem;
_dte.ItemOperations.OpenFile(projItem.FileNames[0], EnvDTE.Constants.vsViewKindPrimary);
break;
}
}
}
}
}
catch (Exception)
{
ShowMessage("Cannot view designer. Please check installation.", OLEMSGBUTTON.OLEMSGBUTTON_OK, OLEMSGICON.OLEMSGICON_CRITICAL);
}
}
private void InstallIcon(object sender, EventArgs e)
{
string message = "Setting up icon for Solution Explorer will require running a separate process as administrator.";
IVsUIShell uiShell = (IVsUIShell)GetService(typeof(SVsUIShell));
Guid clsid = Guid.Empty;
int result;
Microsoft.VisualStudio.ErrorHandler.ThrowOnFailure(uiShell.ShowMessageBox(
0,
ref clsid,
"Bism Normalizer",
message,
string.Empty,
0,
OLEMSGBUTTON.OLEMSGBUTTON_OKCANCEL,
OLEMSGDEFBUTTON.OLEMSGDEFBUTTON_FIRST,
OLEMSGICON.OLEMSGICON_WARNING,
0, // false
out result));
if (result != 1)
{
// If !=OK then backout
return;
}
try
{
ProcessStartInfo proc = new ProcessStartInfo();
proc.UseShellExecute = true;
string workingDirectory = System.Reflection.Assembly.GetExecutingAssembly().Location.Replace("\\BismNormalizer.dll", "");
proc.WorkingDirectory = workingDirectory;
proc.FileName = workingDirectory + "\\BismNormalizer.IconSetup.exe";
proc.Verb = "runas";
Process.Start(proc);
}
catch (Exception exc)
{
ShowMessage(exc.Message, OLEMSGBUTTON.OLEMSGBUTTON_OK, OLEMSGICON.OLEMSGICON_CRITICAL);
}
}
void menuItem_BeforeQueryStatusNewComparison(object sender, EventArgs e)
{
OleMenuCommand menuCommand = sender as OleMenuCommand;
if (menuCommand != null)
{
menuCommand.Visible = false; // default to not visible
if (_dte != null)
{
Array selectedProjects = (Array)_dte.ActiveSolutionProjects;
//only support 1 selected project
if (selectedProjects.Length == 1)
{
EnvDTE.Project project = (EnvDTE.Project)selectedProjects.GetValue(0);
if (project.FullName.EndsWith(".smproj"))
{
menuCommand.Visible = true;
}
}
}
}
}
void menuItem_BeforeQueryStatusCodeBehind(object sender, EventArgs e)
{
OleMenuCommand menuCommand = sender as OleMenuCommand;
if (menuCommand != null)
{
menuCommand.Visible = false; // default to not visible
if (_dte != null && _dte.SelectedItems != null && _dte.SelectedItems.Count == 1) //only support 1 selected file
{
foreach (EnvDTE.SelectedItem selectedItem in _dte.SelectedItems)
{
if (selectedItem.Name != null &&
selectedItem.Name.ToUpper().EndsWith(".bsmn".ToUpper())
)
{
menuCommand.Visible = true;
}
}
}
}
}
void menuItem_BeforeQueryStatusInstallIcon(object sender, EventArgs e)
{
OleMenuCommand menuCommand = sender as OleMenuCommand;
if (menuCommand != null)
{
menuCommand.Visible = false; // default to not visible
if (_dte != null && _dte.SelectedItems != null && _dte.SelectedItems.Count == 1) //only support 1 selected file
{
foreach (EnvDTE.SelectedItem selectedItem in _dte.SelectedItems)
{
if (selectedItem.Name != null &&
selectedItem.Name.ToUpper().EndsWith(".bsmn".ToUpper())
)
{
//Check if icon already installed and .bsmn files are associated with VS
try
{
if (Registry.CurrentUser.OpenSubKey("Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\FileExts\\.bsmn\\UserChoice", false) == null)
{
menuCommand.Visible = true;
}
}
catch { }
}
}
}
}
}
public void ShowMessage(string message, OLEMSGBUTTON msgButton, OLEMSGICON msgIcon)
{
IVsUIShell uiShell = (IVsUIShell)GetService(typeof(SVsUIShell));
Guid clsid = Guid.Empty;
int result;
Microsoft.VisualStudio.ErrorHandler.ThrowOnFailure(uiShell.ShowMessageBox(
0,
ref clsid,
"Bism Normalizer",
string.Format(CultureInfo.CurrentCulture, message, this.ToString()),
string.Empty,
0,
msgButton,
OLEMSGDEFBUTTON.OLEMSGDEFBUTTON_FIRST,
msgIcon,
0, // false
out result));
}
private void InitializeToolWindow(object sender, EventArgs e)
{
InitializeToolWindowInternal();
}
internal void InitializeToolWindowInternal(float dpiFactor = 0)
{
ToolWindowPane window = this.FindToolWindow(typeof(WarningList), 0, true);
if ((null == window) || (null == window.Frame))
{
throw new NotSupportedException(Resources.CanNotCreateWindow);
}
_validationOutput = (ValidationOutput)window.Window;
if (dpiFactor != 0)
{
_validationOutput.Rescale(dpiFactor);
}
_toolWindowFrame = (IVsWindowFrame)window.Frame;
ShowToolWindow();
}
public void ShowToolWindow()
{
if (_toolWindowFrame != null)
{
Microsoft.VisualStudio.ErrorHandler.ThrowOnFailure(_toolWindowFrame.Show());
}
}
private void InitializeDTE()
{
IVsShell shellService;
this._dte = this.GetService(typeof(SDTE)) as DTE2;
if (this._dte == null) // The IDE is not yet fully initialized
{
shellService = this.GetService(typeof(SVsShell)) as IVsShell;
this._dteInitializer = new DteInitializer(shellService, this.InitializeDTE);
}
else
{
this._dteInitializer = null;
_documentEvents = ((EnvDTE80.Events2)_dte.Events).get_DocumentEvents();
_documentEvents.DocumentOpened += new EnvDTE._dispDocumentEvents_DocumentOpenedEventHandler(DocumentEvents_DocumentOpened);
//Unfortunately, this does not fire for tabular projects - only regular C# type projects
_projectItemEvents = ((EnvDTE80.Events2)_dte.Events).ProjectItemsEvents;
_projectItemEvents.ItemRenamed += _projectItemEvents_ItemRenamed;
}
}
public DTE2 Dte => this._dte;
public ValidationOutput ValidationOutput
{
get
{
return this._validationOutput;
}
set
{
this._validationOutput = value;
}
}
public List<EditorPane> EditorPanes => _editorPanes;
#region IDisposable Pattern
/// <summary>
/// Releases the resources used by the Package object.
/// </summary>
public void Dispose()
{
Dispose(true);
}
/// <summary>
/// Releases the resources used by the Package object.
/// </summary>
/// <param name="disposing">This parameter determines whether the method has been called directly or indirectly by a user's code.</param>
protected override void Dispose(bool disposing)
{
try
{
Debug.WriteLine(string.Format(CultureInfo.CurrentCulture, "Entering Dispose() of: {0}", this.ToString()));
if (disposing)
{
if (_editorFactory != null)
{
_editorFactory.Dispose();
_editorFactory = null;
}
GC.SuppressFinalize(this);
}
}
finally
{
base.Dispose(disposing);
}
}
#endregion
EnvDTE.DocumentEvents _documentEvents;
void DocumentEvents_DocumentOpened(EnvDTE.Document document)
{
try
{
if (document.FullName.EndsWith(".bim"))
{
string message = "";
foreach (EditorPane editorPane in EditorPanes)
{
if (editorPane.BismNormalizerForm != null && editorPane.BismNormalizerForm.CompareState != CompareState.NotCompared)
{
// check if open diff has project that contains BIM file being opened.
if (editorPane.BismNormalizerForm.ComparisonInfo.ConnectionInfoSource.UseProject)
{
foreach (EnvDTE.ProjectItem projectItem in editorPane.BismNormalizerForm.ComparisonInfo.ConnectionInfoSource.Project.ProjectItems)
{
if (projectItem.Document != null && projectItem.Document.FullName == document.FullName)
{
editorPane.BismNormalizerForm.SetNotComparedState();
message += " - " + editorPane.Name + "\n";
break;
}
}
}
if (editorPane.BismNormalizerForm.CompareState != CompareState.NotCompared && editorPane.BismNormalizerForm.ComparisonInfo.ConnectionInfoTarget.UseProject)
{
foreach (EnvDTE.ProjectItem projectItem in editorPane.BismNormalizerForm.ComparisonInfo.ConnectionInfoTarget.Project.ProjectItems)
{
if (projectItem.Document != null && projectItem.Document.FullName == document.FullName)
{
editorPane.BismNormalizerForm.SetNotComparedState();
message += " - " + editorPane.Name + "\n";
break;
}
}
}
}
}
if (message.Length > 0)
{
ShowMessage("Opening this file will invalidate the following comparisons.\n" + message, OLEMSGBUTTON.OLEMSGBUTTON_OK, OLEMSGICON.OLEMSGICON_WARNING);
}
}
}
catch { }
}
EnvDTE.ProjectItemsEvents _projectItemEvents;
void _projectItemEvents_ItemRenamed(EnvDTE.ProjectItem projectItem, string oldName)
{
if (projectItem.IsOpen && oldName.EndsWith(".bsmn") && projectItem.Document != null)
{
this.ShowMessage("Changing file name while editor is open is not supported. File will close now.", OLEMSGBUTTON.OLEMSGBUTTON_OK, OLEMSGICON.OLEMSGICON_WARNING);
projectItem.Document.Close();
}
}
}
public class DteInitializer : IVsShellPropertyEvents
{
private IVsShell shellService;
private uint cookie;
private Action callback;
public DteInitializer(IVsShell shellService, Action callback)
{
int hr;
this.shellService = shellService;
this.callback = callback;
// Set an event handler to detect when the IDE is fully initialized
hr = this.shellService.AdviseShellPropertyChanges(this, out this.cookie);
Microsoft.VisualStudio.ErrorHandler.ThrowOnFailure(hr);
}
int IVsShellPropertyEvents.OnShellPropertyChange(int propid, object var)
{
int hr;
bool isZombie;
if (propid == (int)__VSSPROPID.VSSPROPID_Zombie)
{
isZombie = (bool)var;
if (!isZombie)
{
// Release the event handler to detect when the IDE is fully initialized
hr = this.shellService.UnadviseShellPropertyChanges(this.cookie);
Microsoft.VisualStudio.ErrorHandler.ThrowOnFailure(hr);
this.cookie = 0;
this.callback();
}
}
return VSConstants.S_OK;
}
}
}

View File

@ -0,0 +1,37 @@

#if DEBUG
using BismNormalizer.TabularCompare;
using BismNormalizer.TabularCompare.Core;
using System.Diagnostics;
namespace BismNormalizer
{
public static class DemoHarness
{
public static void Main()
{
using (Comparison c = ComparisonFactory.CreateComparison("C:\\TabularCompare1.bsmn"))
{
c.Connect();
c.CompareTabularModels();
//c.ComparisonObjects
c.ValidationMessage += HandleValidationMessage;
c.ValidateSelection();
c.Update();
c.Disconnect();
}
}
private static void HandleValidationMessage(object sender, ValidationMessageEventArgs e)
{
Debug.WriteLine(e.Message);
}
}
}
#endif

View File

@ -0,0 +1,190 @@
using System;
using System.Diagnostics;
using System.Globalization;
using System.Runtime.InteropServices;
using System.Security.Permissions;
using Microsoft.VisualStudio;
using Microsoft.VisualStudio.Shell.Interop;
using Microsoft.VisualStudio.Shell;
using IOleServiceProvider = Microsoft.VisualStudio.OLE.Interop.IServiceProvider;
namespace BismNormalizer
{
/// <summary>
/// Factory for creating our editor object. Extends from the IVsEditoryFactory interface
/// </summary>
[Guid(GuidList.guidBismNormalizerEditorFactoryString)]
public sealed class EditorFactory : IVsEditorFactory, IDisposable
{
private BismNormalizerPackage editorPackage;
private ServiceProvider vsServiceProvider;
public EditorFactory(BismNormalizerPackage package)
{
Debug.WriteLine(string.Format(CultureInfo.CurrentCulture, "Entering {0} constructor", this.ToString()));
this.editorPackage = package;
}
/// <summary>
/// Since we create a ServiceProvider which implements IDisposable we
/// also need to implement IDisposable to make sure that the ServiceProvider's
/// Dispose method gets called.
/// </summary>
public void Dispose()
{
if (vsServiceProvider != null)
{
vsServiceProvider.Dispose();
}
}
#region IVsEditorFactory Members
/// <summary>
/// Used for initialization of the editor in the environment
/// </summary>
/// <param name="psp">pointer to the service provider. Can be used to obtain instances of other interfaces
/// </param>
/// <returns></returns>
public int SetSite(Microsoft.VisualStudio.OLE.Interop.IServiceProvider psp)
{
vsServiceProvider = new ServiceProvider(psp);
return VSConstants.S_OK;
}
public object GetService(Type serviceType) => vsServiceProvider.GetService(serviceType);
// This method is called by the Environment (inside IVsUIShellOpenDocument::
// OpenStandardEditor and OpenSpecificEditor) to map a LOGICAL view to a
// PHYSICAL view. A LOGICAL view identifies the purpose of the view that is
// desired (e.g. a view appropriate for Debugging [LOGVIEWID_Debugging], or a
// view appropriate for text view manipulation as by navigating to a find
// result [LOGVIEWID_TextView]). A PHYSICAL view identifies an actual type
// of view implementation that an IVsEditorFactory can create.
//
// NOTE: Physical views are identified by a string of your choice with the
// one constraint that the default/primary physical view for an editor
// *MUST* use a NULL string as its physical view name (*pbstrPhysicalView = NULL).
//
// NOTE: It is essential that the implementation of MapLogicalView properly
// validates that the LogicalView desired is actually supported by the editor.
// If an unsupported LogicalView is requested then E_NOTIMPL must be returned.
//
// NOTE: The special Logical Views supported by an Editor Factory must also
// be registered in the local registry hive. LOGVIEWID_Primary is implicitly
// supported by all editor types and does not need to be registered.
// For example, an editor that supports a ViewCode/ViewDesigner scenario
// might register something like the following:
// HKLM\Software\Microsoft\VisualStudio\<version>\Editors\
// {...guidEditor...}\
// LogicalViews\
// {...LOGVIEWID_TextView...} = s ''
// {...LOGVIEWID_Code...} = s ''
// {...LOGVIEWID_Debugging...} = s ''
// {...LOGVIEWID_Designer...} = s 'Form'
//
public int MapLogicalView(ref Guid rguidLogicalView, out string pbstrPhysicalView)
{
pbstrPhysicalView = null; // initialize out parameter
// we support only a single physical view
if (VSConstants.LOGVIEWID_Primary == rguidLogicalView)
{
return VSConstants.S_OK; // primary view uses NULL as pbstrPhysicalView
}
else if (VSConstants.LOGVIEWID.TextView_guid == rguidLogicalView)
{
// Our editor supports FindInFiles, therefore we need to declare support for LOGVIEWID_TextView.
// In addition our EditorPane implements IVsCodeWindow and we also provide the
// VSSettings (pkgdef) metadata statement that we support LOGVIEWID_TextView via the following
// attribute on our Package class:
// [ProvideEditorLogicalView(typeof(EditorFactory), VSConstants.LOGVIEWID.TextView_string)]
pbstrPhysicalView = null; // our primary view implements IVsCodeWindow
return VSConstants.S_OK;
}
else
{
return VSConstants.E_NOTIMPL; // you must return E_NOTIMPL for any unrecognized rguidLogicalView values
}
}
public int Close() => VSConstants.S_OK;
/// <summary>
/// Used by the editor factory to create an editor instance. the environment first determines the
/// editor factory with the highest priority for opening the file and then calls
/// IVsEditorFactory.CreateEditorInstance. If the environment is unable to instantiate the document data
/// in that editor, it will find the editor with the next highest priority and attempt to so that same
/// thing.
/// NOTE: The priority of our editor is 32 as mentioned in the attributes on the package class.
///
/// Since our editor supports opening only a single view for an instance of the document data, if we
/// are requested to open document data that is already instantiated in another editor, or even our
/// editor, we return a value VS_E_INCOMPATIBLEDOCDATA.
/// </summary>
/// <param name="grfCreateDoc">Flags determining when to create the editor. Only open and silent flags
/// are valid
/// </param>
/// <param name="pszMkDocument">path to the file to be opened</param>
/// <param name="pszPhysicalView">name of the physical view</param>
/// <param name="pvHier">pointer to the IVsHierarchy interface</param>
/// <param name="itemid">Item identifier of this editor instance</param>
/// <param name="punkDocDataExisting">This parameter is used to determine if a document buffer
/// (DocData object) has already been created
/// </param>
/// <param name="ppunkDocView">Pointer to the IUnknown interface for the DocView object</param>
/// <param name="ppunkDocData">Pointer to the IUnknown interface for the DocData object</param>
/// <param name="pbstrEditorCaption">Caption mentioned by the editor for the doc window</param>
/// <param name="pguidCmdUI">the Command UI Guid. Any UI element that is visible in the editor has
/// to use this GUID. This is specified in the .vsct file
/// </param>
/// <param name="pgrfCDW">Flags for CreateDocumentWindow</param>
/// <returns></returns>
[SecurityPermission(SecurityAction.Demand, Flags = SecurityPermissionFlag.UnmanagedCode)]
public int CreateEditorInstance(
uint grfCreateDoc,
string pszMkDocument,
string pszPhysicalView,
IVsHierarchy pvHier,
uint itemid,
System.IntPtr punkDocDataExisting,
out System.IntPtr ppunkDocView,
out System.IntPtr ppunkDocData,
out string pbstrEditorCaption,
out Guid pguidCmdUI,
out int pgrfCDW)
{
Debug.WriteLine(string.Format(CultureInfo.CurrentCulture, "Entering {0} CreateEditorInstace()", this.ToString()));
// Initialize to null
ppunkDocView = IntPtr.Zero;
ppunkDocData = IntPtr.Zero;
pguidCmdUI = GuidList.guidBismNormalizerEditorFactory;
pgrfCDW = 0;
pbstrEditorCaption = null;
// Validate inputs
if ((grfCreateDoc & (VSConstants.CEF_OPENFILE | VSConstants.CEF_SILENT)) == 0)
{
return VSConstants.E_INVALIDARG;
}
if (punkDocDataExisting != IntPtr.Zero)
{
return VSConstants.VS_E_INCOMPATIBLEDOCDATA;
}
// Create the Document (editor)
EditorPane NewEditor = new EditorPane(editorPackage);
ppunkDocView = Marshal.GetIUnknownForObject(NewEditor);
ppunkDocData = Marshal.GetIUnknownForObject(NewEditor);
pbstrEditorCaption = "";
return VSConstants.S_OK;
}
#endregion
}
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,153 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="textBox1.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Top, Bottom, Left, Right</value>
</data>
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="textBox1.Location" type="System.Drawing.Point, System.Drawing">
<value>8, 8</value>
</data>
<data name="textBox1.Size" type="System.Drawing.Size, System.Drawing">
<value>136, 136</value>
</data>
<assembly alias="mscorlib" name="mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="textBox1.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="textBox1.Text">
<value />
</data>
<data name="&gt;&gt;textBox1.Name">
<value xml:space="preserve">textBox1</value>
</data>
<data name="&gt;&gt;textBox1.Parent">
<value xml:space="preserve">$this</value>
</data>
<data name="&gt;&gt;textBox1.ZOrder">
<value xml:space="preserve">0</value>
</data>
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<data name="&gt;&gt;$this.Name">
<value xml:space="preserve">EditorPane</value>
</data>
<data name="&gt;&gt;$this.Type">
<value xml:space="preserve">System.Windows.Forms.UserControl, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
</root>

View File

@ -0,0 +1,13 @@
// This file is used by Code Analysis to maintain SuppressMessage
// attributes that are applied to this project. Project-level
// suppressions either have no target or are given a specific target
// and scoped to a namespace, type, member, etc.
//
// To add a suppression to this file, right-click the message in the
// Error List, point to "Suppress Message(s)", and click "In Project
// Suppression File". You do not need to add suppressions to this
// file manually.
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1017:MarkAssembliesWithComVisible")]
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes", Scope = "member", Target = "BismNormalizer.DteInitializer.#Microsoft.VisualStudio.Shell.Interop.IVsShellPropertyEvents.OnShellPropertyChange(System.Int32,System.Object)")]
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes", Scope = "member", Target = "BismNormalizer.TabularCompare.DteInitializer.#Microsoft.VisualStudio.Shell.Interop.IVsShellPropertyEvents.OnShellPropertyChange(System.Int32,System.Object)")]

View File

@ -0,0 +1,16 @@
// Guids.cs
// MUST match guids.h
using System;
namespace BismNormalizer
{
static class GuidList
{
public const string guidBismNormalizerPkgString = "d094957e-b4bc-493f-b473-a0da301b21a1";
public const string guidBismNormalizerCmdSetString = "1bbd436a-e530-49da-aea2-0a69108a1c57";
public const string guidBismNormalizerEditorFactoryString = "53f713ab-4e20-4874-831b-168ad70597b0";
public static readonly Guid guidBismNormalizerCmdSet = new Guid(guidBismNormalizerCmdSetString);
public static readonly Guid guidBismNormalizerEditorFactory = new Guid(guidBismNormalizerEditorFactoryString);
};
}

Binary file not shown.

View File

@ -0,0 +1,28 @@
using System;
using System.Runtime.InteropServices;
namespace BismNormalizer
{
/// <summary>
/// This class will contain all methods that we need to import.
/// </summary>
internal class NativeMethods
{
public const int WM_LBUTTONDOWN = 0x0201;
public const int WM_LBUTTONDBLCLK = 0x0203;
public const int WM_RBUTTONDOWN = 0x0204;
public const int WM_MBUTTONDOWN = 0x0207;
//Including a private constructor to prevent a compiler-generated default constructor
private NativeMethods()
{
}
// Import the SendMessage function from user32.dll
[DllImport("user32.dll")]
public static extern IntPtr SendMessage(IntPtr hwnd,
int Msg,
IntPtr wParam,
[MarshalAs(UnmanagedType.IUnknown)] out object lParam);
}
}

View File

@ -0,0 +1,16 @@
// PkgCmdID.cs
// MUST match PkgCmdID.h
using System;
namespace BismNormalizer
{
static class PkgCmdIDList
{
public const uint cmdidToolMenuNewComparison = 0x100;
public const uint cmdidValidationOutput = 0x101;
public const uint cmdidProjectMenuNewComparison = 0x0103;
public const uint cmdidFileMenuViewCode = 0x0104;
public const uint cmdidFileMenuViewDesigner = 0x0105;
public const uint cmdidFileMenuInstallIcon = 0x0106;
};
}

View File

@ -0,0 +1,33 @@
using System;
using System.Reflection;
using System.Resources;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("BismNormalizer")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("BismNormalizer")]
[assembly: AssemblyProduct("BismNormalizer")]
[assembly: AssemblyCopyright("")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
[assembly: ComVisible(false)]
[assembly: CLSCompliant(false)]
[assembly: NeutralResourcesLanguage("en-US")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("4.0.0.11")]
[assembly: AssemblyFileVersion("4.0.0.11")]

View File

@ -0,0 +1,151 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace BismNormalizer {
using System;
/// <summary>
/// A strongly-typed resource class, for looking up localized strings, etc.
/// </summary>
// This class was auto-generated by the StronglyTypedResourceBuilder
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources() {
}
/// <summary>
/// Returns the cached ResourceManager instance used by this class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("BismNormalizer.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap ButtonSwitch {
get {
object obj = ResourceManager.GetObject("ButtonSwitch", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized string similar to Can not create tool window..
/// </summary>
internal static string CanNotCreateWindow {
get {
return ResourceManager.GetString("CanNotCreateWindow", resourceCulture);
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap LogoSmall {
get {
object obj = ResourceManager.GetObject("LogoSmall", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap LogoSmall1 {
get {
object obj = ResourceManager.GetObject("LogoSmall1", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap Progress {
get {
object obj = ResourceManager.GetObject("Progress", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap ProgressCancel {
get {
object obj = ResourceManager.GetObject("ProgressCancel", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap ProgressError {
get {
object obj = ResourceManager.GetObject("ProgressError", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap ProgressSuccess {
get {
object obj = ResourceManager.GetObject("ProgressSuccess", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized string similar to BISM Normalizer Warning List.
/// </summary>
internal static string ToolWindowTitle {
get {
return ResourceManager.GetString("ToolWindowTitle", resourceCulture);
}
}
}
}

View File

@ -0,0 +1,148 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="CanNotCreateWindow" xml:space="preserve">
<value>Can not create tool window.</value>
</data>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="Progress" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>Resources\Progress.gif;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="ToolWindowTitle" xml:space="preserve">
<value>BISM Normalizer Warning List</value>
</data>
<data name="LogoSmall" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>Resources\LogoSmall.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="ButtonSwitch" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>Resources\ButtonSwitch.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="LogoSmall1" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>Resources\LogoSmall.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="ProgressSuccess" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>Resources\ProgressCheck.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="ProgressError" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>Resources\ProgressError.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="ProgressCancel" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>Resources\ProgressWarning.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root>

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

View File

@ -0,0 +1,50 @@
BY INSTALLING OR USING THIS SOFTWARE, YOU ARE BECOMING A PARTY TO, AND ARE CONSENTING TO BE BOUND BY, THIS AGREEMENT. IF YOU DO NOT AGREE TO ALL OF THE TERMS OF THIS AGREEMENT, DO NOT INSTALL OR USE THIS SOFTWARE.
DEFINITIONS
1. "Software" means BISM Normalizer in object code form, documentation, and updates included in software maintenance
2. "Licensee" means:
a. the individual evaluating the Software during a trial
b. the individual, company, corporation, or organization that purchased a license(s) for the Software
3. "Authorized User" means:
a. the individual evaluating the Software during a trial
b. an individual that purchased a license(s) for the Software
c. an employee or independent contractor who might at any time use the Software, of the company, corporation, or organization that purchased a license(s) for the Software
d. an entity has one Authorized User for each Single User Licnese purchased; an entity has up to six Authorized Users for each Bulk Purchase Licnese purchased
4. "Licensor" means Christian B. Wade
5. "Activation Key" means a value that identifies a Licensee, and code to activate a genuine copy of the Software
GRANT
Subject to the terms of this Agreement, Licensor hereby grants Licensee a non-transferable, non-exclusive, non-sub-licensable, limited license that allows:
1. Authorized User(s) to install the licensed version of the Software on computer PCs where potential use of the Software is restricted exclusively to Authorized User(s)
2. Licensee to distribute an Activation Key(s) to Authorized User(s)
3. Authorized User(s) to use the Software such that the number of concurrent instances of the Software does not exceed one for a Single User License; six for a Bulk Purchase License
4. Licensee to make a copy of the Software for archival purposes, provided the copy contains all of the proprietary notices of the Software
RESTRICTIONS
Licensee will not, and will have no right to:
1. distribute, use, or transfer an Activation Key(s) that has been superseded by an Activation Key(s) provided with software maintenance or upon consolidation of Activation Keys
2. modify, translate, reverse engineer, decompile, disassemble (except to the extent applicable laws specifically prohibit such restriction), create derivative works based on, or otherwise attempt to discover the source code or underlying ideas or algorithms of the Software
3. sell, rent, lease, distribute, or otherwise transfer rights to the Software without prior written consent from Licensor
4. remove any proprietary notices or labels from the Software
TITLE AND COPYRIGHT
Title, ownership rights, intellectual property rights, and copyright to the Software, and any copies or portions thereof, shall remain in Licensor. The Software is protected by United States copyright laws and international treaty provisions.
DISCLAIMER OF WARRANTY
THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND. LICENSOR HEREBY DISCLAIMS ALL EXPRESS OR IMPLIED WARRANTIES, INCLUDING WITHOUT LIMITATION WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS AGREEMENT. SOME U.S. STATES DO NOT ALLOW EXCLUSIONS OF AN IMPLIED WARRANTY, SO THIS DISCLAIMER MAY NOT APPLY TO LICENSEE. LICENSEE MAY HAVE OTHER LEGAL RIGHTS THAT VARY FROM STATE TO STATE OR BY JURISDICTION.
LIMITATION OF LIABILITY
LICENSEE ASSUMES THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE. LICENSOR ASSUMES NO LIABILITY FOR THE COST OF ANY SERVICE OR REPAIR IF THE SOFTWARE IS DEFECTIVE. UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, TORT, CONTRACT, STRICT LIABILITY, OR OTHERWISE, SHALL LICENSOR, OR ITS LICENSORS, SUPPLIERS OR RESELLERS, BE LIABLE TO LICENSEE OR ANY OTHER PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOST PROFITS, LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES. IN NO EVENT WILL LICENSOR BE LIABLE FOR ANY DAMAGES IN EXCESS OF THE MONEY PAID FOR THE SOFTWARE, EVEN IF LICENSOR SHALL HAVE BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES, OR FOR ANY CLAIM BY ANY OTHER PARTY. THIS LIMITATION OF LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY TO THE EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION. FURTHERMORE, SOME U.S. STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS LIMITATION AND EXCLUSION MAY NOT APPLY TO LICENSEE.
TERMINATION
The license granted herein shall be perpetual. If Licensee fails to comply with any of the terms of this Agreement, this Agreement and the rights granted herein will terminate immediately. Licensor may, at its sole discretion and at any time, terminate this Agreement. On termination, Licensee must cease using and destroy all copies of the Software.
EXPORT CONTROLS
Licensee shall comply with all export laws, restrictions and regulations of the United States. Licensee shall not export, re-export or otherwise transfer the Software to any country for which the United States maintains an embargo, or to any person or entity on the U.S. Department of Treasury List of Specially Designated Nationals or the U.S. Department of Commerce Denied Persons List or Entity List. Licensee represents and warrants that licensee is not located in, under the control of, or a national or resident of any restricted country or on any such list.
U.S. GOVERNMENT RESTRICTED RIGHTS
Use, duplication or disclosure by the Government is subject to restrictions set forth in subparagraphs (a) through (d) of the Commercial Computer-Restricted Rights clause at FAR 52.227-19 when applicable, or in subparagraph (c) (1) (ii) of the Rights in Technical Data and Computer Software clause in DFARS 252.227-7013, and in similar clauses in the NASA FAR Supplement.
ENTIRE AGREEMENT
This Agreement represents the complete agreement concerning this license between the parties and supersedes all prior agreements and representations between them. It may be amended only in writing executed by both parties. If any provision of this Agreement is held to be unenforceable for any reason, such provision shall be reformed only to the extent necessary to make it enforceable. This Agreement shall be governed by and construed under California law as such law applies to agreements between California residents entered into and to be performed within California.

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

View File

@ -0,0 +1,290 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace BismNormalizer {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.1.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
public static Settings Default {
get {
return defaultInstance;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("localhost|")]
public string TargetServerAutoCompleteEntries {
get {
return ((string)(this["TargetServerAutoCompleteEntries"]));
}
set {
this["TargetServerAutoCompleteEntries"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("")]
public string TargetCatalog {
get {
return ((string)(this["TargetCatalog"]));
}
set {
this["TargetCatalog"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("localhost|")]
public string SourceServerAutoCompleteEntries {
get {
return ((string)(this["SourceServerAutoCompleteEntries"]));
}
set {
this["SourceServerAutoCompleteEntries"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("")]
public string SourceCatalog {
get {
return ((string)(this["SourceCatalog"]));
}
set {
this["SourceCatalog"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("True")]
public bool InformationalMessagesVisible {
get {
return ((bool)(this["InformationalMessagesVisible"]));
}
set {
this["InformationalMessagesVisible"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("True")]
public bool WarningsVisible {
get {
return ((bool)(this["WarningsVisible"]));
}
set {
this["WarningsVisible"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("True")]
public bool ToolbarVisible {
get {
return ((bool)(this["ToolbarVisible"]));
}
set {
this["ToolbarVisible"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("False")]
public bool OptionRoles {
get {
return ((bool)(this["OptionRoles"]));
}
set {
this["OptionRoles"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("False")]
public bool OptionPartitions {
get {
return ((bool)(this["OptionPartitions"]));
}
set {
this["OptionPartitions"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("True")]
public bool OptionMeasureDependencies {
get {
return ((bool)(this["OptionMeasureDependencies"]));
}
set {
this["OptionMeasureDependencies"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("False")]
public bool OptionPerspectives {
get {
return ((bool)(this["OptionPerspectives"]));
}
set {
this["OptionPerspectives"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("True")]
public bool OptionMergePerspectives {
get {
return ((bool)(this["OptionMergePerspectives"]));
}
set {
this["OptionMergePerspectives"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("False")]
public bool OptionDisplayFolders {
get {
return ((bool)(this["OptionDisplayFolders"]));
}
set {
this["OptionDisplayFolders"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("False")]
public bool OptionActions {
get {
return ((bool)(this["OptionActions"]));
}
set {
this["OptionActions"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("False")]
public bool OptionTranslations {
get {
return ((bool)(this["OptionTranslations"]));
}
set {
this["OptionTranslations"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("Default")]
public string OptionProcessingOption {
get {
return ((string)(this["OptionProcessingOption"]));
}
set {
this["OptionProcessingOption"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("False")]
public bool OptionTransaction {
get {
return ((bool)(this["OptionTransaction"]));
}
set {
this["OptionTransaction"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("True")]
public bool OptionAffectedTables {
get {
return ((bool)(this["OptionAffectedTables"]));
}
set {
this["OptionAffectedTables"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("False")]
public bool OptionCultures {
get {
return ((bool)(this["OptionCultures"]));
}
set {
this["OptionCultures"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("True")]
public bool OptionMergeCultures {
get {
return ((bool)(this["OptionMergeCultures"]));
}
set {
this["OptionMergeCultures"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("False")]
public bool OptionRetainPartitions {
get {
return ((bool)(this["OptionRetainPartitions"]));
}
set {
this["OptionRetainPartitions"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("False")]
public bool OptionHighDpiLocal {
get {
return ((bool)(this["OptionHighDpiLocal"]));
}
set {
this["OptionHighDpiLocal"] = value;
}
}
}
}

View File

@ -0,0 +1,27 @@
namespace BismNormalizer
{
// This class allows you to handle specific events on the settings class:
// The SettingChanging event is raised before a setting's value is changed.
// The PropertyChanged event is raised after a setting's value is changed.
// The SettingsLoaded event is raised after the setting values are loaded.
// The SettingsSaving event is raised before the setting values are saved.
internal sealed partial class Settings {
public Settings() {
// // To add event handlers for saving and changing settings, uncomment the lines below:
//
// this.SettingChanging += this.SettingChangingEventHandler;
//
// this.SettingsSaving += this.SettingsSavingEventHandler;
//
}
private void SettingChangingEventHandler(object sender, System.Configuration.SettingChangingEventArgs e) {
// Add code to handle the SettingChangingEvent event here.
}
private void SettingsSavingEventHandler(object sender, System.ComponentModel.CancelEventArgs e) {
// Add code to handle the SettingsSaving event here.
}
}
}

View File

@ -0,0 +1,72 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="BismNormalizer" GeneratedClassName="Settings">
<Profiles />
<Settings>
<Setting Name="TargetServerAutoCompleteEntries" Type="System.String" Scope="User">
<Value Profile="(Default)">localhost|</Value>
</Setting>
<Setting Name="TargetCatalog" Type="System.String" Scope="User">
<Value Profile="(Default)" />
</Setting>
<Setting Name="SourceServerAutoCompleteEntries" Type="System.String" Scope="User">
<Value Profile="(Default)">localhost|</Value>
</Setting>
<Setting Name="SourceCatalog" Type="System.String" Scope="User">
<Value Profile="(Default)" />
</Setting>
<Setting Name="InformationalMessagesVisible" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">True</Value>
</Setting>
<Setting Name="WarningsVisible" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">True</Value>
</Setting>
<Setting Name="ToolbarVisible" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">True</Value>
</Setting>
<Setting Name="OptionRoles" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
<Setting Name="OptionPartitions" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
<Setting Name="OptionMeasureDependencies" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">True</Value>
</Setting>
<Setting Name="OptionPerspectives" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
<Setting Name="OptionMergePerspectives" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">True</Value>
</Setting>
<Setting Name="OptionDisplayFolders" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
<Setting Name="OptionActions" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
<Setting Name="OptionTranslations" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
<Setting Name="OptionProcessingOption" Type="System.String" Scope="User">
<Value Profile="(Default)">Default</Value>
</Setting>
<Setting Name="OptionTransaction" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
<Setting Name="OptionAffectedTables" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">True</Value>
</Setting>
<Setting Name="OptionCultures" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
<Setting Name="OptionMergeCultures" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">True</Value>
</Setting>
<Setting Name="OptionRetainPartitions" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
<Setting Name="OptionHighDpiLocal" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
</Settings>
</SettingsFile>

View File

@ -0,0 +1,209 @@
//Todo2: delete file
////------------------------------------------------------------------------------
//// <auto-generated>
//// This code was generated by a tool.
//// Runtime Version:4.0.30319.18052
////
//// Changes to this file may cause incorrect behavior and will be lost if
//// the code is regenerated.
//// </auto-generated>
////------------------------------------------------------------------------------
//namespace BismNormalizer {
// [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
// [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")]
// internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
// private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
// public static Settings Default {
// get {
// return defaultInstance;
// }
// }
// [global::System.Configuration.UserScopedSettingAttribute()]
// [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
// [global::System.Configuration.DefaultSettingValueAttribute("localhost|")]
// public string TargetServerAutoCompleteEntries {
// get {
// return ((string)(this["TargetServerAutoCompleteEntries"]));
// }
// set {
// this["TargetServerAutoCompleteEntries"] = value;
// }
// }
// [global::System.Configuration.UserScopedSettingAttribute()]
// [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
// [global::System.Configuration.DefaultSettingValueAttribute("")]
// public string TargetCatalog {
// get {
// return ((string)(this["TargetCatalog"]));
// }
// set {
// this["TargetCatalog"] = value;
// }
// }
// [global::System.Configuration.UserScopedSettingAttribute()]
// [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
// [global::System.Configuration.DefaultSettingValueAttribute("localhost|")]
// public string SourceServerAutoCompleteEntries {
// get {
// return ((string)(this["SourceServerAutoCompleteEntries"]));
// }
// set {
// this["SourceServerAutoCompleteEntries"] = value;
// }
// }
// [global::System.Configuration.UserScopedSettingAttribute()]
// [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
// [global::System.Configuration.DefaultSettingValueAttribute("")]
// public string SourceCatalog {
// get {
// return ((string)(this["SourceCatalog"]));
// }
// set {
// this["SourceCatalog"] = value;
// }
// }
// [global::System.Configuration.UserScopedSettingAttribute()]
// [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
// [global::System.Configuration.DefaultSettingValueAttribute("True")]
// public bool InformationalMessagesVisible {
// get {
// return ((bool)(this["InformationalMessagesVisible"]));
// }
// set {
// this["InformationalMessagesVisible"] = value;
// }
// }
// [global::System.Configuration.UserScopedSettingAttribute()]
// [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
// [global::System.Configuration.DefaultSettingValueAttribute("True")]
// public bool WarningsVisible {
// get {
// return ((bool)(this["WarningsVisible"]));
// }
// set {
// this["WarningsVisible"] = value;
// }
// }
// [global::System.Configuration.UserScopedSettingAttribute()]
// [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
// [global::System.Configuration.DefaultSettingValueAttribute("True")]
// public bool ToolbarVisible {
// get {
// return ((bool)(this["ToolbarVisible"]));
// }
// set {
// this["ToolbarVisible"] = value;
// }
// }
// [global::System.Configuration.UserScopedSettingAttribute()]
// [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
// [global::System.Configuration.DefaultSettingValueAttribute("False")]
// public bool OptionRoles {
// get {
// return ((bool)(this["OptionRoles"]));
// }
// set {
// this["OptionRoles"] = value;
// }
// }
// [global::System.Configuration.UserScopedSettingAttribute()]
// [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
// [global::System.Configuration.DefaultSettingValueAttribute("False")]
// public bool OptionPartitions {
// get {
// return ((bool)(this["OptionPartitions"]));
// }
// set {
// this["OptionPartitions"] = value;
// }
// }
// [global::System.Configuration.UserScopedSettingAttribute()]
// [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
// [global::System.Configuration.DefaultSettingValueAttribute("True")]
// public bool OptionMeasureDependencies {
// get {
// return ((bool)(this["OptionMeasureDependencies"]));
// }
// set {
// this["OptionMeasureDependencies"] = value;
// }
// }
// [global::System.Configuration.UserScopedSettingAttribute()]
// [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
// [global::System.Configuration.DefaultSettingValueAttribute("False")]
// public bool OptionPerspectives {
// get {
// return ((bool)(this["OptionPerspectives"]));
// }
// set {
// this["OptionPerspectives"] = value;
// }
// }
// [global::System.Configuration.UserScopedSettingAttribute()]
// [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
// [global::System.Configuration.DefaultSettingValueAttribute("True")]
// public bool OptionMergePerspectives {
// get {
// return ((bool)(this["OptionMergePerspectives"]));
// }
// set {
// this["OptionMergePerspectives"] = value;
// }
// }
// [global::System.Configuration.UserScopedSettingAttribute()]
// [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
// [global::System.Configuration.DefaultSettingValueAttribute("False")]
// public bool OptionDisplayFolders {
// get {
// return ((bool)(this["OptionDisplayFolders"]));
// }
// set {
// this["OptionDisplayFolders"] = value;
// }
// }
// [global::System.Configuration.UserScopedSettingAttribute()]
// [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
// [global::System.Configuration.DefaultSettingValueAttribute("False")]
// public bool OptionActions {
// get {
// return ((bool)(this["OptionActions"]));
// }
// set {
// this["OptionActions"] = value;
// }
// }
// [global::System.Configuration.UserScopedSettingAttribute()]
// [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
// [global::System.Configuration.DefaultSettingValueAttribute("False")]
// public bool OptionTranslations {
// get {
// return ((bool)(this["OptionTranslations"]));
// }
// set {
// this["OptionTranslations"] = value;
// }
// }
// }
//}

View File

@ -0,0 +1,35 @@
using System;
namespace BismNormalizer.TabularCompare
{
/// <summary>
/// Initializes data for the Comparison.PasswordPrompt event.
/// </summary>
public class BlobKeyEventArgs : EventArgs
{
/// <summary>
/// Gets or sets the authentication kind.
/// </summary>
public string AuthenticationKind { get; set; }
/// <summary>
/// Gets or sets the name of the data source.
/// </summary>
public string DataSourceName { get; set; }
/// <summary>
/// Gets or sets the password.
/// </summary>
public string AccountKey { get; set; }
/// <summary>
/// Gets or sets the privacy level.
/// </summary>
public string PrivacyLevel { get; set; }
/// <summary>
/// Gets or sets a value indicating if the user cancelled the deployment.
/// </summary>
public bool UserCancelled { get; set; }
}
}

View File

@ -0,0 +1,91 @@
using Microsoft.AnalysisServices;
using System;
using System.Collections.Generic;
using System.IO;
using System.Xml.Serialization;
using BismNormalizer.TabularCompare.Core;
namespace BismNormalizer.TabularCompare
{
/// <summary>
/// Class for instantiation of Core.Comparison objects using simple factory design pattern.
/// </summary>
public static class ComparisonFactory
{
// Factory pattern: https://msdn.microsoft.com/en-us/library/orm-9780596527730-01-05.aspx
private static List<int> _supportedCompatibilityLevels = new List<int>() { 1100, 1103, 1200, 1400 };
/// <summary>
/// Uses factory design pattern to return an object of type Core.Comparison, which is instantiated using MultidimensionalMetadata.Comparison or TabularMeatadata.Comparison depending on SSAS compatibility level. Use this overload when running in Visual Studio.
/// </summary>
/// <param name="comparisonInfo">ComparisonInfo object for the comparison.</param>
/// <param name="userCancelled">If use decides not to close .bim file(s) in Visual Studio, returns true.</param>
/// <returns>Core.Comparison object</returns>
public static Comparison CreateComparison(ComparisonInfo comparisonInfo, out bool userCancelled)
{
//This overload is for running in Visual Studio, so can set PromptForDatabaseProcessing = true
comparisonInfo.PromptForDatabaseProcessing = true;
// Need to ensure compatibility levels get initialized here (instead of comparisonInfo initialization properties). This also serves to prep databases on workspace server while finding compatibility levels
comparisonInfo.InitializeCompatibilityLevels(out userCancelled);
if (userCancelled)
{
return null;
}
return CreateComparisonInitialized(comparisonInfo);
}
/// <summary>
/// Uses factory design pattern to return an object of type Core.Comparison, which is instantiated using MultidimensionalMetadata.Comparison or TabularMeatadata.Comparison depending on SSAS compatibility level.
/// </summary>
/// <param name="bsmnFile">Full path to the BSMN file.</param>
/// <returns>Core.Comparison object</returns>
public static Comparison CreateComparison(string bsmnFile)
{
ComparisonInfo comparisonInfo = ComparisonInfo.DeserializeBsmnFile(bsmnFile);
return CreateComparison(comparisonInfo);
}
/// <summary>
/// Uses factory design pattern to return an object of type Core.Comparison, which is instantiated using MultidimensionalMetadata.Comparison or TabularMeatadata.Comparison depending on SSAS compatibility level.
/// </summary>
/// <param name="comparisonInfo">ComparisonInfo object for the comparison.</param>
/// <returns>Core.Comparison object</returns>
public static Comparison CreateComparison(ComparisonInfo comparisonInfo)
{
comparisonInfo.InitializeCompatibilityLevels();
return CreateComparisonInitialized(comparisonInfo);
}
private static Comparison CreateComparisonInitialized(ComparisonInfo comparisonInfo)
{
if (comparisonInfo.SourceCompatibilityLevel != comparisonInfo.TargetCompatibilityLevel && !(comparisonInfo.SourceCompatibilityLevel == 1200 && comparisonInfo.TargetCompatibilityLevel == 1400))
{
throw new ConnectionException($"This combination of mixed compatibility levels is not supported.\nSource is {Convert.ToString(comparisonInfo.SourceCompatibilityLevel)} and target is {Convert.ToString(comparisonInfo.TargetCompatibilityLevel)}.");
}
if (comparisonInfo.SourceDirectQuery != comparisonInfo.TargetDirectQuery)
{
throw new ConnectionException($"Mixed DirectQuery settings are not supported.\nSource is {(comparisonInfo.SourceDirectQuery ? "On" : "Off")} and target is {(comparisonInfo.TargetDirectQuery ? "On" : "Off")}.");
}
//We know both models have same compatibility level, but is it supported?
if (!_supportedCompatibilityLevels.Contains(comparisonInfo.SourceCompatibilityLevel))
{
throw new ConnectionException($"Models have compatibility level of {Convert.ToString(comparisonInfo.SourceCompatibilityLevel)}, which is not supported by this version of BISM Normalizer.\nPlease check http://bism-normalizer.com/purchase for other versions.");
}
if (comparisonInfo.SourceCompatibilityLevel >= 1200)
{
return new TabularMetadata.Comparison(comparisonInfo);
}
else
{
return new MultidimensionalMetadata.Comparison(comparisonInfo);
}
}
}
}

View File

@ -0,0 +1,238 @@
using EnvDTE;
using System;
using System.Collections.Generic;
using System.IO;
using System.Windows.Forms;
using System.Xml.Serialization;
namespace BismNormalizer.TabularCompare
{
/// <summary>
/// Information about the comparison. This is serialized/deserialized to/from the BSMN file.
/// </summary>
public class ComparisonInfo
{
private ConnectionInfo _connectionInfoSource;
private ConnectionInfo _connectionInfoTarget;
private OptionsInfo _optionsInfo;
private SkipSelectionCollection _skipSelectionCollection;
private int _sourceCompatibilityLevel;
private int _targetCompatibilityLevel;
private bool _sourceDirectQuery;
private bool _targetDirectQuery;
private bool _promptForDatabaseProcessing;
/// <summary>
/// Initializes a new instance of the ComparisonInfo class.
/// </summary>
/// <param name="comparisonInfo"></param>
public ComparisonInfo()
{
_connectionInfoSource = new ConnectionInfo();
_connectionInfoTarget = new ConnectionInfo();
_optionsInfo = new OptionsInfo();
_skipSelectionCollection = new SkipSelectionCollection();
}
#region Properties
/// <summary>
/// Information about the source connection.
/// </summary>
public ConnectionInfo ConnectionInfoSource
{
get { return _connectionInfoSource; }
set { _connectionInfoSource = value; }
}
/// <summary>
/// Information about the target connection.
/// </summary>
public ConnectionInfo ConnectionInfoTarget
{
get { return _connectionInfoTarget; }
set { _connectionInfoTarget = value; }
}
/// <summary>
/// Information about the options selected for the comparison.
/// </summary>
public OptionsInfo OptionsInfo
{
get { return _optionsInfo; }
set { _optionsInfo = value; }
}
/// <summary>
/// Collection of SkipSelection objects.
/// </summary>
public SkipSelectionCollection SkipSelections
{
get { return _skipSelectionCollection; }
set { _skipSelectionCollection = value; }
}
/// <summary>
/// SSAS compatibility level for the source tabular model.
/// </summary>
[XmlIgnore()]
public int SourceCompatibilityLevel => _sourceCompatibilityLevel;
/// <summary>
/// SSAS compatibility level for the target tabular model.
/// </summary>
[XmlIgnore()]
public int TargetCompatibilityLevel => _targetCompatibilityLevel;
/// <summary>
/// Flag depending on whehter source tabular model is in DirectQuery mode.
/// </summary>
[XmlIgnore()]
public bool SourceDirectQuery => _sourceDirectQuery;
/// <summary>
/// Flag depending on whehter target tabular model is in DirectQuery mode.
/// </summary>
[XmlIgnore()]
public bool TargetDirectQuery => _targetDirectQuery;
/// <summary>
/// Flag is false if simple database deployment occurs without processing, and without raising the Comparison.DatabaseDeployment event. Typically set for execution from command line.
/// </summary>
[XmlIgnore()]
public bool PromptForDatabaseProcessing
{
get { return _promptForDatabaseProcessing; }
set { _promptForDatabaseProcessing = value; }
}
#endregion
/// <summary>
/// Deserialize BSMN file into instance of ComparisonInfo.
/// </summary>
/// <param name="bsmnFile">BSMN file to be deserialized.</param>
/// <returns>Deserialized instance of ComparisonInfo.</returns>
public static ComparisonInfo DeserializeBsmnFile(string bsmnFile)
{
if (!File.Exists(bsmnFile))
{
throw new FileNotFoundException($"File not found {bsmnFile}.");
}
XmlSerializer reader = new XmlSerializer(typeof(ComparisonInfo));
StreamReader file = new StreamReader(bsmnFile);
return (ComparisonInfo)reader.Deserialize(file);
}
/// <summary>
/// Finds models' compatibility levels (and preps databases on workspace servers for comparison). This overload to be used when client is not Visual Studio - e.g. command line.
/// </summary>
/// <param name="compatibilityLevelSource"></param>
/// <param name="compatibilityLevelTarget"></param>
public void InitializeCompatibilityLevels()
{
ConnectionInfoSource.InitializeCompatibilityLevel();
ConnectionInfoTarget.InitializeCompatibilityLevel();
PopulateDatabaseProperties();
}
/// <summary>
/// Finds model compatibility levels (and preps databases on workspace servers for comparison). This overload to be used when running in Visual Studio. Allows user to cancel if doesn't want to close .bim file(s).
/// </summary>
/// <param name="compatibilityLevelSource"></param>
/// <param name="compatibilityLevelTarget"></param>
/// <param name="userCancelled"></param>
public void InitializeCompatibilityLevels(out bool userCancelled)
{
//Check if any open bim files that need to be closed
bool closedSourceBimFile;
bool closedTargetBimFile;
CloseProjectBimFiles(out closedSourceBimFile, out closedTargetBimFile, out userCancelled);
if (userCancelled)
{
return;
}
//Passing closedSourceBimFile so doesn't run bim file script if user just closed it (more efficient)
ConnectionInfoSource.InitializeCompatibilityLevel(closedSourceBimFile);
ConnectionInfoTarget.InitializeCompatibilityLevel(closedTargetBimFile);
PopulateDatabaseProperties();
}
private void PopulateDatabaseProperties()
{
_sourceCompatibilityLevel = ConnectionInfoSource.CompatibilityLevel;
_targetCompatibilityLevel = ConnectionInfoTarget.CompatibilityLevel;
_sourceDirectQuery = ConnectionInfoSource.DirectQuery;
_targetDirectQuery = ConnectionInfoTarget.DirectQuery;
}
private void CloseProjectBimFiles(out bool closeSourceBimFile, out bool closeTargetBimFile, out bool userCancelled)
{
closeSourceBimFile = false;
closeTargetBimFile = false;
userCancelled = false;
List<ProjectItem> projectItemsToClose = new List<ProjectItem>();
if (ConnectionInfoSource.UseProject)
{
foreach (ProjectItem sourceProjectItem in ConnectionInfoSource.Project.ProjectItems)
{
if (sourceProjectItem.Name.EndsWith(".bim") && sourceProjectItem.IsOpen)
{
projectItemsToClose.Add(sourceProjectItem);
closeSourceBimFile = true;
break;
}
}
}
if (ConnectionInfoTarget.UseProject)
{
foreach (ProjectItem targetProjectItem in ConnectionInfoTarget.Project.ProjectItems)
{
if (targetProjectItem.Name.EndsWith(".bim") && targetProjectItem.IsOpen)
{
// check if user has source/target as the same project
if (!(projectItemsToClose.Count == 1 && projectItemsToClose[0].Document.FullName == targetProjectItem.Document.FullName))
{
projectItemsToClose.Add(targetProjectItem);
closeTargetBimFile = true;
break;
}
}
}
}
if (projectItemsToClose.Count > 0)
{
string filesToClose = "";
foreach (ProjectItem projectItemToClose in projectItemsToClose)
{
filesToClose += $"\n- {projectItemToClose.ContainingProject.Name.Replace(".smproj", "")}\\{projectItemToClose.Name}";
}
if (MessageBox.Show($"BISM Normalizer needs to close the following file(s) that are\nopen in Visual Studio. Do you want to continue?{filesToClose}", "BISM Normalizer", MessageBoxButtons.YesNo, MessageBoxIcon.Question) != DialogResult.Yes)
{
userCancelled = true;
}
else
{
foreach (ProjectItem projectItemToClose in projectItemsToClose)
{
if (projectItemToClose.Document.Saved)
{
projectItemToClose.Document.Close(vsSaveChanges.vsSaveChangesNo);
}
else
{
projectItemToClose.Document.Close(vsSaveChanges.vsSaveChangesYes);
}
}
}
}
}
}
}

View File

@ -0,0 +1,513 @@
using System;
using System.IO;
using System.Xml;
using System.Xml.Serialization;
using System.Security.Principal;
using Microsoft.AnalysisServices;
using EnvDTE;
using Newtonsoft.Json.Linq;
using Newtonsoft.Json;
using System.Linq;
namespace BismNormalizer.TabularCompare
{
/// <summary>
/// Information about a connection. This is serialized/deserialized to/from the BSMN file.
/// </summary>
public class ConnectionInfo
{
#region Private Variables
private bool _useProject = false;
private string _serverName;
private string _databaseName;
private string _projectName;
private string _projectFile;
private int _compatibilityLevel;
private bool _directQuery;
private string _bimFileFullName;
private EnvDTE.Project _project;
private string _deploymentServerName;
private string _deploymentServerDatabase;
private string _deploymentServerCubeName;
private DirectoryInfo _projectDirectoryInfo;
#endregion
/// <summary>
/// Initializes a new instance of the ConnectionInfo class.
/// </summary>
public ConnectionInfo()
{
}
/// <summary>
/// A Boolean specifying whether the connection represents a project in Visual Studio or a database on a server.
/// </summary>
public bool UseProject
{
get { return _useProject; }
set { _useProject = value; }
}
/// <summary>
/// Name of the server on which the tabular model resides.
/// </summary>
public string ServerName
{
get { return _serverName; }
set { _serverName = value; }
}
/// <summary>
/// The name of the database for the connection.
/// </summary>
public string DatabaseName
{
get { return _databaseName; }
set { _databaseName = value; }
}
/// <summary>
/// The name of the project for the connection.
/// </summary>
public string ProjectName
{
get { return _projectName; }
set { _projectName = value; }
}
/// <summary>
/// The full path and name of the project file. Used for running in command-line mode.
/// </summary>
public string ProjectFile
{
get { return _projectFile; }
set { _projectFile = value; }
}
/// <summary>
/// The SSAS compatibility level for the connection.
/// </summary>
[XmlIgnore()]
public int CompatibilityLevel => _compatibilityLevel;
/// <summary>
/// A Boolean specifying whether the tabular model for the connection is running in DirectQuery mode.
/// </summary>
[XmlIgnore()]
public bool DirectQuery => _directQuery;
/// <summary>
/// Project running in Visual Studio.
/// </summary>
[XmlIgnore()]
public EnvDTE.Project Project
{
get { return _project; }
set { _project = value; }
}
/// <summary>
/// Full path to the BIM file for the project.
/// </summary>
[XmlIgnore()]
public string BimFileFullName => _bimFileFullName;
/// <summary>
/// The deployment server from the project file.
/// </summary>
[XmlIgnore()]
public string DeploymentServerName => _deploymentServerName;
/// <summary>
/// The deployment database from the project file.
/// </summary>
[XmlIgnore()]
public string DeploymentServerDatabase => _deploymentServerDatabase;
/// <summary>
/// The deployment cube from the project file.
/// </summary>
[XmlIgnore()]
public string DeploymentServerCubeName => _deploymentServerCubeName;
private void ReadSettingsFile()
{
FileInfo[] files = _projectDirectoryInfo.GetFiles("*.settings", SearchOption.TopDirectoryOnly);
FileInfo settingsFile = null;
string currentUserName = WindowsIdentity.GetCurrent().Name;
int startPos1 = currentUserName.IndexOf("\\") + 1;
if (startPos1 != -1)
{
currentUserName = currentUserName.Substring(startPos1);
}
foreach (FileInfo file in files)
{
if (file.Name.Contains(currentUserName))
{
settingsFile = file;
break;
}
}
if (settingsFile == null)
{
if (_project == null)
{
//Probably running in command-line mode
if (String.IsNullOrEmpty(_serverName) || String.IsNullOrEmpty(_databaseName))
{
throw new ConnectionException($"Project {_projectName} Server Name and/or Database Name not populated.\nGenerate a new BSMN in Visual Studio.");
}
else
{
return;
}
}
else
{
throw new ConnectionException($"Could not read workspace settings file for Project {_projectName}.\nGenerate a new settings file by opening the .bim file in Visual Studio.");
}
}
/* can't use xmlreader or xmldoc because throws error saying "Data at the root level is invalid"
XmlDocument document = new XmlDocument();
document.Load(settingsFile.FullName);
XmlNamespaceManager nsmgr = new XmlNamespaceManager(document.NameTable);
nsmgr.AddNamespace("myns1", "http://schemas.microsoft.com/myns1");
XmlNode serverNameNode = document.SelectSingleNode("//myns1:ServerName", nsmgr);
if (serverNameNode == null) throw new ConnectionException("Could not read workspace server name from settings file for Project " + _projectName);
_serverName = serverNameNode.InnerText;
XmlNode databaseNameNode = document.SelectSingleNode("//myns1:DatabaseName", nsmgr);
if (databaseNameNode == null) throw new ConnectionException("Could not read workspace database name from settings file for Project " + _projectName);
_databaseName = databaseNameNode.InnerText;
*/
using (StreamReader settingsFileStreamReader = settingsFile.OpenText())
{
string settingsFileContents = settingsFileStreamReader.ReadToEnd();
int startPos = settingsFileContents.IndexOf("<ServerName>");
int endPos = settingsFileContents.IndexOf("</ServerName>");
if (startPos != -1 && endPos != -1 && startPos < endPos)
{
startPos = startPos + 12;
_serverName = settingsFileContents.Substring(startPos, endPos - startPos);
}
else
{
throw new ConnectionException("Could not read workspace server name from settings file for Project " + _projectName);
}
startPos = settingsFileContents.IndexOf("<DatabaseName>");
endPos = settingsFileContents.IndexOf("</DatabaseName>");
if (startPos != -1 && endPos != -1 && startPos < endPos)
{
startPos = startPos + 14;
_databaseName = settingsFileContents.Substring(startPos, endPos - startPos);
}
else
{
throw new ConnectionException("Could not read workspace database name from settings file for Project " + _projectName);
}
}
}
public void ReadProjectFile()
{
XmlDocument projectFileDoc = new XmlDocument();
projectFileDoc.Load(_projectFile);
XmlNamespaceManager nsmgr = new XmlNamespaceManager(projectFileDoc.NameTable);
nsmgr.AddNamespace("myns1", "http://schemas.microsoft.com/developer/msbuild/2003");
//Populate deployment server properties
XmlNode deploymentServerNameNode = null;
XmlNode deploymentServerDatabaseNode = null;
XmlNode deploymentServerCubeNameNode = null;
//Try to populate from active configuration
if (_project != null)
{
string configurationName = _project.ConfigurationManager?.ActiveConfiguration?.ConfigurationName;
if (!String.IsNullOrEmpty(configurationName))
{
deploymentServerNameNode = projectFileDoc.SelectSingleNode($"//myns1:PropertyGroup[contains(@Condition,'{configurationName}')]/myns1:DeploymentServerName", nsmgr);
deploymentServerDatabaseNode = projectFileDoc.SelectSingleNode($"//myns1:PropertyGroup[contains(@Condition,'{configurationName}')]/myns1:DeploymentServerDatabase", nsmgr);
deploymentServerCubeNameNode = projectFileDoc.SelectSingleNode($"//myns1:PropertyGroup[contains(@Condition,'{configurationName}')]/myns1:DeploymentServerCubeName", nsmgr);
}
}
//If not populated - e.g. in command-line mode, get values without Condition attribute filter
if (deploymentServerNameNode == null)
{
deploymentServerNameNode = projectFileDoc.SelectSingleNode("//myns1:PropertyGroup/myns1:DeploymentServerName", nsmgr);
}
if (deploymentServerDatabaseNode == null)
{
deploymentServerDatabaseNode = projectFileDoc.SelectSingleNode("//myns1:PropertyGroup/myns1:DeploymentServerDatabase", nsmgr);
}
if (deploymentServerCubeNameNode == null)
{
deploymentServerCubeNameNode = projectFileDoc.SelectSingleNode("//myns1:PropertyGroup/myns1:DeploymentServerCubeName", nsmgr);
}
_deploymentServerName = deploymentServerNameNode?.InnerText;
_deploymentServerDatabase = deploymentServerDatabaseNode?.InnerText;
_deploymentServerCubeName = deploymentServerCubeNameNode?.InnerText;
//Get path to BIM file
if (_project != null)
{
foreach (ProjectItem projectItem in _project.ProjectItems)
{
if (projectItem.Name.EndsWith(".bim") && projectItem.FileCount > 0)
{
_bimFileFullName = projectItem.FileNames[0];
break;
}
}
}
else
{
//Probably running in command-line mode
XmlNodeList compileNodes = projectFileDoc.SelectNodes("//myns1:ItemGroup/myns1:Compile", nsmgr);
if (compileNodes != null)
{
foreach (XmlNode compileNode in compileNodes)
{
if (compileNode.Attributes["Include"] != null && compileNode.Attributes["Include"].Value.ToUpper().EndsWith(".bim".ToUpper()))
{
FileInfo[] files = _projectDirectoryInfo.GetFiles(compileNode.Attributes["Include"].Value, SearchOption.TopDirectoryOnly);
if (files.Length > 0)
{
_bimFileFullName = files[0].FullName;
break;
}
}
}
}
}
}
/// <summary>
/// This method ensures the tabular model is online and populates the CompatibilityLevel property.
/// </summary>
/// <param name="closedBimFile">A Boolean specifying if the user cancelled the comparison. For the case where running in Visual Studio, the user has the option of cancelling if the project BIM file is open.</param>
public void InitializeCompatibilityLevel(bool closedBimFile = false)
{
if (UseProject)
{
//Initialize _projectDirectoryInfo
FileInfo projectFileInfo;
if (_project == null)
{
//Probably running in command-line mode
projectFileInfo = new FileInfo(_projectFile);
}
else
{
projectFileInfo = new FileInfo(_project.FullName);
}
_projectDirectoryInfo = new DirectoryInfo(projectFileInfo.Directory.FullName);
//Read settings file to get workspace server/db
ReadSettingsFile();
//Read project file to get deployment server/cube names, and bim file
ReadProjectFile();
}
Server amoServer = new Server();
try
{
amoServer.Connect("Provider=MSOLAP;Data Source=" + this.ServerName);
}
catch (ConnectionException) when (UseProject)
{
//See if can find integrated workspace server
bool foundServer = false;
string tempDataDir = Path.GetTempPath() + @"Microsoft\Microsoft SQL Server\OLAP\LocalServer\Data";
if (Directory.Exists(tempDataDir))
{
var subDirs = Directory.GetDirectories(tempDataDir).OrderByDescending(d => new DirectoryInfo(d).CreationTime); //Need to order by descending in case old folders hanging around when VS was killed and SSDT didn't get a chance to clean up after itself
foreach (string subDir in subDirs)
{
string[] iniFilePath = Directory.GetFiles(subDir, "msmdsrv.ini");
if (iniFilePath.Length == 1 && File.ReadAllText(iniFilePath[0]).Contains("<DataDir>" + _projectDirectoryInfo.FullName + @"\bin\Data</DataDir>")) //Todo: proper xml lookup
{
//Assuming this must be the folder, so now get the port number
string[] portFilePath = Directory.GetFiles(subDir, "msmdsrv.port.txt");
if (portFilePath.Length == 1)
{
string port = File.ReadAllText(portFilePath[0]).Replace("\0", "");
this.ServerName = $"localhost:{Convert.ToString(port)}";
amoServer.Connect("Provider=MSOLAP;Data Source=" + this.ServerName);
foundServer = true;
break;
}
}
}
}
if (!foundServer)
throw;
}
////non-admins can't see any ServerProperties: social.msdn.microsoft.com/Forums/sqlserver/en-US/3d0bf49c-9034-4416-9c51-77dc32bf8b73/determine-current-user-permissionscapabilities-via-amo-or-xmla
//if (!(amoServer.ServerProperties.Count > 0)) //non-admins can't see any ServerProperties
//{
// throw new Microsoft.AnalysisServices.ConnectionException($"Current user {WindowsIdentity.GetCurrent().Name} is not an administrator on the Analysis Server " + this.ServerName);
//}
if (amoServer.ServerMode != ServerMode.Tabular)
{
throw new ConnectionException($"Analysis Server {this.ServerName} is not running in Tabular mode");
}
Database tabularDatabase = amoServer.Databases.FindByName(this.DatabaseName);
if (tabularDatabase == null)
{
if (!this.UseProject)
{
throw new ConnectionException("Could not connect to database " + this.DatabaseName);
}
else
{
/* Check if folder exists using SystemGetSubdirs. If so attach. If not, do nothing - when execute BIM file below will create automatically.
Using XMLA to run SystemGetSubdirs rather than ADOMD.net here don't want a reference to ADOMD.net Dll.
Also, can't use Server.Execute method because it only takes XMLA execute commands (as opposed to XMLA discover commands), so need to submit the full soap envelope
*/
string dataDir = amoServer.ServerProperties["DataDir"].Value;
if (dataDir.EndsWith("\\")) dataDir = dataDir.Substring(0, dataDir.Length - 1);
string commandStatement = String.Format("SystemGetSubdirs '{0}'", dataDir);
XmlNodeList rows = Core.Comparison.ExecuteXmlaCommand(amoServer, "", commandStatement);
string dbDir = "";
foreach (XmlNode row in rows)
{
XmlNode dirNode = null;
XmlNode allowedNode = null;
foreach (XmlNode childNode in row.ChildNodes)
{
if (childNode.Name == "Dir")
{
dirNode = childNode;
}
else if (childNode.Name == "Allowed")
{
allowedNode = childNode;
}
}
if (dirNode != null && allowedNode != null && dirNode.InnerText.Length >= this.DatabaseName.Length && dirNode.InnerText.Substring(0, this.DatabaseName.Length) == this.DatabaseName && allowedNode.InnerText.Length > 0 && allowedNode.InnerText == "1")
{
dbDir = dataDir + "\\" + dirNode.InnerText;
break;
}
}
if (dbDir != "")
{
//attach
amoServer.Attach(dbDir);
amoServer.Refresh();
tabularDatabase = amoServer.Databases.FindByName(this.DatabaseName);
}
}
}
if (this.UseProject)
{
//_bimFileFullName = GetBimFileFullName();
if (String.IsNullOrEmpty(_bimFileFullName))
{
throw new ConnectionException("Could not load BIM file for Project " + this.ProjectName);
}
if (!closedBimFile) //If just closed BIM file, no need to execute it
{
//Execute BIM file contents as script on workspace database
//We don't know the compatibility level yet, so try parsing json, if fail, try xmla ...
try
{
//Replace "SemanticModel" with db name.
JObject jDocument = JObject.Parse(File.ReadAllText(_bimFileFullName));
if (jDocument["name"] == null || jDocument["id"] == null)
{
throw new ConnectionException("Could not read JSON in BIM file " + _bimFileFullName);
}
jDocument["name"] = DatabaseName;
jDocument["id"] = DatabaseName;
//Todo: see if Tabular helper classes for this once documentation available after CTP
string command =
$@"{{
""createOrReplace"": {{
""object"": {{
""database"": ""{DatabaseName}""
}},
""database"": {jDocument.ToString()}
}}
}}
";
amoServer.Execute(command);
}
catch (JsonReaderException)
{
//Replace "SemanticModel" with db name. Could do a global replace, but just in case it's not called SemanticModel, use dom instead
//string xmlaScript = File.ReadAllText(xmlaFileFullName);
XmlDocument document = new XmlDocument();
document.Load(_bimFileFullName);
XmlNamespaceManager nsmgr = new XmlNamespaceManager(document.NameTable);
nsmgr.AddNamespace("myns1", "http://schemas.microsoft.com/analysisservices/2003/engine");
XmlNode objectDatabaseIdNode = document.SelectSingleNode("//myns1:Object/myns1:DatabaseID", nsmgr);
XmlNode objectDefinitionDatabaseIdNode = document.SelectSingleNode("//myns1:ObjectDefinition/myns1:Database/myns1:ID", nsmgr);
XmlNode objectDefinitionDatabaseNameNode = document.SelectSingleNode("//myns1:ObjectDefinition/myns1:Database/myns1:Name", nsmgr);
if (objectDatabaseIdNode == null || objectDefinitionDatabaseIdNode == null || objectDefinitionDatabaseNameNode == null)
{
throw new ConnectionException("Could not access XMLA in BIM file " + _bimFileFullName);
}
objectDatabaseIdNode.InnerText = DatabaseName;
objectDefinitionDatabaseIdNode.InnerText = DatabaseName;
objectDefinitionDatabaseNameNode.InnerText = DatabaseName;
//1103, 1100 projects store the xmla as Alter (equivalent to createOrReplace), so just need to execute
amoServer.Execute(document.OuterXml);
}
}
//need next lines in case just created the db using the Execute method
//amoServer.Refresh(); //todo workaround for bug 9719887 on 3/10/17 need to disconnect and reconnect
amoServer.Disconnect();
amoServer.Connect("Provider=MSOLAP;Data Source=" + this.ServerName);
tabularDatabase = amoServer.Databases.FindByName(this.DatabaseName);
}
if (tabularDatabase == null)
{
throw new ConnectionException($"Can not load/find database {this.DatabaseName}.");
}
_compatibilityLevel = tabularDatabase.CompatibilityLevel;
_directQuery = ((tabularDatabase.Model != null && tabularDatabase.Model.DefaultMode == Microsoft.AnalysisServices.Tabular.ModeType.DirectQuery) ||
tabularDatabase.DirectQueryMode == DirectQueryMode.DirectQuery || tabularDatabase.DirectQueryMode == DirectQueryMode.InMemoryWithDirectQuery || tabularDatabase.DirectQueryMode == DirectQueryMode.DirectQueryWithInMemory);
}
}
}

Some files were not shown because too many files have changed in this diff Show More