Closed victor-david closed 3 years ago
Thanks for the bug report. I think I have fixed it in a new version 1.8.21. Let me know, thanks.
Thanks Chris. With 1.8.21, the warning is gone and things appear to be working as they should again. In case others read this, my situation is:
MyNet5App -> uses MyLib -> which uses Microsoft.Xml.SgmlReader
When MyLib targets netstandard2.0;netstandard2.1, MyNet5App can't parse SGML because of the cannot load SgmlReaderCore meantioned above. And in fact, SgmlReaderCore.dll doesn't wind up in the app bin directory.
When MyLib also targets netcoreapp3.1;net5.0, then SgmlReaderCore.dll still doesn't wind up in the app bin directory, but MyApp does parse sgml as it should. I imagine this is because I don't understand how all the TFMs relate to each other. :(
At any rate, many thanks! for your quick response. Things are working as they should, and I'm back in business again getting my app going in .Net5
this is now fixed.
When a project with TFM netcoreapp3.1 or net5.0 uses package Microsoft.Xml.SgmlReader, a build warning occurs:
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2182,5): warning MSB3246: Resolved file has a bad image, no metadata, or is otherwise inaccessible. Could not load file or assembly 'SgmlReader.exe' or one of its dependencies. The module was expected to contain an assembly manifest.
This occurs for all versions from 1.8.15 to 1.8.20
If the project does not target netcoreapp3.1 or net5.0, no warning is emitted.
To repro:
Expected: Normal build
Actual: Above warning emitted.
My actual app is more involved of course, but the warning is the same. And then when my app needs to use the Sgml reader, it throws with:
Could not load file or assembly 'SgmlReaderCore, Version=1.8.20.0, Culture=neutral, PublicKeyToken=ab3ea86545595e2b'. The system cannot find the file specified.
Any advice appreciated. Thanks
p.s. I looked on StackOverflow first and the same issue is reported there, but there's no answer. Thought maybe this might get to you easier.