sdk icon indicating copy to clipboard operation
sdk copied to clipboard

corehost should not crash if dependency not found

Open TheRealPiotrP opened this issue 10 years ago • 2 comments

When corehost fails to find a dependency it crashes and pops a WER dialog. It should instead exit gracefully and provide useful feedback.

Repro

dotnet-new dotnet-restore dotnet-build delete the deps file run the exe

Actual

WER dialog + Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly 'System.Runtime, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.

Expected

No WER dialog + System.Runtime was not found. Deps file C:...\myapp.deps was not found.

TheRealPiotrP avatar Jan 29 '16 21:01 TheRealPiotrP

WER policy is owned by the machine configuration. For the remaining issues, they are nice to have (but captured in the trace logging) that can be considered for RTM. Thoughts @piotrpMSFT?

gkhanna79 avatar Apr 01 '16 05:04 gkhanna79

Not finding a deps file is not an error unless the deps was specified using --depsfile. Rest of the outcomes are not in host's control.

schellap avatar Apr 18 '16 09:04 schellap