Skip to content

Commit

Permalink
Removed SQLite workaround.
Browse files Browse the repository at this point in the history
  • Loading branch information
jp2masa committed Mar 9, 2018
1 parent 7535965 commit 04e6cb9
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 11 deletions.
5 changes: 3 additions & 2 deletions source/Cosmos.VS.DebugEngine/Cosmos.VS.DebugEngine.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,12 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Data.SQLite" Version="2.0.0" />
<PackageReference Include="Microsoft.Data.Sqlite" Version="2.0.0" />
<PackageReference Include="Microsoft.VisualStudio.Debugger.Interop.15.0" Version="15.4.27004" />
<PackageReference Include="Microsoft.VisualStudio.SDK.EmbedInteropTypes" Version="15.0.16" />
<PackageReference Include="Microsoft.VisualStudio.Shell.15.0" Version="15.4.27004" />
<PackageReference Include="Microsoft.VisualStudio.Shell.15.0" Version="15.6.27413" />
<PackageReference Include="Microsoft.VisualStudio.Shell.Interop.11.0" Version="11.0.61031" />
<PackageReference Include="SQLitePCLRaw.bundle_green" Version="1.1.10-pre20180223200113" />
<PackageReference Include="System.ServiceProcess.ServiceController" Version="4.4.1" />
</ItemGroup>

Expand Down
33 changes: 24 additions & 9 deletions source/Cosmos.VS.DebugEngine/CosmosDebugEnginePackage.cs
Original file line number Diff line number Diff line change
@@ -1,19 +1,40 @@
using System;
using System.IO;
using System.Runtime.InteropServices;
using Microsoft.VisualStudio;
using Microsoft.VisualStudio.OLE.Interop;
using Microsoft.VisualStudio.Shell;

using Cosmos.VS.DebugEngine.Commands;

[assembly: ProvideBindingRedirection(
AssemblyName = "SQLitePCLRaw.batteries_green",
NewVersion = "1.1.10.53",
OldVersionLowerBound = "1.0.0.0",
OldVersionUpperBound = "1.1.10.53")]

[assembly: ProvideBindingRedirection(
AssemblyName = "SQLitePCLRaw.batteries_v2",
NewVersion = "1.1.10.53",
OldVersionLowerBound = "1.0.0.0",
OldVersionUpperBound = "1.1.10.53")]

[assembly: ProvideBindingRedirection(
AssemblyName = "SQLitePCLRaw.core",
NewVersion = "1.1.10.53",
OldVersionLowerBound = "1.0.0.0",
OldVersionUpperBound = "1.1.10.53")]

[assembly: ProvideBindingRedirection(
AssemblyName = "SQLitePCLRaw.provider.e_sqlite3",
NewVersion = "1.1.10.53",
OldVersionLowerBound = "1.0.0.0",
OldVersionUpperBound = "1.1.10.53")]

namespace Cosmos.VS.DebugEngine
{
[Guid(Guids.guidPackageString)]
[PackageRegistration(UseManagedResourcesOnly = true)]
[InstalledProductRegistration("#110", "#112", "1.0", IconResourceID = 400)]
[ProvideMenuResource("Menus.ctmenu", 1)]
[ProvideAutoLoad(VSConstants.UICONTEXT.ShellInitialized_string)]
public sealed class CosmosDebugEnginePackage : Package, IOleCommandTarget
{
private IOleCommandTarget packageCommandTarget;
Expand All @@ -23,12 +44,6 @@ protected override void Initialize()
{
base.Initialize();

// TODO: remove this, as well as ProvideAutoLoad, if and when https://github.com/ericsink/SQLitePCL.raw/issues/181 is resolved.
var xDir = IntPtr.Size == 4 ? "x86" : "x64";
Environment.SetEnvironmentVariable("PATH",
String.Join(";", Environment.GetEnvironmentVariable("PATH"),
Path.Combine(Path.GetDirectoryName(typeof(CosmosDebugEnginePackage).Assembly.Location), xDir)));

packageCommandTarget = GetService(typeof(IOleCommandTarget)) as IOleCommandTarget;
packageCommandHandler = new DebugCommandHandler(this);
}
Expand Down

0 comments on commit 04e6cb9

Please sign in to comment.