Skip to content

Commit 2110152

Browse files
update environment (.NET 8, Node.js 20)
1 parent 6b231f9 commit 2110152

File tree

12 files changed

+349
-207
lines changed

12 files changed

+349
-207
lines changed

.github/workflows/ci.yml

+3-4
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,14 @@ on:
66

77
jobs:
88
build:
9-
if: "!contains(github.event.head_commit.message, '[ci skip]')"
109
runs-on: windows-latest
1110

1211
steps:
13-
- uses: actions/checkout@v3
12+
- uses: actions/checkout@v4
1413

15-
- uses: actions/setup-node@v3
14+
- uses: actions/setup-node@v4
1615
with:
17-
node-version: 18
16+
node-version: 20
1817

1918
- name: Install node packages
2019
run: npm install

Bootstrapper/include/coreclr_delegates.h

+13
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,17 @@ typedef int (CORECLR_DELEGATE_CALLTYPE *get_function_pointer_fn)(
4444
void *reserved /* Extensibility parameter (currently unused and must be 0) */,
4545
/*out*/ void **delegate /* Pointer where to store the function pointer result */);
4646

47+
typedef int (CORECLR_DELEGATE_CALLTYPE *load_assembly_fn)(
48+
const char_t *assembly_path /* Fully qualified path to assembly */,
49+
void *load_context /* Extensibility parameter (currently unused and must be 0) */,
50+
void *reserved /* Extensibility parameter (currently unused and must be 0) */);
51+
52+
typedef int (CORECLR_DELEGATE_CALLTYPE *load_assembly_bytes_fn)(
53+
const void *assembly_bytes /* Bytes of the assembly to load */,
54+
size_t assembly_bytes_len /* Byte length of the assembly to load */,
55+
const void *symbols_bytes /* Optional. Bytes of the symbols for the assembly */,
56+
size_t symbols_bytes_len /* Optional. Byte length of the symbols for the assembly */,
57+
void *load_context /* Extensibility parameter (currently unused and must be 0) */,
58+
void *reserved /* Extensibility parameter (currently unused and must be 0) */);
59+
4760
#endif // __CORECLR_DELEGATES_H__

Bootstrapper/include/hostfxr.h

+55-1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ enum hostfxr_delegate_type
2828
hdt_com_unregister,
2929
hdt_load_assembly_and_get_function_pointer,
3030
hdt_get_function_pointer,
31+
hdt_load_assembly,
32+
hdt_load_assembly_bytes,
3133
};
3234

3335
typedef int32_t(HOSTFXR_CALLTYPE *hostfxr_main_fn)(const int argc, const char_t **argv);
@@ -353,12 +355,64 @@ struct hostfxr_dotnet_environment_info
353355
//
354356
// String encoding:
355357
// Windows - UTF-16 (pal::char_t is 2 byte wchar_t)
356-
// Unix - UTF-8 (pal::char_t is 1 byte char)
358+
// Non-Windows - UTF-8 (pal::char_t is 1 byte char)
357359
//
358360
typedef int32_t(HOSTFXR_CALLTYPE* hostfxr_get_dotnet_environment_info_fn)(
359361
const char_t* dotnet_root,
360362
void* reserved,
361363
hostfxr_get_dotnet_environment_info_result_fn result,
362364
void* result_context);
363365

366+
struct hostfxr_framework_result
367+
{
368+
size_t size;
369+
const char_t* name;
370+
const char_t* requested_version;
371+
const char_t* resolved_version;
372+
const char_t* resolved_path;
373+
};
374+
375+
struct hostfxr_resolve_frameworks_result
376+
{
377+
size_t size;
378+
379+
size_t resolved_count;
380+
const struct hostfxr_framework_result* resolved_frameworks;
381+
382+
size_t unresolved_count;
383+
const struct hostfxr_framework_result* unresolved_frameworks;
384+
};
385+
386+
typedef void (HOSTFXR_CALLTYPE* hostfxr_resolve_frameworks_result_fn)(
387+
const hostfxr_resolve_frameworks_result* result,
388+
void* result_context);
389+
390+
//
391+
// Resolves frameworks for a runtime config
392+
//
393+
// Parameters:
394+
// runtime_config_path
395+
// Path to the .runtimeconfig.json file
396+
// parameters
397+
// Optional. Additional parameters for initialization.
398+
// If null or dotnet_root is null, the root corresponding to the running hostfx is used.
399+
// callback
400+
// Optional. Result callback invoked with result of the resolution.
401+
// Structs and their elements are valid for the duration of the call.
402+
// result_context
403+
// Optional. Additional context passed to the result callback.
404+
//
405+
// Return value:
406+
// 0 on success, otherwise failure.
407+
//
408+
// String encoding:
409+
// Windows - UTF-16 (pal::char_t is 2-byte wchar_t)
410+
// Non-Windows - UTF-8 (pal::char_t is 1-byte char)
411+
//
412+
typedef int32_t(HOSTFXR_CALLTYPE* hostfxr_resolve_frameworks_for_runtime_config_fn)(
413+
const char_t* runtime_config_path,
414+
/*opt*/ const hostfxr_initialize_parameters* parameters,
415+
/*opt*/ hostfxr_resolve_frameworks_result_fn callback,
416+
/*opt*/ void* result_context);
417+
364418
#endif //__HOSTFXR_H__

DemoApplication/DemoApplication.sln

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
11

22
Microsoft Visual Studio Solution File, Format Version 12.00
33
# Visual Studio Version 17
4-
VisualStudioVersion = 17.3.32929.385
4+
VisualStudioVersion = 17.11.35222.181
55
MinimumVisualStudioVersion = 10.0.40219.1
6-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DemoApplication", "DemoApplication\DemoApplication.csproj", "{DD0EC8D5-3EFB-433B-85ED-E1A2BF1D0CA6}"
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DemoApplication", "DemoApplication\DemoApplication.csproj", "{1CF03031-3FF7-43CD-938A-A2AACA5BCB26}"
77
EndProject
88
Global
99
GlobalSection(SolutionConfigurationPlatforms) = preSolution
1010
Debug|Any CPU = Debug|Any CPU
1111
Release|Any CPU = Release|Any CPU
1212
EndGlobalSection
1313
GlobalSection(ProjectConfigurationPlatforms) = postSolution
14-
{DD0EC8D5-3EFB-433B-85ED-E1A2BF1D0CA6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15-
{DD0EC8D5-3EFB-433B-85ED-E1A2BF1D0CA6}.Debug|Any CPU.Build.0 = Debug|Any CPU
16-
{DD0EC8D5-3EFB-433B-85ED-E1A2BF1D0CA6}.Release|Any CPU.ActiveCfg = Release|Any CPU
17-
{DD0EC8D5-3EFB-433B-85ED-E1A2BF1D0CA6}.Release|Any CPU.Build.0 = Release|Any CPU
14+
{1CF03031-3FF7-43CD-938A-A2AACA5BCB26}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15+
{1CF03031-3FF7-43CD-938A-A2AACA5BCB26}.Debug|Any CPU.Build.0 = Debug|Any CPU
16+
{1CF03031-3FF7-43CD-938A-A2AACA5BCB26}.Release|Any CPU.ActiveCfg = Release|Any CPU
17+
{1CF03031-3FF7-43CD-938A-A2AACA5BCB26}.Release|Any CPU.Build.0 = Release|Any CPU
1818
EndGlobalSection
1919
GlobalSection(SolutionProperties) = preSolution
2020
HideSolutionNode = FALSE
2121
EndGlobalSection
2222
GlobalSection(ExtensibilityGlobals) = postSolution
23-
SolutionGuid = {BB3484FA-D003-405E-BA6D-29BF1AAEE847}
23+
SolutionGuid = {BF70B7B2-46B7-4831-9DBC-0CFFDE39916E}
2424
EndGlobalSection
2525
EndGlobal

DemoApplication/DemoApplication/DemoApplication.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFramework>net6.0</TargetFramework>
5+
<TargetFramework>net8.0</TargetFramework>
66
<ImplicitUsings>enable</ImplicitUsings>
77
<Nullable>enable</Nullable>
88
</PropertyGroup>

DemoApplication/build.bat

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
dotnet publish -c Release -r win10-x64 -o dist --self-contained
1+
dotnet publish -c Release -r win-x64 -p:PublishDir="%cd%/dist" --self-contained

RuntimePatcher/RuntimePatcher.sln

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
11

22
Microsoft Visual Studio Solution File, Format Version 12.00
33
# Visual Studio Version 17
4-
VisualStudioVersion = 17.3.32929.385
4+
VisualStudioVersion = 17.11.35222.181
55
MinimumVisualStudioVersion = 10.0.40219.1
6-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RuntimePatcher", "RuntimePatcher\RuntimePatcher.csproj", "{415720BA-D007-418D-B281-ECECB6303465}"
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RuntimePatcher", "RuntimePatcher\RuntimePatcher.csproj", "{B262C52E-ADBE-4548-8B9B-BDE4A26A67F6}"
77
EndProject
88
Global
99
GlobalSection(SolutionConfigurationPlatforms) = preSolution
1010
Debug|Any CPU = Debug|Any CPU
1111
Release|Any CPU = Release|Any CPU
1212
EndGlobalSection
1313
GlobalSection(ProjectConfigurationPlatforms) = postSolution
14-
{415720BA-D007-418D-B281-ECECB6303465}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15-
{415720BA-D007-418D-B281-ECECB6303465}.Debug|Any CPU.Build.0 = Debug|Any CPU
16-
{415720BA-D007-418D-B281-ECECB6303465}.Release|Any CPU.ActiveCfg = Release|Any CPU
17-
{415720BA-D007-418D-B281-ECECB6303465}.Release|Any CPU.Build.0 = Release|Any CPU
14+
{B262C52E-ADBE-4548-8B9B-BDE4A26A67F6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15+
{B262C52E-ADBE-4548-8B9B-BDE4A26A67F6}.Debug|Any CPU.Build.0 = Debug|Any CPU
16+
{B262C52E-ADBE-4548-8B9B-BDE4A26A67F6}.Release|Any CPU.ActiveCfg = Release|Any CPU
17+
{B262C52E-ADBE-4548-8B9B-BDE4A26A67F6}.Release|Any CPU.Build.0 = Release|Any CPU
1818
EndGlobalSection
1919
GlobalSection(SolutionProperties) = preSolution
2020
HideSolutionNode = FALSE
2121
EndGlobalSection
2222
GlobalSection(ExtensibilityGlobals) = postSolution
23-
SolutionGuid = {C2C65888-D4D9-4EB6-A4CC-7E53A3AC4C92}
23+
SolutionGuid = {3B731D80-E164-4B66-B5CB-F96F42D7C6D6}
2424
EndGlobalSection
2525
EndGlobal
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net6.0</TargetFramework>
4+
<TargetFramework>net8.0</TargetFramework>
55
<ImplicitUsings>enable</ImplicitUsings>
66
<Nullable>enable</Nullable>
77
<EnableDynamicLoading>true</EnableDynamicLoading>
88
</PropertyGroup>
99

1010
<ItemGroup>
11-
<PackageReference Include="Lib.Harmony" Version="2.2.2" />
11+
<PackageReference Include="Lib.Harmony" Version="2.3.3" />
1212
</ItemGroup>
1313

1414
</Project>

RuntimePatcher/build.bat

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
dotnet publish -c Release -o dist
1+
dotnet publish -c Release -p:PublishDir="%cd%/dist"

0 commit comments

Comments
 (0)