Validate .NET Installs from dnup#51405
Conversation
This implements validation of installs using hostfxr apis to ensure the install actually works and not just that the manifest is tracking the installs correctly in e2e tests. It also adds a test to show that we can do multiple installs in the same directory without failing. It also improves the existing test logic to not assume a hard-coded debug value for the dnup process.
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
though now it always expects an attacher
| : "libhostfxr.so"; | ||
|
|
||
| return Directory.EnumerateFiles(hostFxrDirectory, libraryName, SearchOption.AllDirectories) | ||
| .OrderByDescending(File.GetLastWriteTimeUtc) |
There was a problem hiding this comment.
I don't think this is the best approach at determining which hostfxr to use, though the cases where this would be called is rare. I would be ok with removing this or instead searching the latest directory
|
|
||
| Rule ID | Missing Help Link | Title | | ||
| --------|-------------------|-------| | ||
| CA1873 | <https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1873> | Avoid potentially expensive logging | |
There was a problem hiding this comment.
This is from main - happens automatically in build
dsplaisted
left a comment
There was a problem hiding this comment.
Looks great, big improvement to the readability / understandability of ReleaseManifest.
Something to think about for the future is I think it would be a good idea to get rid of the ParseVersionChannel logic in ReleaseManifest. Probably we can move that to the UpdateChannel class and also take advantage of logic in ReleaseVersion as possible.
src/Installer/Microsoft.Dotnet.Installation/Internal/ReleaseManifest.cs
Outdated
Show resolved
Hide resolved
src/Installer/Microsoft.Dotnet.Installation/Internal/ReleaseManifest.cs
Outdated
Show resolved
Hide resolved
Agreed. Caching and separating the archive download logic would also be ideal. |
DNUP_TEST_DEBUGor vscode workspace launch profile.