* Port buildpipeline json to Azure devops Yaml.
* Update per review comments
* few more updates to the review comments
* Fix PR build issue for Windows leg
* NetCorePublic-Int-Pool machine pool doesn't have VS 2015 or VS 2017 installed. Switching to Hosted VS2017
Implements reporting errors with message box for Windows GUI apps in apphost.
In apphost, if it's running as GUI, error writing will be redirected to a buffer. Upon exit, if the error buffer is not empty, it will be showed on screen as a message box.
The error writer is propagated from apphost to hostfxr and thus to hostpolicy.
This solves the problem that GUI apps which don't have console die silently without reporting any errors if there are issues during host execution.
* Update dependencies from https://github.com/dotnet/arcade build 802
This change updates the following dependencies
- Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.18615.1
* Update dependencies from https://github.com/dotnet/arcade build 817
This change updates the following dependencies
- Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.18616.5
* Update dependencies from https://github.com/dotnet/arcade build 708
This change updates the following dependencies
- Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.18610.4
* Update dependencies from https://github.com/dotnet/arcade build 723
This change updates the following dependencies
- Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.18611.14
* Improve SDK version lookup description
Link to official docs which have detailed description of the algorithm.
Add a note about the hostfxr export options as well.
* Fix a small issue to avoid looking up directories like -1.-1.-1
If the global.json specifies SDK version but we can't find that version in a given search location, the code would end up checking if a folder with name "-1.-1.-1" exist. This is because we're left with empty version structure which is represented as -1.-1.-1.
Not only this is a small perf issue (unnecessarily looking at disk), but if the folder existed by any chance we would have returned that version for use.
* Add new export to hostpolicy and hostfxr to redirect error output to a callback
This introduces corehost_set_error_writer and hostfxr_set_error_writer exports.
If set, all errors will be written to the error writer instead of the default stderr.
Tracing is unaffected by this change.
The error writer is set per-thread (thread local).
Only one error writer can be set on a given thread. Subsequent calls to set error
writer will overwrite the previous writer.
hostfxr propagates the custom error writer (if any) to the hostpolicy
for the duration of the calls it makes to hostpolicy.
Added tests to validate the new behavior.
* Remove TODOs which are now resolved with this change
* Fix buffer allocation to work with any string (arbitrary large).
Remove locks on error writer since it's thread local.
* Fix the error formating on Linux
* Fix error formatting on Linux
va_list is not reusable, by definition. On Windows this works since the implementation makes it reusable. but on Linux it's not. So make a copy before calling the printf with it.
Simplify the code, since vsnprintf and _vsnwprintf do in fact behave the same if passed NULL buffer and zero length (calculates the necessary buffer size). So no need for two functions even on Windows.