Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
Grpc
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
tci-gateway-module
Grpc
Commits
826c8d79
Commit
826c8d79
authored
8 years ago
by
Jan Tattermusch
Browse files
Options
Downloads
Patches
Plain Diff
fixed formatting
parent
ca29914a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/csharp/Grpc.Core/Internal/NativeExtension.cs
+7
-7
7 additions, 7 deletions
src/csharp/Grpc.Core/Internal/NativeExtension.cs
with
7 additions
and
7 deletions
src/csharp/Grpc.Core/Internal/NativeExtension.cs
+
7
−
7
View file @
826c8d79
...
...
@@ -101,18 +101,18 @@ namespace Grpc.Core.Internal
// With old-style VS projects, the native libraries get copied using a .targets rule to the build output folder
// alongside the compiled assembly.
// With dotnet cli projects targeting net45 framework, the native libraries (just the required ones)
// are similarly copied to the built output folder, through the magic of Microsoft.NETCore.Platforms.
// are similarly copied to the built output folder, through the magic of Microsoft.NETCore.Platforms.
var
classicPath
=
Path
.
Combine
(
assemblyDirectory
,
GetNativeLibraryFilename
());
// With dotnet cli project targeting netcoreapp1.0, projects will use Grpc.Core assembly directly in the location where it got restored
// by nuget. We locate the native libraries based on known structure of Grpc.Core nuget package.
// When "dotnet publish" is used, the runtimes directory is copied next to the published assemblies.
string
runtimesDirectory
=
string
.
Format
(
"runtimes/{0}/native"
,
GetPlatformString
());
var
netCorePublishedAppStylePath
=
Path
.
Combine
(
assemblyDirectory
,
runtimesDirectory
,
GetNativeLibraryFilename
());
var
netCoreAppStylePath
=
Path
.
Combine
(
assemblyDirectory
,
"../.."
,
runtimesDirectory
,
GetNativeLibraryFilename
());
// When "dotnet publish" is used, the runtimes directory is copied next to the published assemblies.
string
runtimesDirectory
=
string
.
Format
(
"runtimes/{0}/native"
,
GetPlatformString
());
var
netCorePublishedAppStylePath
=
Path
.
Combine
(
assemblyDirectory
,
runtimesDirectory
,
GetNativeLibraryFilename
());
var
netCoreAppStylePath
=
Path
.
Combine
(
assemblyDirectory
,
"../.."
,
runtimesDirectory
,
GetNativeLibraryFilename
());
// Look for all native library in all possible locations in given order.
string
[]
paths
=
new
[]
{
classicPath
,
netCorePublishedAppStylePath
,
netCoreAppStylePath
};
// Look for all native library in all possible locations in given order.
string
[]
paths
=
new
[]
{
classicPath
,
netCorePublishedAppStylePath
,
netCoreAppStylePath
};
return
new
UnmanagedLibrary
(
paths
);
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment