fooo1
❔ getting sensitive config from .csproj
I would like to get some env vars in csproj, however when defining them in an ItemGroup I get compilation errors - msbuild error: specify the name of the target.
Presumably it's something obvious, but I can't find it.. :
14 replies
✅ nuget naming nuances - Microsoft.Extensions.Configuration.Yaml doesn't belong to Microsoft
Can package names be whatever the uploader desires and there's no indication of hierarchy, as far as ownership is concerned?
official ms package -
https://www.nuget.org/packages/Microsoft.Extensions.Configuration/8.0.0-preview.2.23128.3
extension to above package that's not official -
https://www.nuget.org/packages/Microsoft.Extensions.Configuration.Yaml/2.0.0-preview2
Given the structure, I thought Microsoft would own that namespace, but seems it means nothing?
3 replies
✅ Reading a yaml file that has multiple types
I'm having trouble finding examples that show how, given a key, to return a value which may be a string, int or list.
var value = configuration[key];
works on primitive types only;
var value = configuration.GetSection(key).GetChildren().Select(x => x.Value).ToList();
works(ish) on list but not on primitive types.
Whats the path of least complexity to get any value from any key, leaving up to the user to make sure correct methods are used on correct types?16 replies
❔ ✅ Why doesn't this basic HttpClient GET request doesn't work as expected?
I do not get anything past making a request. Neither an exception, nor an exception. I'm guessing it's because I'm not properly waiting for async to complete - but in that case what is it lacking?
Program.cs
HttpClientLib.cs
26 replies