System-supplied error message missing when PublishSingleFile & SelfContained #111783
Unanswered
JJLovesLife
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
When run in normal build, this will show
Could not load file or assembly 'file.txt'. The system cannot find the file specified.
.The
Message
returns system-supplied error message becausenull
is pass to constructor.However, if you publish with
dotnet publish -p:PublishSingleFile=true -p:SelfContained=false
, then run the published exe file. You got empty string, without enriched exception message from runtime resource.Seems it is caused by the mscorrc.dll missing when self-contained & single bundle. Is this expected?
Beta Was this translation helpful? Give feedback.
All reactions