Add hostfxr_get_dotnet_environment_info API (#48097)
authorMateo Torres-Ruiz <mateoatr@users.noreply.github.com>
Sat, 13 Feb 2021 00:48:48 +0000 (16:48 -0800)
committerGitHub <noreply@github.com>
Sat, 13 Feb 2021 00:48:48 +0000 (16:48 -0800)
commit64c77806e94c387ba84020f72eb03e846aa5d44b
tree71d3bb4b0c9ccd61c3b132140865f24c6bfcbd1b
parentd4a9b6b501b65d3f9bb6838803817bcf752fcce8
Add hostfxr_get_dotnet_environment_info API (#48097)

* Add hostfxr_get_dotnet_environment_info

* Change access modifiers in structs

* Remove unnecessary context local

* Use global install location if no dotnet_root is specified

* Add framework tests

* Update framework_info comparison

* Remove commented code

* Remove unnecessary marshaling
Export fn

* Add hostfxr_get_dotnet_environment_info to hostfxr exports

* Fail if result is nullptr
Validate size of structs
Test that result_context isn't modified

* Remove version_as_str
Update tests

* Add tests for invalid args
src/installer/corehost/cli/fxr/framework_info.cpp
src/installer/corehost/cli/fxr/framework_info.h
src/installer/corehost/cli/fxr/hostfxr.cpp
src/installer/corehost/cli/fxr/standalone/hostfxr.def
src/installer/corehost/cli/fxr/standalone/hostfxr_unixexports.src
src/installer/corehost/cli/hostfxr.h
src/installer/tests/Assets/TestProjects/HostApiInvokerApp/HostFXR.cs
src/installer/tests/HostActivation.Tests/NativeHostApis.cs