Skip to content

Commit

Permalink
Removing third party nuget packages and replace with Microsoft packages
Browse files Browse the repository at this point in the history
  • Loading branch information
StefanKert committed Dec 23, 2018
1 parent 7b68ef6 commit 55c7f2d
Show file tree
Hide file tree
Showing 10 changed files with 87 additions and 139 deletions.
7 changes: 2 additions & 5 deletions src/BuildVision.UI/BuildVision.UI.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -362,11 +362,8 @@
</ProjectReference>
</ItemGroup>
<ItemGroup>
<PackageReference Include="VSSDK.GraphModel">
<Version>12.0.4</Version>
</PackageReference>
<PackageReference Include="VSSDK.Shell.12">
<Version>12.0.4</Version>
<PackageReference Include="Microsoft.VisualStudio.Shell.14.0">
<Version>14.3.25407</Version>
</PackageReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
Expand Down
4 changes: 2 additions & 2 deletions src/BuildVision.UI/Resources/BuildState.Resources.xaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:vsfx="clr-namespace:Microsoft.VisualStudio.Shell;assembly=Microsoft.VisualStudio.Shell.12.0">
xmlns:vsfx="clr-namespace:Microsoft.VisualStudio.Shell;assembly=Microsoft.VisualStudio.Shell.14.0">

<ControlTemplate x:Key="BuildError">
<Viewbox Stretch="Uniform">
Expand Down Expand Up @@ -74,4 +74,4 @@
</Viewbox>
</ControlTemplate>

</ResourceDictionary>
</ResourceDictionary>
4 changes: 2 additions & 2 deletions src/BuildVision.UI/Resources/CommonResources.xaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:vsfx="clr-namespace:Microsoft.VisualStudio.Shell;assembly=Microsoft.VisualStudio.Shell.12.0">
xmlns:vsfx="clr-namespace:Microsoft.VisualStudio.Shell;assembly=Microsoft.VisualStudio.Shell.14.0">

<!-- Toolbar button style -->
<Style x:Key="ToolBarButtonBaseStyle" TargetType="{x:Type ButtonBase}">
Expand Down Expand Up @@ -466,4 +466,4 @@
</Style.Triggers>
</Style>

</ResourceDictionary>
</ResourceDictionary>
2 changes: 1 addition & 1 deletion src/BuildVision.UI/Resources/ValueIndicator.Resources.xaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:vsfx="clr-namespace:Microsoft.VisualStudio.Shell;assembly=Microsoft.VisualStudio.Shell.12.0">
xmlns:vsfx="clr-namespace:Microsoft.VisualStudio.Shell;assembly=Microsoft.VisualStudio.Shell.14.0">

<ControlTemplate x:Key="ErrorsIndicator">
<Viewbox Stretch="Uniform">
Expand Down
4 changes: 2 additions & 2 deletions src/BuildVision.UI/Styles/ExtensionStyle.xaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:environment="clr-namespace:Microsoft.VisualStudio.PlatformUI;assembly=Microsoft.VisualStudio.Shell.12.0">
xmlns:environment="clr-namespace:Microsoft.VisualStudio.PlatformUI;assembly=Microsoft.VisualStudio.Shell.14.0">

<SolidColorBrush x:Key="ToolWindowBackgroundKey" Color="{DynamicResource {x:Static environment:EnvironmentColors.ToolWindowBackgroundColorKey}}"/>
<SolidColorBrush x:Key="ToolboxBackgroundKey" Color="{DynamicResource {x:Static environment:EnvironmentColors.ToolboxBackgroundColorKey}}"/>
Expand All @@ -23,4 +23,4 @@
<SolidColorBrush x:Key="CommandBarTextHoverKey" Color="{DynamicResource {x:Static environment:EnvironmentColors.CommandBarTextHoverColorKey}}"/>


</ResourceDictionary>
</ResourceDictionary>
4 changes: 2 additions & 2 deletions src/BuildVision.UI/Styles/ScrollViewerStyle.xaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:vsfx="clr-namespace:Microsoft.VisualStudio.Shell;assembly=Microsoft.VisualStudio.Shell.12.0"
xmlns:vsfx="clr-namespace:Microsoft.VisualStudio.Shell;assembly=Microsoft.VisualStudio.Shell.14.0"
xmlns:converters="clr-namespace:BuildVision.UI.Converters">

<converters:ParameterIsEqualsValueConverter x:Key="ParameterIsEqualsValueConverter" />
Expand Down Expand Up @@ -236,4 +236,4 @@
</Setter>
</Style>

</ResourceDictionary>
</ResourceDictionary>
98 changes: 20 additions & 78 deletions src/BuildVision/BuildVision.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -60,28 +60,12 @@
<DeployExtension>False</DeployExtension>
</PropertyGroup>
<ItemGroup>
<Reference Include="envdte100, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<EmbedInteropTypes>False</EmbedInteropTypes>
</Reference>
<Reference Include="envdte80, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<EmbedInteropTypes>False</EmbedInteropTypes>
</Reference>
<Reference Include="envdte90, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<EmbedInteropTypes>False</EmbedInteropTypes>
</Reference>
<Reference Include="Microsoft.Build" />
<Reference Include="Microsoft.Build.Engine" />
<Reference Include="Microsoft.Build.Framework" />
<Reference Include="Microsoft.Build.Utilities.v4.0" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="Microsoft.VisualBasic" />
<Reference Include="Microsoft.VisualStudio.Shell.Interop.11.0, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<EmbedInteropTypes>True</EmbedInteropTypes>
</Reference>
<Reference Include="Microsoft.VisualStudio.Shell.Interop.12.0, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<EmbedInteropTypes>True</EmbedInteropTypes>
</Reference>
<Reference Include="Microsoft.VisualStudio.Shell.Interop.10.0" />
<Reference Include="PresentationFramework.Aero" />
<Reference Include="System" />
<Reference Include="System.Core" />
Expand All @@ -105,17 +89,6 @@
<Reference Include="WindowsBase" />
<Reference Include="System.Xaml" />
</ItemGroup>
<ItemGroup>
<COMReference Include="stdole">
<Guid>{00020430-0000-0000-C000-000000000046}</Guid>
<VersionMajor>2</VersionMajor>
<VersionMinor>0</VersionMinor>
<Lcid>0</Lcid>
<WrapperTool>primary</WrapperTool>
<Isolated>False</Isolated>
<EmbedInteropTypes>False</EmbedInteropTypes>
</COMReference>
</ItemGroup>
<ItemGroup>
<Compile Include="Core\BuildVisionPackage.Package.cs" />
<Compile Include="Helpers\ProjectItemExtensions.cs" />
Expand Down Expand Up @@ -229,65 +202,34 @@
</ProjectReference>
</ItemGroup>
<ItemGroup>
<PackageReference Include="VSSDK.DTE">
<Version>7.0.4</Version>
</PackageReference>
<PackageReference Include="VSSDK.GraphModel">
<Version>12.0.4</Version>
</PackageReference>
<PackageReference Include="VSSDK.IDE">
<Version>7.0.4</Version>
</PackageReference>
<PackageReference Include="VSSDK.IDE.10">
<Version>10.0.4</Version>
</PackageReference>
<PackageReference Include="VSSDK.IDE.11">
<Version>11.0.4</Version>
</PackageReference>
<PackageReference Include="VSSDK.IDE.12">
<Version>12.0.4</Version>
</PackageReference>
<PackageReference Include="VSSDK.IDE.8">
<Version>8.0.4</Version>
</PackageReference>
<PackageReference Include="VSSDK.IDE.9">
<Version>9.0.4</Version>
</PackageReference>
<PackageReference Include="VSSDK.OLE.Interop">
<Version>7.0.4</Version>
</PackageReference>
<PackageReference Include="VSSDK.Shell.12">
<Version>12.0.4</Version>
</PackageReference>
<PackageReference Include="VSSDK.Shell.Immutable.10">
<Version>10.0.4</Version>
</PackageReference>
<PackageReference Include="VSSDK.Shell.Immutable.11">
<Version>11.0.4</Version>
<PackageReference Include="EnvDTE">
<Version>8.0.2</Version>
</PackageReference>
<PackageReference Include="VSSDK.Shell.Immutable.12">
<Version>12.0.4</Version>
<PackageReference Include="EnvDTE100">
<Version>10.0.3</Version>
</PackageReference>
<PackageReference Include="VSSDK.Shell.Interop">
<Version>7.0.4</Version>
<PackageReference Include="EnvDTE80">
<Version>8.0.3</Version>
</PackageReference>
<PackageReference Include="VSSDK.Shell.Interop.8">
<Version>8.0.4</Version>
<PackageReference Include="EnvDTE90">
<Version>9.0.3</Version>
</PackageReference>
<PackageReference Include="VSSDK.Shell.Interop.9">
<Version>9.0.4</Version>
<PackageReference Include="EnvDTE90a">
<Version>9.0.3</Version>
</PackageReference>
<PackageReference Include="VSSDK.TextManager.Interop">
<Version>7.0.4</Version>
<PackageReference Include="Microsoft.VisualStudio.Shell.14.0">
<Version>14.3.25407</Version>
</PackageReference>
<PackageReference Include="VSSDK.TextManager.Interop.8">
<Version>8.0.4</Version>
<PackageReference Include="Microsoft.VisualStudio.Shell.Interop.12.0">
<Version>12.0.30111</Version>
</PackageReference>
<PackageReference Include="VSSDK.Threading">
<Version>12.0.4</Version>
<PackageReference Include="Microsoft.VSSDK.BuildTools">
<Version>15.9.3032</Version>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="VSSDK.Threading.12">
<Version>12.0.4</Version>
<PackageReference Include="stdole">
<Version>7.0.3303</Version>
</PackageReference>
</ItemGroup>
<PropertyGroup>
Expand Down
11 changes: 8 additions & 3 deletions src/BuildVision/Helpers/ProjectExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@

namespace BuildVision.Helpers
{
public class EnvDTECodeModelLanguageConstants2
{
public const string CMLanguageJSharp = "{E6FDF8BF-F3D1-11D4-8576-0002A516ECE8}";
}

public static class ProjectExtensions
{
private static readonly HashSet<string> _hiddenProjectsUniqueNames = new HashSet<string>
Expand Down Expand Up @@ -84,7 +89,7 @@ public static class ProjectExtensions
{ CodeModelLanguageConstants.vsCMLanguageMC, "MC++" }, // Managed C++
{ CodeModelLanguageConstants.vsCMLanguageVB, "VB.NET" },
{ CodeModelLanguageConstants.vsCMLanguageVC, "VC++" }, // Visual C++
{ CodeModelLanguageConstants2.vsCMLanguageJSharp, "J#" },
{ EnvDTECodeModelLanguageConstants2.CMLanguageJSharp, "J#" },
{ "{F2A71F9B-5D33-465A-A702-920D77279786}", "F#" },
};

Expand Down Expand Up @@ -608,7 +613,7 @@ public static Project GetSubProject(this Project solutionFolder, Func<Project, b
continue;

// If this is another solution folder, do a recursive call, otherwise add
if (subProject.Kind == ProjectKinds.vsProjectKindSolutionFolder)
if (subProject.Kind == EnvDTEProjectKinds.ProjectKindSolutionFolder)
{
Project sub = GetSubProject(subProject, cond);
if (sub != null)
Expand All @@ -634,7 +639,7 @@ public static IEnumerable<Project> GetSubProjects(this Project solutionFolder)
continue;

// If this is another solution folder, do a recursive call, otherwise add
if (subProject.Kind == ProjectKinds.vsProjectKindSolutionFolder)
if (subProject.Kind == EnvDTEProjectKinds.ProjectKindSolutionFolder)
list.AddRange(GetSubProjects(subProject));
else if (!subProject.IsHidden())
list.Add(subProject);
Expand Down
14 changes: 9 additions & 5 deletions src/BuildVision/Helpers/SolutionProjectsExtensions.cs
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
using System;
using System.Collections.Generic;

using EnvDTE;
using EnvDTE80;
using IServiceProvider = Microsoft.VisualStudio.OLE.Interop.IServiceProvider;
using System.Runtime.InteropServices;
using EnvDTE80;

namespace BuildVision.Helpers
{
public class EnvDTEProjectKinds
{
public const string ProjectKindSolutionFolder = "{66A26720-8FB5-11D2-AA7E-00C04F688DDE}";
}

public static class SolutionProjectsExtensions
{
public static IList<Project> GetProjects(this Solution solution)
Expand All @@ -19,7 +23,7 @@ public static IList<Project> GetProjects(this Solution solution)
if (project == null)
continue;

if (project.Kind == ProjectKinds.vsProjectKindSolutionFolder)
if (project.Kind == EnvDTEProjectKinds.ProjectKindSolutionFolder)
list.AddRange(project.GetSubProjects());
else if (!project.IsHidden())
list.Add(project);
Expand All @@ -37,7 +41,7 @@ public static Project GetProject(this Solution solution, Func<Project, bool> con
if (project == null)
continue;

if (project.Kind == ProjectKinds.vsProjectKindSolutionFolder)
if (project.Kind == EnvDTEProjectKinds.ProjectKindSolutionFolder)
{
Project sub = project.GetSubProject(cond);
if (sub != null)
Expand Down Expand Up @@ -76,4 +80,4 @@ public static object GetService(object serviceProviderObject, Type type)
return service;
}
}
}
}
78 changes: 39 additions & 39 deletions test/BuildVision.IntegrationTests/PackageTests.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System;
using Microsoft.VisualStudio.Shell.Interop;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Microsoft.VSSDK.Tools.VsIdeTesting;
//using Microsoft.VSSDK.Tools.VsIdeTesting;
using System.ComponentModel.Design;
using EnvDTE;
using Microsoft.VisualStudio;
Expand All @@ -12,47 +12,47 @@ namespace BuildVision.IntegrationTests
[TestClass]
public class PackageTests
{
private static IVsShell ShellService => VsIdeTestHostContext.ServiceProvider.GetService(typeof(SVsShell)) as IVsShell;
private static IVsUIShell UiShellService => VsIdeTestHostContext.ServiceProvider.GetService(typeof(SVsUIShell)) as IVsUIShell;
//private static IVsShell ShellService => VsIdeTestHostContext.ServiceProvider.GetService(typeof(SVsShell)) as IVsShell;
//private static IVsUIShell UiShellService => VsIdeTestHostContext.ServiceProvider.GetService(typeof(SVsUIShell)) as IVsUIShell;

[Ignore]
[TestMethod]
[HostType("VS IDE")]
public void PackageLoad_Should_Succeed()
{
UIThreadInvoker.Invoke(new Action(() =>
{
var guid = PackageGuids.GuidBuildVisionPackage;
Assert.IsTrue(0 == ShellService.LoadPackage(ref guid, out var package));
Assert.IsNotNull(package, "Package failed to load");
}));
}
//[Ignore]
//[TestMethod]
//[HostType("VS IDE")]
//public void PackageLoad_Should_Succeed()
//{
// UIThreadInvoker.Invoke(new Action(() =>
// {
// var guid = PackageGuids.GuidBuildVisionPackage;
// Assert.IsTrue(0 == ShellService.LoadPackage(ref guid, out var package));
// Assert.IsNotNull(package, "Package failed to load");
// }));
//}

[Ignore]
[TestMethod]
[HostType("VS IDE")]
public void ClickOnBuildVisionMenuItem_Should_ShowBuildVision()
{
UIThreadInvoker.Invoke(new Action(() =>
{
var toolwndCommandId = new CommandID(PackageGuids.GuidBuildVisionCmdSet, (int) PackageIds.CmdIdBuildVisionToolWindow);
ExecuteCommand(toolwndCommandId);
Assert.IsTrue(CanFindToolwindow(PackageGuids.GuidBuildVisionToolWindow));
}));
}
//[Ignore]
//[TestMethod]
//[HostType("VS IDE")]
//public void ClickOnBuildVisionMenuItem_Should_ShowBuildVision()
//{
// UIThreadInvoker.Invoke(new Action(() =>
// {
// var toolwndCommandId = new CommandID(PackageGuids.GuidBuildVisionCmdSet, (int) PackageIds.CmdIdBuildVisionToolWindow);
// ExecuteCommand(toolwndCommandId);
// Assert.IsTrue(CanFindToolwindow(PackageGuids.GuidBuildVisionToolWindow));
// }));
//}

public static void ExecuteCommand(CommandID cmd)
{
object customin = null;
object customout = null;
VsIdeTestHostContext.Dte.Commands.Raise(cmd.Guid.ToString("B").ToUpper(), cmd.ID, ref customin, ref customout);
}
//public static void ExecuteCommand(CommandID cmd)
//{
// object customin = null;
// object customout = null;
// VsIdeTestHostContext.Dte.Commands.Raise(cmd.Guid.ToString("B").ToUpper(), cmd.ID, ref customin, ref customout);
//}

public static bool CanFindToolwindow(Guid persistenceGuid)
{
var hr = UiShellService.FindToolWindow((uint) __VSFINDTOOLWIN.FTW_fFindFirst, ref persistenceGuid, out var windowFrame);
Assert.IsTrue(hr == VSConstants.S_OK);
return (windowFrame != null);
}
//public static bool CanFindToolwindow(Guid persistenceGuid)
//{
// //var hr = UiShellService.FindToolWindow((uint) __VSFINDTOOLWIN.FTW_fFindFirst, ref persistenceGuid, out var windowFrame);
// //Assert.IsTrue(hr == VSConstants.S_OK);
// //return (windowFrame != null);
//}
}
}

0 comments on commit 55c7f2d

Please sign in to comment.