diff --git a/src/EFTools/EntityDesign/EntityDesign.csproj b/src/EFTools/EntityDesign/EntityDesign.csproj
index 1a65a8db41..b0d3cdcf3a 100644
--- a/src/EFTools/EntityDesign/EntityDesign.csproj
+++ b/src/EFTools/EntityDesign/EntityDesign.csproj
@@ -49,9 +49,10 @@
true
- VS140COMNTOOLS
- VS120COMNTOOLS
VS110COMNTOOLS
+ VS120COMNTOOLS
+ VS140COMNTOOLS
+ VS150COMNTOOLS
diff --git a/src/EFTools/EntityDesign/Resources/ExplorerContent_15.0.xaml b/src/EFTools/EntityDesign/Resources/ExplorerContent_15.0.xaml
new file mode 100644
index 0000000000..09c0039e88
--- /dev/null
+++ b/src/EFTools/EntityDesign/Resources/ExplorerContent_15.0.xaml
@@ -0,0 +1,902 @@
+
+
+
+
+
+
+
+
+
+
+ False
+ True
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/EFTools/EntityDesign/UI/Views/Dialogs/EnumTypeDialog_15.0.xaml b/src/EFTools/EntityDesign/UI/Views/Dialogs/EnumTypeDialog_15.0.xaml
new file mode 100644
index 0000000000..052e669f41
--- /dev/null
+++ b/src/EFTools/EntityDesign/UI/Views/Dialogs/EnumTypeDialog_15.0.xaml
@@ -0,0 +1,233 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/EFTools/EntityDesign/UI/Views/Dialogs/EnumTypeDialog_15.0.xaml.cs b/src/EFTools/EntityDesign/UI/Views/Dialogs/EnumTypeDialog_15.0.xaml.cs
new file mode 100644
index 0000000000..96e5ae6357
--- /dev/null
+++ b/src/EFTools/EntityDesign/UI/Views/Dialogs/EnumTypeDialog_15.0.xaml.cs
@@ -0,0 +1,170 @@
+// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.
+
+using System;
+using System.ComponentModel;
+using System.Diagnostics;
+using System.Windows;
+using System.Windows.Input;
+using System.Windows.Controls;
+using Microsoft.Data.Entity.Design.UI.ViewModels;
+using Microsoft.VisualStudio.PlatformUI;
+using EntityDesignerResources = Microsoft.Data.Entity.Design.Resources;
+
+namespace Microsoft.Data.Entity.Design.UI.Views.Dialogs
+{
+ //
+ // Interaction logic for EnumTypeDialog.xaml
+ //
+ internal partial class EnumTypeDialog : DialogWindow
+ {
+ private bool _isManualEditCommit = false;
+ private bool _isOkButtonClicked = false;
+ private EnumTypeViewModel _enumTypeViewModel = null;
+
+ public EnumTypeDialog(EnumTypeViewModel vm)
+ {
+ _enumTypeViewModel = vm;
+ this.DataContext = _enumTypeViewModel;
+ InitializeComponent();
+ if (vm.IsNew)
+ {
+ this.Title = EntityDesignerResources.EnumDialog_NewEnumWindowTitle;
+ }
+ else
+ {
+ this.Title = EntityDesignerResources.EnumDialog_EditEnumWindowTitle;
+ }
+ this.dgEnumTypeMembers.CellEditEnding += dgEnumTypeMembers_CellEditEnding;
+ this.HasHelpButton = false;
+ }
+
+ public EnumTypeViewModel EnumTypeViewModel
+ {
+ get
+ {
+ return _enumTypeViewModel;
+ }
+ }
+
+ #region Event Handler
+
+ protected override void OnClosing(CancelEventArgs e)
+ {
+ // When ok button is clicked:
+ // - First we need to ensure all the changes in data-grid are committed.
+ // - If the view model is not in valid state, block the dialog from closing.
+ if (_isOkButtonClicked)
+ {
+ CommitDialogControlsManually();
+
+ EnumTypeViewModel vm = this.DataContext as EnumTypeViewModel;
+ Debug.Assert(vm != null, "Dialog DataContext is not type of EnumTypeViewModel");
+ if (vm != null && vm.IsValid == false)
+ {
+ e.Cancel = true;
+ _isOkButtonClicked = false;
+ return;
+ }
+ }
+ base.OnClosing(e);
+ }
+
+ private void dgEnumTypeMembers_CellEditEnding(object sender, DataGridCellEditEndingEventArgs e)
+ {
+ // This is to ensure that we commit every time the cell is edited.
+ CommitDialogControlsManually();
+ }
+
+ private void btnOk_Click(object sender, RoutedEventArgs e)
+ {
+ _isOkButtonClicked = true;
+ this.DialogResult = true;
+ }
+
+ private void btnCancel_Click(object sender, RoutedEventArgs e)
+ {
+ _isOkButtonClicked = false;
+ this.DialogResult = false;
+ }
+
+ private void OnTextBoxTextChanged(Object sender, TextChangedEventArgs e)
+ {
+ // Force binding between source and target element; this is so that validation can take place immediately.
+ ForceTextBoxUpdateSource(sender);
+ }
+
+ private void OnTextBoxLostFocus(object sender, RoutedEventArgs e)
+ {
+ // Force binding between source and target element; this is so that validation can take place immediately.
+ ForceTextBoxUpdateSource(sender);
+ }
+
+ private void OnRefrenceExternalTypeClick(Object sender, RoutedEventArgs e)
+ {
+ if (chkReferenceExternalType.IsChecked == true)
+ {
+ Keyboard.Focus(txtExternalType);
+ }
+ ForceTextBoxUpdateSource(txtExternalType);
+ }
+
+ #endregion
+
+ private static void ForceTextBoxUpdateSource(object control)
+ {
+ TextBox textBox = control as TextBox;
+ Debug.Assert(textBox != null, "parameter control is not a TextBox type");
+ if (textBox != null)
+ {
+ textBox.GetBindingExpression(TextBox.TextProperty).UpdateSource();
+ }
+ }
+
+ private void CommitDialogControlsManually()
+ {
+ if (!_isManualEditCommit)
+ {
+ try
+ {
+ _isManualEditCommit = true;
+ txtEnumTypeName.GetBindingExpression(TextBox.TextProperty).UpdateSource();
+ txtExternalType.GetBindingExpression(TextBox.TextProperty).UpdateSource();
+ dgEnumTypeMembers.CommitEdit(DataGridEditingUnit.Row, true);
+ }
+ finally
+ {
+ _isManualEditCommit = false;
+ }
+ }
+ }
+
+ #region Test support
+
+ private static event EventHandler DialogActivatedTestEventStorage;
+
+ // This should be set only in the test code!!!
+ internal static event EventHandler DialogActivatedTestEvent
+ {
+ add
+ {
+ DialogActivatedTestEventStorage += value;
+ }
+ remove
+ {
+ DialogActivatedTestEventStorage -= value;
+ }
+ }
+
+ // For test purposes only!!!
+ protected override void OnActivated(EventArgs e)
+ {
+ base.OnActivated(e);
+
+ if (DialogActivatedTestEventStorage != null)
+ {
+ DialogActivatedTestEventStorage(this, EventArgs.Empty);
+ }
+ }
+ #endregion
+ }
+}
\ No newline at end of file
diff --git a/src/EFTools/EntityDesign/UI/Views/Dialogs/RefactorRenameDialog_15.0.xaml b/src/EFTools/EntityDesign/UI/Views/Dialogs/RefactorRenameDialog_15.0.xaml
new file mode 100644
index 0000000000..5ce2ee8fec
--- /dev/null
+++ b/src/EFTools/EntityDesign/UI/Views/Dialogs/RefactorRenameDialog_15.0.xaml
@@ -0,0 +1,46 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/EFTools/EntityDesign/UI/Views/Dialogs/RefactorRenameDialog_15.0.xaml.cs b/src/EFTools/EntityDesign/UI/Views/Dialogs/RefactorRenameDialog_15.0.xaml.cs
new file mode 100644
index 0000000000..80a56c15ce
--- /dev/null
+++ b/src/EFTools/EntityDesign/UI/Views/Dialogs/RefactorRenameDialog_15.0.xaml.cs
@@ -0,0 +1,116 @@
+// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.
+
+using System;
+using System.Globalization;
+using System.IO;
+using System.Windows;
+using Microsoft.Data.Entity.Design.Common;
+using Microsoft.Data.Entity.Design.Model;
+using Microsoft.Data.Entity.Design.Model.Entity;
+using Microsoft.Data.Entity.Design.Model.Validation;
+using Microsoft.Data.Entity.Design.VisualStudio;
+using Microsoft.Data.Entity.Design.VisualStudio.Package;
+using Microsoft.VisualStudio.PlatformUI;
+
+namespace Microsoft.Data.Entity.Design.UI.Views.Dialogs
+{
+ internal partial class RefactorRenameDialog : DialogWindow
+ {
+ EFNormalizableItem _objectToRename = null;
+
+ internal RefactorRenameDialog(EFNormalizableItem objectToRename)
+ {
+ ArgumentValidation.CheckForNullReference(objectToRename, "objectToRename");
+
+ InitializeComponent();
+ _objectToRename = objectToRename;
+ this.newNameTextBox.Text = objectToRename.Name.Value;
+ this.Loaded += OnLoaded;
+ }
+
+ internal string NewName { get { return this.newNameTextBox.Text; } }
+ internal bool? ShowPreview { get { return this.previewCheckBox.IsChecked; } }
+
+ protected override void InvokeDialogHelp()
+ {
+ // do nothing
+ }
+
+ void OnLoaded(object sender, RoutedEventArgs e)
+ {
+ this.Loaded -= OnLoaded;
+ this.locationTextBox.Text = Path.GetFileName(_objectToRename.Artifact.Uri.LocalPath);
+ this.newNameTextBox.SelectAll();
+ }
+
+ private void OnOkButtonClick(object sender, RoutedEventArgs e)
+ {
+ string errorMessage;
+
+ if (ValidateName(out errorMessage))
+ {
+ this.DialogResult = true;
+ }
+ else
+ {
+ VsUtils.ShowError(PackageManager.Package, errorMessage);
+ }
+ }
+
+ private void OnNewNameTextBoxTextChanged(object sender, System.Windows.Controls.TextChangedEventArgs e)
+ {
+ // Note: we're doing ordinal and not ignore case because the user might want to rename to change the casing only.
+ if (_objectToRename.Name.Value.Equals(this.NewName, StringComparison.Ordinal))
+ {
+ this.okButton.IsEnabled = false;
+ }
+ else
+ {
+ this.okButton.IsEnabled = true;
+ }
+ }
+
+ private bool ValidateName(out string errorMessage)
+ {
+ // Unlike C# and TSql refactoring, we won't allow the user to proceed with a rename that causes a name conflict (C# and TSql
+ // give a warning and allow you to proceed). This is because our rename command will fail in the case of name conflicts, so
+ // we need return a hard error in the rename dialog.
+ EFAttribute attr = _objectToRename.GetNameAttribute();
+ errorMessage = null;
+
+ AttributeContentValidator contentValidator = _objectToRename.Artifact.ModelManager.GetAttributeContentValidator(_objectToRename.Artifact);
+ if (!contentValidator.IsValidAttributeValue(this.NewName, attr))
+ {
+ // not valid content
+ errorMessage = Microsoft.Data.Entity.Design.Resources.RefactorRename_InvalidName;
+ return false;
+ }
+
+ Property property = _objectToRename as Property;
+ if (_objectToRename is EntityType)
+ {
+ if (!ModelHelper.IsUniqueNameForExistingItem(_objectToRename, this.NewName, true, out errorMessage))
+ {
+ return false;
+ }
+ }
+ else if (property != null)
+ {
+ if (!ModelHelper.IsUniqueNameForExistingItem(property, this.NewName, true, out errorMessage))
+ {
+ errorMessage = string.Format(CultureInfo.CurrentCulture, Microsoft.Data.Entity.Design.Model.Resources.NAME_NOT_UNIQUE, this.NewName);
+ return false;
+ }
+ }
+ else if (_objectToRename is Association)
+ {
+ if (!ModelHelper.IsUniqueNameForExistingItem(_objectToRename, this.NewName, true, out errorMessage))
+ {
+ return false;
+ }
+ }
+
+ return true;
+ }
+ }
+}
diff --git a/src/EFTools/EntityDesign/UI/Views/Explorer/EntityDesignExplorerFrame.cs b/src/EFTools/EntityDesign/UI/Views/Explorer/EntityDesignExplorerFrame.cs
index 124980d980..ae3b86da8b 100644
--- a/src/EFTools/EntityDesign/UI/Views/Explorer/EntityDesignExplorerFrame.cs
+++ b/src/EFTools/EntityDesign/UI/Views/Explorer/EntityDesignExplorerFrame.cs
@@ -284,12 +284,13 @@ protected override ExplorerViewModelHelper GetNewExplorerViewModelHelper()
protected override ExplorerContent InitializeExplorerContent()
{
-#if VS14
+#if VS15
+ var content = FileResourceManager.GetElement("Resources/ExplorerContent_15.0.xaml") as ExplorerContent;
+#elif VS14
var content = FileResourceManager.GetElement("Resources/ExplorerContent_14.0.xaml") as ExplorerContent;
#elif VS12
var content = FileResourceManager.GetElement("Resources/ExplorerContent_12.0.xaml") as ExplorerContent;
#else
-
var content = FileResourceManager.GetElement("Resources/ExplorerContent_11.0.xaml") as ExplorerContent;
#endif
diff --git a/src/EFTools/EntityDesign/VisualStudio/Package/ConnectionManager.cs b/src/EFTools/EntityDesign/VisualStudio/Package/ConnectionManager.cs
index 164f8549a6..43213caa5f 100644
--- a/src/EFTools/EntityDesign/VisualStudio/Package/ConnectionManager.cs
+++ b/src/EFTools/EntityDesign/VisualStudio/Package/ConnectionManager.cs
@@ -989,7 +989,7 @@ public static string CreateDefaultLocalDbConnectionString(string initialCatalog)
return
string.Format(
CultureInfo.InvariantCulture,
-#if VS14
+#if (VS14 || VS15)
@"Data Source=(LocalDb)\MSSQLLocalDB;Initial Catalog={0};Integrated Security=True",
#else
@"Data Source=(LocalDb)\v11.0;Initial Catalog={0};Integrated Security=True",
diff --git a/src/EFTools/SharedAssemblyInfo.cs b/src/EFTools/SharedAssemblyInfo.cs
index 1440db6f3f..c796cf2dfe 100644
--- a/src/EFTools/SharedAssemblyInfo.cs
+++ b/src/EFTools/SharedAssemblyInfo.cs
@@ -21,5 +21,8 @@
#elif VS14
[assembly: AssemblyVersion("14.0.0.0")]
[assembly: AssemblyFileVersion("14.0.0.0")]
+#elif VS15
+[assembly: AssemblyVersion("15.0.0.0")]
+[assembly: AssemblyFileVersion("15.0.0.0")]
#endif
#endif
diff --git a/src/EFTools/setup/EFToolsMsi/Defines.wxi b/src/EFTools/setup/EFToolsMsi/Defines.wxi
index 6f213e41a2..894d8449ad 100644
--- a/src/EFTools/setup/EFToolsMsi/Defines.wxi
+++ b/src/EFTools/setup/EFToolsMsi/Defines.wxi
@@ -18,5 +18,10 @@
+
+
+
+
+
diff --git a/src/EFTools/setup/EFToolsMsi/EFToolsMsi.wixproj b/src/EFTools/setup/EFToolsMsi/EFToolsMsi.wixproj
index f7302bfe5f..74ec53d129 100644
--- a/src/EFTools/setup/EFToolsMsi/EFToolsMsi.wixproj
+++ b/src/EFTools/setup/EFToolsMsi/EFToolsMsi.wixproj
@@ -107,8 +107,8 @@
+ Patterns="WIX_FULL_PRODUCT_NAME_DEV11;WIX_FULL_PRODUCT_NAME_DEV12;WIX_FULL_PRODUCT_NAME_DEV14;WIX_FULL_PRODUCT_NAME_DEV15;WIX_PRODUCT_DESCRIPTION_DEV11;WIX_PRODUCT_DESCRIPTION_DEV12;WIX_PRODUCT_DESCRIPTION_DEV14;WIX_PRODUCT_DESCRIPTION_DEV15"
+ Replacements="$(WixFullProductName_Dev11);$(WixFullProductName_Dev12);$(WixFullProductName_Dev14);$(WixFullProductName_Dev15);$(WixProductDescription_Dev11);$(WixProductDescription_Dev12);$(WixProductDescription_Dev14);$(WixProductDescription_Dev15)" />
- true
+ true
diff --git a/tools/VsIdeHostAdapter/Installer/Defines.wxi b/tools/VsIdeHostAdapter/Installer/Defines.wxi
index 4a7f98d428..64ac42ed4c 100644
--- a/tools/VsIdeHostAdapter/Installer/Defines.wxi
+++ b/tools/VsIdeHostAdapter/Installer/Defines.wxi
@@ -20,5 +20,11 @@
+
+
+
+
+
+