Skip to content

Commit f618525

Browse files
authored
Merge pull request #564 from ElektroKill/fix/cor20-entrypoint-settings
`ModuleWriter` no longer ignores `Cor20HeaderOptions.EntryPoint` value
2 parents 1e0ec26 + 1229681 commit f618525

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
New-Item -ItemType Directory nuget_files > $null
4848
Copy-Item src\bin\Release\*.*nupkg nuget_files
4949
50-
- uses: actions/upload-artifact@v2
50+
- uses: actions/upload-artifact@v4
5151
if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/')
5252
with:
5353
name: nupkg

src/DotNet/Writer/ModuleWriter.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,10 @@ void InitializeChunkProperties() {
301301
}
302302

303303
uint GetEntryPoint() {
304+
var ep = Options.Cor20HeaderOptions.EntryPoint;
305+
if (ep is not null)
306+
return ep.Value;
307+
304308
if (module.ManagedEntryPoint is MethodDef methodEntryPoint)
305309
return new MDToken(Table.Method, metadata.GetRid(methodEntryPoint)).Raw;
306310

0 commit comments

Comments
 (0)