dotnet build reporting "PE image does not have metadata" with no details.
See original GitHub issueSteps 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:
- Created 7 years ago
- Reactions:1
- Comments:19 (12 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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.
@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.