Skip to content

Commit

Permalink
Merge pull request #564 from ElektroKill/fix/cor20-entrypoint-settings
Browse files Browse the repository at this point in the history
`ModuleWriter` no longer ignores `Cor20HeaderOptions.EntryPoint` value
  • Loading branch information
wtfsck authored Nov 30, 2024
2 parents 1e0ec26 + 1229681 commit f618525
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
New-Item -ItemType Directory nuget_files > $null
Copy-Item src\bin\Release\*.*nupkg nuget_files
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v4
if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/')
with:
name: nupkg
Expand Down
4 changes: 4 additions & 0 deletions src/DotNet/Writer/ModuleWriter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,10 @@ void InitializeChunkProperties() {
}

uint GetEntryPoint() {
var ep = Options.Cor20HeaderOptions.EntryPoint;
if (ep is not null)
return ep.Value;

if (module.ManagedEntryPoint is MethodDef methodEntryPoint)
return new MDToken(Table.Method, metadata.GetRid(methodEntryPoint)).Raw;

Expand Down

0 comments on commit f618525

Please sign in to comment.