question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

dotnet build reporting "PE image does not have metadata" with no details.

See original GitHub issue

Steps to reproduce

I’m hitting this in a private repro building an assembly building against the full CLR.

Expected behavior

Builds clean or reports the errant image not containing metadatea

Actual behavior

Compilation Succeeds with 0 errors and warnings. Elapsed time is reported. The text “PE image does not have metadata.” is reported and dotnet build exits with 1. The DLL and PDB files are produced and ildasm is able to report metadata for the assembly.

Environment data

dotnet --info output: .NET Command Line Tools (1.0.0-rc2-002444)

Product Information: Version: 1.0.0-rc2-002444 Commit Sha: ada4e363c0

Runtime Environment: OS Name: Windows OS Version: 10.0.14329 OS Platform: Windows RID: win10-x64

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:19 (12 by maintainers)

github_iconTop GitHub Comments

3reactions
KthProgcommented, Oct 21, 2019

I just saw this out of nowhere in a Xamarin project. No changes made since the last time it successfully built and deployed. Cleaning and rebuilding fixed it.

3reactions
yatlicommented, Jun 19, 2017

@piotroko I’m seeing this issue again with coreclr 2.0 preview-1. When our nuget package assembly releases a native assembly in the same directory, the following builds fail.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to compile Xamarin.Android project in VS 2022 ...
Referring to this GitHub issue dotnet build reporting "PE image does not have metadata" with no details., you could clean and rebuild to...
Read more >
Metadata file could not be opened -- PE image doesn't ...
Metadata file could not be opened -- PE image doesn't contain managed metadata. If you need to reference a private assembly, you can...
Read more >
PE image doesn't contain managed metadata.
We have a nuget package that includes a native dll (it is Microsoft.Data.SqlClient.SNI.x86.dll - which we had to include to resolves some ...
Read more >
[WFR] Resolved file has a bad image, no metadata, or is ...
The test executes, but this warning will not go away. Visual Studiowindows 10.0testing-toolsprojectvisual studio 2017 version 15.5.
Read more >
Untitled
Pe image doesn't contain managed metadata "PE image does not have ... NET parsing support is built into XP and later, so the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found