Skip to content
This repository has been archived by the owner on Nov 1, 2018. It is now read-only.

Commit

Permalink
Adding netcore50 TFM to support RTM UAP template
Browse files Browse the repository at this point in the history
  • Loading branch information
pranavkm committed Oct 23, 2015
1 parent 78f75bc commit 1aaf4ed
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 16 deletions.
8 changes: 1 addition & 7 deletions src/Microsoft.Data.Sqlite/Interop/NativeMethods.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,12 @@
using System.Runtime.InteropServices;
using static Microsoft.Data.Sqlite.Interop.Constants;

#if NET451 || DOTNET5_4
using Microsoft.Extensions.Internal;

#if NET451 || DOTNET5_4
using System.IO;
using System.Reflection;
using Microsoft.Extensions.PlatformAbstractions;
using Microsoft.Extensions.DependencyInjection;
#endif

using Microsoft.Extensions.Internal;
#endif

namespace Microsoft.Data.Sqlite.Interop
Expand All @@ -27,7 +23,6 @@ static NativeMethods()
{
var loaded = NativeLibraryLoader.TryLoad("sqlite3");

#if NET451 || DOTNET5_4
// TODO: Remove when DNX supports native artifacts
if (!loaded)
{
Expand All @@ -42,7 +37,6 @@ static NativeMethods()

loaded = NativeLibraryLoader.TryLoad("sqlite3", Path.Combine(installPath, "runtimes/win/native"));
}
#endif

Debug.Assert(loaded, "loaded is false.");
}
Expand Down
1 change: 0 additions & 1 deletion src/Microsoft.Data.Sqlite/SqliteDataReader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
using static Microsoft.Data.Sqlite.Interop.Constants;
#if NET451
using System.Data;

#endif

namespace Microsoft.Data.Sqlite
Expand Down
2 changes: 1 addition & 1 deletion src/Microsoft.Data.Sqlite/SqliteParameter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ public override string ParameterName
public override string SourceColumn { get; set; } = string.Empty;
public override bool SourceColumnNullMapping { get; set; }

#if NET451 || NET451
#if NET451
public override DataRowVersion SourceVersion { get; set; }
#endif

Expand Down
2 changes: 1 addition & 1 deletion src/Microsoft.Data.Sqlite/SqliteParameterCollection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ protected internal SqliteParameterCollection()
public override int Count => _parameters.Count;
public override object SyncRoot => ((ICollection)_parameters).SyncRoot;

#if NET451 || NET451
#if NET451
public override bool IsFixedSize => false;
public override bool IsReadOnly => false;
public override bool IsSynchronized => false;
Expand Down
7 changes: 2 additions & 5 deletions src/Microsoft.Data.Sqlite/Utilities/NativeLibraryLoader.cs
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.

#if NET451 || NET451 || DOTNET5_4
#if NET451 || DOTNET5_4

using System;
using System.Diagnostics;
using System.IO;
using System.Runtime.InteropServices;

#if NET451 || DOTNET5_4
using Microsoft.Extensions.PlatformAbstractions;
using Microsoft.Extensions.DependencyInjection;
#endif

namespace Microsoft.Extensions.Internal
{
Expand All @@ -36,7 +33,7 @@ public static bool TryLoad(string dllName)
string applicationBase;
#if NET451
applicationBase = AppDomain.CurrentDomain.BaseDirectory;
#elif NET451 || DOTNET5_4
#elif DOTNET5_4

if (!PlatformServices.Default.Runtime.OperatingSystem.Equals("Windows", StringComparison.OrdinalIgnoreCase))
{
Expand Down
19 changes: 18 additions & 1 deletion src/Microsoft.Data.Sqlite/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,27 @@
"System.Text.Encoding": "4.0.11-*",
"System.Threading.Tasks": "4.0.11-*"
}
},
"netcore50": {
"dependencies": {
"System.Collections": "4.0.10",
"System.Data.Common": "4.0.0",
"System.Diagnostics.Debug": "4.0.10",
"System.Globalization": "4.0.10",
"System.Linq": "4.0.0",
"System.Reflection": "4.0.10",
"System.Resources.ResourceManager": "4.0.0",
"System.Runtime": "4.0.20",
"System.Runtime.Extensions": "4.0.10",
"System.Runtime.Handles": "4.0.0",
"System.Runtime.InteropServices": "4.0.20",
"System.Text.Encoding": "4.0.10",
"System.Threading.Tasks": "4.0.10"
}
}
},
"packInclude": {
"runtimes/": "runtimes/**",
"runtimes/win/native/x86/": "runtimes/win/native/x86/*"
}
}
}

0 comments on commit 1aaf4ed

Please sign in to comment.