Skip to content

Commit

Permalink
Visual Studio 2015 Support
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-doe committed Jul 22, 2015
1 parent b958470 commit faa192e
Show file tree
Hide file tree
Showing 4 changed files with 78 additions and 63 deletions.
4 changes: 4 additions & 0 deletions Solutionizer/Commands/SaveSolutionCommand.cs
Expand Up @@ -102,6 +102,10 @@ public class SaveSolutionCommand {
writer.WriteLine("Microsoft Visual Studio Solution File, Format Version 12.00");
writer.WriteLine("# Visual Studio 2013");
break;
case VisualStudioVersion.VS2015:
writer.WriteLine("Microsoft Visual Studio Solution File, Format Version 14.00");
writer.WriteLine("# Visual Studio 2015");
break;
default:
throw new ArgumentOutOfRangeException();
}
Expand Down
9 changes: 8 additions & 1 deletion Solutionizer/Helper/VisualStudioHelper.cs
Expand Up @@ -6,6 +6,11 @@
namespace Solutionizer.Helper {
public static class VisualStudioHelper {
public static VisualStudioVersion DetectVersion() {
using (var key = Registry.ClassesRoot.OpenSubKey("VisualStudio.DTE.14.0")) {
if (key != null) {
return VisualStudioVersion.VS2013;
}
}
using (var key = Registry.ClassesRoot.OpenSubKey("VisualStudio.DTE.12.0")) {
if (key != null) {
return VisualStudioVersion.VS2013;
Expand All @@ -25,6 +30,8 @@ public static class VisualStudioHelper {
return "11.0";
case VisualStudioVersion.VS2013:
return "12.0";
case VisualStudioVersion.VS2015:
return "14.0";
}
return "10.0";
}
Expand Down Expand Up @@ -53,7 +60,7 @@ public static class VisualStudioHelper {
}

public static string GetVisualStudioExecutable(VisualStudioVersion visualStudioVersion) {
var regPath = String.Format(@"Software\{0}Microsoft\VisualStudio\{1}",
var regPath = String.Format(@"Software\{0}Microsoft\VisualStudio\{1}",
Environment.Is64BitOperatingSystem ? @"Wow6432Node\" : String.Empty,
GetVersionKey(visualStudioVersion));
using (var key = Registry.LocalMachine.OpenSubKey(regPath)) {
Expand Down
1 change: 1 addition & 0 deletions Solutionizer/Services/Settings.cs
Expand Up @@ -281,6 +281,7 @@ public enum VisualStudioVersion {
VS2010,
VS2012,
VS2013,
VS2015
}
// ReSharper restore InconsistentNaming

Expand Down
127 changes: 65 additions & 62 deletions Solutionizer/Views/SettingsView.xaml
@@ -1,10 +1,10 @@
<Controls:Flyout x:Class="Solutionizer.Views.SettingsView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:System="clr-namespace:System;assembly=mscorlib"
xmlns:Services="clr-namespace:Solutionizer.Services" mc:Ignorable="d"
xmlns:Services="clr-namespace:Solutionizer.Services" mc:Ignorable="d"
xmlns:ViewModels="clr-namespace:Solutionizer.ViewModels"
xmlns:Controls="http://metro.mahapps.com/winfx/xaml/controls"
xmlns:Converters="clr-namespace:Solutionizer.Converters"
Expand Down Expand Up @@ -42,6 +42,9 @@
<DataTrigger Binding="{Binding}" Value="VS2013">
<Setter TargetName="PART_Text" Property="Text" Value="Visual Studio 2013" />
</DataTrigger>
<DataTrigger Binding="{Binding}" Value="VS2015">
<Setter TargetName="PART_Text" Property="Text" Value="Visual Studio 2015" />
</DataTrigger>
</DataTemplate.Triggers>
</DataTemplate>
</Grid.Resources>
Expand All @@ -60,37 +63,37 @@
</Style>
</StackPanel.Resources>

<TextBlock
<TextBlock
Margin="0 0 0 8"
Style="{StaticResource DescriptionHeaderStyle}"
Style="{StaticResource DescriptionHeaderStyle}"
Text="Solution Structure" />

<CheckBox
<CheckBox
IsChecked="{Binding IncludeReferencedProjects}"
Margin="0 0 0 8"
Margin="0 0 0 8"
Content="Add referenced projects automatically"
ToolTip="If checked, referenced projects will be&#x0a;added to the solution automatically."/>

<StackPanel
Orientation="Horizontal"
IsEnabled="{Binding IncludeReferencedProjects}"
<StackPanel
Orientation="Horizontal"
IsEnabled="{Binding IncludeReferencedProjects}"
Margin="20 0 0 8" >
<TextBlock
VerticalAlignment="Center"
<TextBlock
VerticalAlignment="Center"
Margin="0 0 8 0"
Text="Folder name:"/>
<TextBox
<TextBox
Text="{Binding ReferenceFolderName, ValidatesOnDataErrors=True, UpdateSourceTrigger=PropertyChanged}"
Width="200"
ToolTip="Specify the name of the solution folder, where referenced projects&#x0a;should be added to. The folder structure will be preserved&#x0a;underneath this folder."/>
</StackPanel>

<StackPanel
Orientation="Horizontal"
IsEnabled="{Binding IncludeReferencedProjects}"
<StackPanel
Orientation="Horizontal"
IsEnabled="{Binding IncludeReferencedProjects}"
Margin="20 0 0 8" >
<TextBlock
VerticalAlignment="Center"
<TextBlock
VerticalAlignment="Center"
Margin="0 0 8 0"
Text="Tree depth:"/>
<Controls:NumericUpDown
Expand All @@ -109,37 +112,37 @@
Content="Exclude referenced projects from build configurations"
ToolTip="If checked, referenced projects won't be build&#x0a;automatically in the resulting solution."/>

<StackPanel
Orientation="Horizontal"
<StackPanel
Orientation="Horizontal"
Margin="0 0 0 8">
<TextBlock
VerticalAlignment="Center"
<TextBlock
VerticalAlignment="Center"
Margin="0 0 8 0"
Text="Visual Studio version:"/>
<ComboBox
SelectedValue="{Binding VisualStudioVersion}"
Width="200"
<ComboBox
SelectedValue="{Binding VisualStudioVersion}"
Width="200"
ItemsSource="{Binding Source={StaticResource PossibleValues}}"
ToolTip="Specifies the target version of Visual Studio."/>
</StackPanel>
<TextBlock
Text="Store solutions in"

<TextBlock
Text="Store solutions in"
Margin="0 0 0 8"/>

<RadioButton
Margin="20 0 0 8"
Content="the temporary folder"
<RadioButton
Margin="20 0 0 8"
Content="the temporary folder"
IsChecked="{Binding SolutionTargetLocation, Converter={StaticResource EnumBooleanConverter}, ConverterParameter=TempFolder}"/>

<StackPanel Orientation="Horizontal" Margin="20 0 0 8">
<RadioButton
Content="a custom folder"
<RadioButton
Content="a custom folder"
IsChecked="{Binding SolutionTargetLocation, Converter={StaticResource EnumBooleanConverter}, ConverterParameter=CustomFolder}"/>
<Controls1:EllipsisTextBox
EllipsisPlacement="Path"
Margin="8 0 0 0"
IsReadOnly="True"
IsReadOnly="True"
Text="{Binding CustomTargetFolder, ValidatesOnDataErrors=True, UpdateSourceTrigger=PropertyChanged}"
Width="300"
IsEnabled="{Binding SolutionTargetLocation, Converter={StaticResource EnumBooleanConverter}, ConverterParameter=CustomFolder}"
Expand All @@ -150,80 +153,80 @@
</Controls:TextboxHelper.ButtonContent>
</Controls1:EllipsisTextBox>
</StackPanel>

<StackPanel Orientation="Horizontal" Margin="20 0 0 8">
<RadioButton
Content="a subfolder of the selected root folder"
<RadioButton
Content="a subfolder of the selected root folder"
IsChecked="{Binding SolutionTargetLocation, Converter={StaticResource EnumBooleanConverter}, ConverterParameter=BelowRootPath}"/>
<TextBox
<TextBox
Margin="8 0 0 0" Width="200"
Text="{Binding CustomTargetSubfolder, ValidatesOnDataErrors=True, UpdateSourceTrigger=PropertyChanged}"
IsEnabled="{Binding SolutionTargetLocation, Converter={StaticResource EnumBooleanConverter}, ConverterParameter=BelowRootPath}" />
</StackPanel>

<TextBlock
Style="{StaticResource DescriptionHeaderStyle}"
<TextBlock
Style="{StaticResource DescriptionHeaderStyle}"
Text="User Interface" />
<CheckBox

<CheckBox
IsChecked="{Binding SimplifyProjectTree}"
Margin="0 0 0 8"
Margin="0 0 0 8"
Content="Hide empty folders in hierarchy"
ToolTip="If checked, folders containing no projects but subfolders only will be hidden."/>

<CheckBox
<CheckBox
IsChecked="{Binding IsFlatMode}"
Margin="0 0 0 8"
Margin="0 0 0 8"
Content="Show projects as flat list"
ToolTip="If checked, the projects will be presented&#x0a;in a flat list instead of a tree view."/>

<CheckBox
<CheckBox
IsChecked="{Binding ShowLaunchElevatedButton}"
Margin="0 0 0 8"
Margin="0 0 0 8"
Content="Show &quot;Launch Elevated&quot; button"
ToolTip="This button allows to open the created solution&#x0a;inside an elevated instance of Visual Studio."/>

<CheckBox
<CheckBox
IsChecked="{Binding ShowProjectCount}"
Margin="0 0 0 8"
Margin="0 0 0 8"
Content="Show number of contained projects behind the directory name"
ToolTip="If checked, the number of contained projects&#x0a;will be displayed behind folders."/>

<TextBlock
Style="{StaticResource DescriptionHeaderStyle}"
<TextBlock
Style="{StaticResource DescriptionHeaderStyle}"
Text="Miscellaneous" />

<CheckBox
<CheckBox
IsChecked="{Binding ScanOnStartup}"
Margin="0 0 0 8"
Margin="0 0 0 8"
Content="Scan projects on start-up"
ToolTip="If checked, the last used folder will be scanned for projects."/>

<CheckBox
<CheckBox
IsChecked="{Binding AutoUpdateCheck}"
Margin="0 0 0 8"
Margin="0 0 0 8"
Content="Automatically check for updates periodically"
ToolTip="If checked, Solutionizer will check for updates once per hour."/>
<CheckBox

<CheckBox
IsChecked="{Binding IncludePrereleaseUpdates}"
Margin="0 0 0 8"
Margin="0 0 0 8"
Content="Include pre-release versions in checks for updates"
ToolTip="If checked, auto-update will also check for pre-release versions."/>

</StackPanel>
</ScrollViewer>

<StackPanel
Margin="0 16 0 0"
Grid.Row="1"
Orientation="Horizontal"
HorizontalAlignment="Left">
<Button
HorizontalAlignment="Left">
<Button
MinWidth="80"
Command="{Binding OkCommand}"
Content="OK"/>
<Button
<Button
MinWidth="80"
Margin="8 0 0 0"
Command="{Binding CancelCommand}"
Expand Down

0 comments on commit faa192e

Please sign in to comment.