diff --git a/language-extensions/dotnet-core-CSharp/README.md b/language-extensions/dotnet-core-CSharp/README.md index c5fbeb2..0c49b13 100644 --- a/language-extensions/dotnet-core-CSharp/README.md +++ b/language-extensions/dotnet-core-CSharp/README.md @@ -5,11 +5,11 @@ Language Extensions is a feature of SQL Server used for executing external code. For more information about SQL Server Language Extensions, refer to this [documentation](https://docs.microsoft.com/en-us/sql/language-extensions/language-extensions-overview?view=sql-server-ver15). -The dotnet-core-CSharp-extension version in this repository is compatible with SQL Server 2019 CU3 onwards. It integrates .NET core in SQL Server and works with .NET 6.0 in **Windows only**. +The dotnet-core-CSharp-extension version in this repository is compatible with SQL Server 2019 CU3 onwards. It integrates .NET Core in SQL Server and works with .NET 8.0 and up on Windows and Linux. Currently, the extension supports the following data types: SQL_C_SLONG, SQL_C_ULONG, SQL_C_SSHORT, SQL_C_USHORT, SQL_C_SBIGINT, SQL_C_UBIGINT, SQL_C_STINYINT, SQL_C_UTINYINT, SQL_C_BIT, SQL_C_FLOAT, SQL_C_DOUBLE, SQL_C_CHAR. It supports the following SQL data types: int, bigint, smallint, tinyint, real, float, bit, varchar(n). -To use this dotnet-core-CSharp-lang-extension.zip package, follow [this tutorial](./sample/regex/README.md). For any fixes or enhancements, you are welcome to modify, rebuild and use the binaries using the following instructions. +To use this `dotnet-core-CSharp-lang-extension.zip` (Windows) or `dotnet-core-CSharp-lang-extension.tar.gz` (Linux) package, follow [this tutorial](./sample/regex/README.md). For any fixes or enhancements, you are welcome to modify, rebuild and use the binaries using the following instructions. ## Building @@ -24,15 +24,24 @@ To use this dotnet-core-CSharp-lang-extension.zip package, follow [this tutorial - PATH\TO\ENLISTMENT\build-output\dotnet-core-CSharp-extension\windows\release\nativecsharpextension.dll \ - PATH\TO\ENLISTMENT\build-output\dotnet-core-CSharp-extension\windows\release\hostfxr.dll \ - PATH\TO\ENLISTMENT\build-output\dotnet-core-CSharp-extension\windows\release\Microsoft.SqlServer.CSharpExtension.dll \ - - PATH\TO\ENLISTMENT\build-output\dotnet-core-CSharp-extension\windows\release\Microsoft.SqlServer.CSharpExtension.runtimeconfig.json\ + - PATH\TO\ENLISTMENT\build-output\dotnet-core-CSharp-extension\windows\release\Microsoft.SqlServer.CSharpExtension.runtimeconfig.json \ - PATH\TO\ENLISTMENT\build-output\dotnet-core-CSharp-extension\windows\release\Microsoft.SqlServer.CSharpExtension.deps.json 5. Run [create-dotnet-core-CSharp-extension-zip.cmd](./build/windows/create-dotnet-core-CSharp-extension-zip.cmd) which will generate: \ - - PATH\TO\ENLISTMENT\build-output\dotnet-core-CSharp-extension\target\debug\dotnet-core-CSharp-lang-extension.zip + - PATH\TO\ENLISTMENT\build-output\dotnet-core-CSharp-extension\windows\release\packages\dotnet-core-CSharp-lang-extension.zip This zip can be used in CREATE EXTERNAL LANGUAGE, as detailed in the tutorial in the Usage section below. ### Linux -Not Supported. + +1. Run [build-dotnet-core-CSharp-extension.ps1](./build/windows/build-dotnet-core-CSharp-extension.cmd) which will generate: \ + - PATH/TO/ENLISTMENT/build-output/dotnet-core-CSharp-extension/linux/release/libnativecsharpextension.so \ + - PATH/TO/ENLISTMENT/build-output/dotnet-core-CSharp-extension/linux/release/Microsoft.SqlServer.CSharpExtension.dll \ + - PATH/TO/ENLISTMENT/build-output/dotnet-core-CSharp-extension/linux/release/Microsoft.SqlServer.CSharpExtension.runtimeconfig.json \ + - PATH/TO/ENLISTMENT/build-output/dotnet-core-CSharp-extension/linux/release/Microsoft.SqlServer.CSharpExtension.deps.json + +2. Run [create-dotnet-core-CSharp-extension-zip.ps1](./build/windows/create-dotnet-core-CSharp-extension-zip.cmd) which will generate: \ + - PATH/TO/ENLISTMENT/build-output/dotnet-core-CSharp-extension/linux/release/packages/dotnet-core-CSharp-lang-extension.tar.gz + This tarball can be used in CREATE EXTERNAL LANGUAGE, as detailed in the tutorial in the Usage section below. ## Testing (Optional) diff --git a/language-extensions/dotnet-core-CSharp/build/linux/build-dotnet-core-CSharp-extension.ps1 b/language-extensions/dotnet-core-CSharp/build/linux/build-dotnet-core-CSharp-extension.ps1 new file mode 100755 index 0000000..7ec3394 --- /dev/null +++ b/language-extensions/dotnet-core-CSharp/build/linux/build-dotnet-core-CSharp-extension.ps1 @@ -0,0 +1,103 @@ +#!/usr/bin/env pwsh + +# Set root and working directories +$ENL_ROOT = Join-Path $PSScriptRoot "../../../.." +$DOTNET_EXTENSION_HOME = Join-Path $ENL_ROOT "language-extensions/dotnet-core-CSharp" +$DOTNET_EXTENSION_WORKING_DIR = Join-Path $ENL_ROOT "build-output/dotnet-core-CSharp-extension/linux" + +# Clean and create working directory +if (Test-Path $DOTNET_EXTENSION_WORKING_DIR) { + Remove-Item $DOTNET_EXTENSION_WORKING_DIR -Recurse -Force +} +New-Item -ItemType Directory -Path $DOTNET_EXTENSION_WORKING_DIR | Out-Null + +if ($args.Count -eq 0) { + # Default to release + $actualArgs = @("release") +} +else { + $actualArgs = $args +} + +# Process each build configuration +foreach ($BUILD_CONFIGURATION in $actualArgs) { + $BUILD_CONFIGURATION = $BUILD_CONFIGURATION.ToLower() + # Default to release if not debug + if ($BUILD_CONFIGURATION -ne "debug") { + $BUILD_CONFIGURATION = "release" + } + + # Set target directory + $TARGET = Join-Path $ENL_ROOT "build-output/dotnet-core-CSharp-extension/target/$BUILD_CONFIGURATION" + + # Clean and create target directory + if (Test-Path $TARGET) { + Remove-Item $TARGET -Recurse -Force + } + New-Item -ItemType Directory -Path $TARGET | Out-Null + + Write-Host "[Info] Building dotnet-core-CSharp-extension nativecsharpextension dll..." + + # Set build output directory + $BUILD_OUTPUT = Join-Path $DOTNET_EXTENSION_WORKING_DIR $BUILD_CONFIGURATION + if (Test-Path $BUILD_OUTPUT) { + Remove-Item $BUILD_OUTPUT -Recurse -Force + } + New-Item -ItemType Directory -Path $BUILD_OUTPUT | Out-Null + Push-Location $BUILD_OUTPUT + + # Set source and include paths + $DOTNET_NATIVE_SRC = Join-Path $DOTNET_EXTENSION_HOME "src/native" + $DOTNET_NATIVE_INCLUDE = Join-Path $DOTNET_EXTENSION_HOME "include" + $EXTENSION_HOST_INCLUDE = Join-Path $ENL_ROOT "extension-host/include" + $DOTNET_NATIVE_LIB = Join-Path $DOTNET_EXTENSION_HOME "lib" + + # Build native code + $ccArgs = @( + "-shared", + "-fPIC", + "-o", "libnativecsharpextension.so", + "-I$DOTNET_NATIVE_INCLUDE", + "-I$EXTENSION_HOST_INCLUDE", + "-DLINUX" + ) + $ccArgs += Get-ChildItem -Path $DOTNET_NATIVE_SRC -Filter "*.cpp" | ForEach-Object { $_.FullName } + $ccArgs += Join-Path -Path $DOTNET_NATIVE_LIB -ChildPath "libnethost.a" + if ($BUILD_CONFIGURATION -eq "debug") { + $ccArgs += "-D", "DEBUG", "-g" + } + + if ($null -ne $env:CXX) { + $cxx = $env:CXX + } + else { + $cxx = "c++" + } + + $proc = Start-Process -FilePath $cxx -ArgumentList $ccArgs -NoNewWindow -Wait -PassThru + if ($proc.ExitCode -ne 0) { + Write-Host "Error: Failed to build nativecsharpextension for configuration=$BUILD_CONFIGURATION" + exit $proc.ExitCode + } + + # Build managed code + Write-Host "[Info] Building Microsoft.SqlServer.CSharpExtension dll..." + $DOTNET_MANAGED_SRC = Join-Path $DOTNET_EXTENSION_HOME "src/managed" + $dotnetProc = Start-Process -FilePath "dotnet" -ArgumentList @( + "build", + (Join-Path $DOTNET_MANAGED_SRC "Microsoft.SqlServer.CSharpExtension.csproj"), + "-m", + "-c", $BUILD_CONFIGURATION, + "-o", $BUILD_OUTPUT, + "--no-dependencies" + ) -NoNewWindow -Wait -PassThru + + if ($dotnetProc.ExitCode -ne 0) { + Write-Host "Error: Failed to build for Microsoft.SqlServer.CSharpExtension.dll for configuration=$BUILD_CONFIGURATION" + exit $dotnetProc.ExitCode + } + + Write-Host "Success: Built dotnet-core-CSharp-extension for $BUILD_CONFIGURATION configuration." +} + +exit 0 diff --git a/language-extensions/dotnet-core-CSharp/build/linux/create-dotnet-core-CSharp-extension-zip.ps1 b/language-extensions/dotnet-core-CSharp/build/linux/create-dotnet-core-CSharp-extension-zip.ps1 new file mode 100755 index 0000000..06b20dd --- /dev/null +++ b/language-extensions/dotnet-core-CSharp/build/linux/create-dotnet-core-CSharp-extension-zip.ps1 @@ -0,0 +1,61 @@ +#!/usr/bin/env pwsh + +$ENL_ROOT = Join-Path $PSScriptRoot "../../../.." +$DOTNET_EXTENSION_WORKING_DIR = Join-Path -Path $ENL_ROOT -ChildPath "build-output/dotnet-core-CSharp-extension/linux" + +function CheckError { + param( + [int]$errorLevel, + [string]$errorMessage + ) + if ($errorLevel -ne 0) { + Write-Error $errorMessage + exit $errorLevel + } +} + +if ($args.Count -eq 0) { + # Default to release + $actualArgs = @("release") +} +else { + $actualArgs = $args +} + +# Process each build configuration +foreach ($BUILD_CONFIGURATION in $actualArgs) { + $BUILD_CONFIGURATION = $BUILD_CONFIGURATION.ToLower() + # Default to release if not debug + if ($BUILD_CONFIGURATION -ne "debug") { + $BUILD_CONFIGURATION = "release" + } + + $BUILD_OUTPUT = Join-Path -Path $DOTNET_EXTENSION_WORKING_DIR -ChildPath $BUILD_CONFIGURATION + New-Item -ItemType Directory -Force -Path "$BUILD_OUTPUT/packages" | Out-Null + + # Delete the ref folder so that the zip can be loaded by the SPEES + Remove-Item -Recurse -Force -ErrorAction SilentlyContinue "$BUILD_OUTPUT/ref" + + # Define files to compress, conditionally including .pdb files if BUILD_CONFIGURATION is "debug" + $FILES_TO_COMPRESS = @( + "Microsoft.SqlServer.CSharpExtension.runtimeconfig.json", + "Microsoft.SqlServer.CSharpExtension.deps.json" + ) + $FILES_TO_COMPRESS += Get-ChildItem -Path $BUILD_OUTPUT -Filter "*.dll" | ForEach-Object { $_.Name } + $FILES_TO_COMPRESS += Get-ChildItem -Path $BUILD_OUTPUT -Filter "*.so" | ForEach-Object { $_.Name } + if ($BUILD_CONFIGURATION -ieq "debug") { + $FILES_TO_COMPRESS += Get-ChildItem -Path $BUILD_OUTPUT -Filter "*.pdb" | ForEach-Object { $_.Name } + } + + # Package the signed binaries. + try { + Push-Location $BUILD_OUTPUT + & tar -czvf "$BUILD_OUTPUT/packages/dotnet-core-CSharp-lang-extension.tar.gz" $FILES_TO_COMPRESS + CheckError $LASTEXITCODE "Error: Failed to create zip for dotnet-core-CSharp-extension for configuration=$BUILD_CONFIGURATION" + Pop-Location + Write-Host "Success: Compressed dotnet-core-CSharp-extension for $BUILD_CONFIGURATION configuration." + } + catch { + CheckError 1 "Error: Failed to create zip for dotnet-core-CSharp-extension for configuration=$BUILD_CONFIGURATION" + } +} diff --git a/language-extensions/dotnet-core-CSharp/include/DotnetEnvironment.h b/language-extensions/dotnet-core-CSharp/include/DotnetEnvironment.h index c84b6cd..e12856c 100644 --- a/language-extensions/dotnet-core-CSharp/include/DotnetEnvironment.h +++ b/language-extensions/dotnet-core-CSharp/include/DotnetEnvironment.h @@ -10,13 +10,26 @@ //********************************************************************* #pragma once +#if defined(_WIN32) || defined(WINDOWS) #include "Windows.h" +#else +#define E_FAIL -1 +#define S_OK 0 +#endif + #include #include #include +#if defined(_WIN32) || defined(WINDOWS) #define STR(s) L ## s #define CH(c) L ## c +#define PATH_SEPARATOR CH('\\') +#else +#define STR(s) s +#define CH(c) c +#define PATH_SEPARATOR CH('/') +#endif using namespace std; using string_t = std::basic_string; @@ -46,10 +59,14 @@ class DotnetEnvironment // Load managed assembly and get function pointer to a managed method // const string_t ManagedExtensionName = STR("Microsoft.SqlServer.CSharpExtension"); - const string_t ManagedExtensionPath = m_root_path + STR("\\") + ManagedExtensionName + STR(".dll"); + const string_t ManagedExtensionPath = m_root_path + PATH_SEPARATOR + ManagedExtensionName + STR(".dll"); const string_t ManagedExtensionType = ManagedExtensionName + STR(".CSharpExtension, ") + ManagedExtensionName; +#if defined(_WIN32) || defined(WINDOWS) const string_t ManagedExtensionMethod = to_utf16_str(method_name); - const string_t DelegateTypeName = ManagedExtensionName + STR(".CSharpExtension+") + to_utf16_str(method_name) + STR("Delegate, ") + ManagedExtensionName; +#else + const string_t ManagedExtensionMethod = method_name; +#endif + const string_t DelegateTypeName = ManagedExtensionName + STR(".CSharpExtension+") + ManagedExtensionMethod + STR("Delegate, ") + ManagedExtensionName; int rc = m_load_assembly_and_get_function_pointer( ManagedExtensionPath.c_str(), ManagedExtensionType.c_str(), diff --git a/language-extensions/dotnet-core-CSharp/include/Logger.h b/language-extensions/dotnet-core-CSharp/include/Logger.h index 2a96ec0..fa43d0b 100644 --- a/language-extensions/dotnet-core-CSharp/include/Logger.h +++ b/language-extensions/dotnet-core-CSharp/include/Logger.h @@ -10,7 +10,6 @@ //********************************************************************* #include #include -#include using namespace std; #define LOG(msg) Logger::Log(msg) diff --git a/language-extensions/dotnet-core-CSharp/include/nativecsharpextension.h b/language-extensions/dotnet-core-CSharp/include/nativecsharpextension.h index 8a1a341..3a8fad5 100644 --- a/language-extensions/dotnet-core-CSharp/include/nativecsharpextension.h +++ b/language-extensions/dotnet-core-CSharp/include/nativecsharpextension.h @@ -20,7 +20,10 @@ #include #include +#if defined(_WIN32) || defined(WINDOWS) #include +#endif + #include #include "sqlexternallanguage.h" #include "sqlexternallibrary.h" diff --git a/language-extensions/dotnet-core-CSharp/include/nethost.h b/language-extensions/dotnet-core-CSharp/include/nethost.h new file mode 100644 index 0000000..eaca175 --- /dev/null +++ b/language-extensions/dotnet-core-CSharp/include/nethost.h @@ -0,0 +1,99 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +#ifndef __NETHOST_H__ +#define __NETHOST_H__ + +#include + +#ifdef _WIN32 + #ifdef NETHOST_EXPORT + #define NETHOST_API __declspec(dllexport) + #else + // Consuming the nethost as a static library + // Shouldn't export attempt to dllimport. + #ifdef NETHOST_USE_AS_STATIC + #define NETHOST_API + #else + #define NETHOST_API __declspec(dllimport) + #endif + #endif + + #define NETHOST_CALLTYPE __stdcall + #ifdef _WCHAR_T_DEFINED + typedef wchar_t char_t; + #else + typedef unsigned short char_t; + #endif +#else + #ifdef NETHOST_EXPORT + #define NETHOST_API __attribute__((__visibility__("default"))) + #else + #define NETHOST_API + #endif + + #define NETHOST_CALLTYPE + typedef char char_t; +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +// Parameters for get_hostfxr_path +// +// Fields: +// size +// Size of the struct. This is used for versioning. +// +// assembly_path +// Path to the component's assembly. +// If specified, hostfxr is located as if the assembly_path is the apphost +// +// dotnet_root +// Path to directory containing the dotnet executable. +// If specified, hostfxr is located as if an application is started using +// 'dotnet app.dll', which means it will be searched for under the dotnet_root +// path and the assembly_path is ignored. +// +struct get_hostfxr_parameters { + size_t size; + const char_t *assembly_path; + const char_t *dotnet_root; +}; + +// +// Get the path to the hostfxr library +// +// Parameters: +// buffer +// Buffer that will be populated with the hostfxr path, including a null terminator. +// +// buffer_size +// [in] Size of buffer in char_t units. +// [out] Size of buffer used in char_t units. If the input value is too small +// or buffer is nullptr, this is populated with the minimum required size +// in char_t units for a buffer to hold the hostfxr path +// +// get_hostfxr_parameters +// Optional. Parameters that modify the behaviour for locating the hostfxr library. +// If nullptr, hostfxr is located using the environment variable or global registration +// +// Return value: +// 0 on success, otherwise failure +// 0x80008098 - buffer is too small (HostApiBufferTooSmall) +// +// Remarks: +// The full search for the hostfxr library is done on every call. To minimize the need +// to call this function multiple times, pass a large buffer (e.g. PATH_MAX). +// +NETHOST_API int NETHOST_CALLTYPE get_hostfxr_path( + char_t * buffer, + size_t * buffer_size, + const struct get_hostfxr_parameters *parameters); + +#ifdef __cplusplus +} // extern "C" +#endif + +#endif // __NETHOST_H__ diff --git a/language-extensions/dotnet-core-CSharp/lib/libnethost.a b/language-extensions/dotnet-core-CSharp/lib/libnethost.a new file mode 100644 index 0000000..9b333a4 Binary files /dev/null and b/language-extensions/dotnet-core-CSharp/lib/libnethost.a differ diff --git a/language-extensions/dotnet-core-CSharp/sample/regex/pkg/RegexSample.csproj b/language-extensions/dotnet-core-CSharp/sample/regex/pkg/RegexSample.csproj index 07d7f1f..a0a78ac 100644 --- a/language-extensions/dotnet-core-CSharp/sample/regex/pkg/RegexSample.csproj +++ b/language-extensions/dotnet-core-CSharp/sample/regex/pkg/RegexSample.csproj @@ -1,6 +1,6 @@  - net6.0 + net8.0 true true diff --git a/language-extensions/dotnet-core-CSharp/src/managed/Microsoft.SqlServer.CSharpExtension.csproj b/language-extensions/dotnet-core-CSharp/src/managed/Microsoft.SqlServer.CSharpExtension.csproj index a7f4a8b..375c866 100644 --- a/language-extensions/dotnet-core-CSharp/src/managed/Microsoft.SqlServer.CSharpExtension.csproj +++ b/language-extensions/dotnet-core-CSharp/src/managed/Microsoft.SqlServer.CSharpExtension.csproj @@ -1,6 +1,6 @@ - net6.0 + net8.0 true true diff --git a/language-extensions/dotnet-core-CSharp/src/native/DotnetEnvironment.cpp b/language-extensions/dotnet-core-CSharp/src/native/DotnetEnvironment.cpp index a2b2f82..2b3f47d 100644 --- a/language-extensions/dotnet-core-CSharp/src/native/DotnetEnvironment.cpp +++ b/language-extensions/dotnet-core-CSharp/src/native/DotnetEnvironment.cpp @@ -10,16 +10,29 @@ //********************************************************************* #include "DotnetEnvironment.h" #include "Logger.h" + +#if defined(_WIN32) || defined(WINDOWS) #include "Windows.h" +#else +#include +#endif + #include +#include #include #include #include #include #include +#include +#if defined(_WIN32) || defined(WINDOWS) #define STR(s) L ## s #define CH(c) L ## c +#else +#define STR(s) s +#define CH(c) c +#endif using namespace std; using string_t = std::basic_string; @@ -34,7 +47,12 @@ DotnetEnvironment::DotnetEnvironment( std::string language_params, std::string language_path, std::string public_library_path, - std::string private_library_path) : m_root_path(to_utf16_str(language_path)) + std::string private_library_path) : +#if defined(_WIN32) || defined(WINDOWS) + m_root_path(to_utf16_str(language_path)) +#else + m_root_path(language_path) +#endif { } @@ -56,7 +74,7 @@ short DotnetEnvironment::Init() // STEP 2: Initialize and start the .NET Core runtime // - const string_t config_path = m_root_path + STR("\\Microsoft.SqlServer.CSharpExtension.runtimeconfig.json"); + const string_t config_path = m_root_path + PATH_SEPARATOR + STR("Microsoft.SqlServer.CSharpExtension.runtimeconfig.json"); hostfxr_handle cxt = get_dotnet(config_path.c_str()); m_load_assembly_and_get_function_pointer = get_dotnet_load_assembly(cxt); @@ -68,6 +86,7 @@ short DotnetEnvironment::Init() return S_OK; } +#if defined(_WIN32) || defined(WINDOWS) //-------------------------------------------------------------------------------------------------- // Name: DotnetEnvironment::to_utf16_str // @@ -82,6 +101,7 @@ string_t DotnetEnvironment::to_utf16_str(const std::string& utf8str) MultiByteToWideChar(CP_UTF8, 0, utf8str.c_str(), -1, wstr.get(), wchars_num); return string_t(wstr.get()); } +#endif //-------------------------------------------------------------------------------------------------- // Name: DotnetEnvironment::to_hex_string @@ -106,7 +126,11 @@ string DotnetEnvironment::to_hex_string(int value) void* DotnetEnvironment::load_library(const char_t *path) { LOG("DotnetEnvironment::load_library"); +#if defined(_WIN32) || defined(WINDOWS) HMODULE h = ::LoadLibraryW(path); +#else + void *h = dlopen(path, RTLD_LAZY); +#endif assert(h != nullptr); return (void*)h; } @@ -120,13 +144,17 @@ void* DotnetEnvironment::load_library(const char_t *path) void* DotnetEnvironment::get_export(void *h, const char *name) { LOG("DotnetEnvironment::get_export"); +#if defined(_WIN32) || defined(WINDOWS) void *f = ::GetProcAddress((HMODULE)h, name); +#else + void *f = dlsym(h, name); +#endif assert(f != nullptr); return f; } //-------------------------------------------------------------------------------------------------- -// Name: DotnetEnvironment::get_export +// Name: DotnetEnvironment::load_hostfxr // // Description: // Load hostfxr and get desired exports @@ -134,7 +162,16 @@ void* DotnetEnvironment::get_export(void *h, const char *name) bool DotnetEnvironment::load_hostfxr() { LOG("DotnetEnvironment::load_hostfxr"); +#if defined(_WIN32) || defined(WINDOWS) string_t hostfxr_location = m_root_path + STR("\\hostfxr.dll"); +#else + char buffer[4096]; + size_t buffer_size = sizeof(buffer); + if (get_hostfxr_path(buffer, &buffer_size, nullptr) != 0) { + return false; + } + string_t hostfxr_location(buffer); +#endif void *lib = load_library(hostfxr_location.c_str()); m_init_fptr = (hostfxr_initialize_for_runtime_config_fn)get_export(lib, "hostfxr_initialize_for_runtime_config"); m_get_delegate_fptr = (hostfxr_get_runtime_delegate_fn)get_export(lib, "hostfxr_get_runtime_delegate"); diff --git a/language-extensions/dotnet-core-CSharp/src/native/Logger.cpp b/language-extensions/dotnet-core-CSharp/src/native/Logger.cpp index 89d8585..c44b011 100644 --- a/language-extensions/dotnet-core-CSharp/src/native/Logger.cpp +++ b/language-extensions/dotnet-core-CSharp/src/native/Logger.cpp @@ -10,8 +10,6 @@ //********************************************************************* #include #include -#include -#include #include "Logger.h" using namespace std; diff --git a/language-extensions/dotnet-core-CSharp/test/src/managed/Microsoft.SqlServer.CSharpExtensionTest.csproj b/language-extensions/dotnet-core-CSharp/test/src/managed/Microsoft.SqlServer.CSharpExtensionTest.csproj index 758bc79..01b7d11 100644 --- a/language-extensions/dotnet-core-CSharp/test/src/managed/Microsoft.SqlServer.CSharpExtensionTest.csproj +++ b/language-extensions/dotnet-core-CSharp/test/src/managed/Microsoft.SqlServer.CSharpExtensionTest.csproj @@ -1,6 +1,6 @@  - net6.0 + net8.0 true