Fixes issue #9807 REVIEW (2nd) AFTER #11863 DRAFT
Fixes #9807
Proposed changes
- Add Remove dependance on WebClient for VB FileDownload by using HttpClient
- Add a Visual Basic Scratch Project so that Microsoft.VisualBasic.Forms dependent code can be tested from a Visual Basic project (even an empty WinForms project written in VB does not work)
- Upload still uses WebClient that also needs to be done as a separate PR
Customer Impact
Adds Async file download support to VB, and if WebClient goes away this will allow existing Visual Basic programs using synchronous File Download to still work. It also enable Async NetworkDownload is API is approved
Regression?
- Yes when WebClient if and when goes away, no today
Risk
- The code as is completely untested as I can't test without a working Scratch Project.
- The existing code uses ICredentials in some of the paths, it is unclear how compatible that is between WebClient and HttpClient
Test methodology
Close to 100% Code Coverage Before and After change, original tests had no tests and there Error Message handling was odd
There are Exception Messages that need to move from WebClient to this PR and be translated.
Microsoft Reviewers: Open in CodeFlow
Codecov Report
Attention: Patch coverage is 99.72771% with 4 lines in your changes missing coverage. Please review.
Project coverage is 97.06195%. Comparing base (
fae358b) to head (d869cf1). Report is 5 commits behind head on main.
Additional details and impacted files
@@ Coverage Diff @@
## main #11867 +/- ##
====================================================
+ Coverage 75.69021% 97.06195% +21.37174%
====================================================
Files 3151 1164 -1987
Lines 635600 353193 -282407
Branches 46951 5289 -41662
====================================================
- Hits 481087 342816 -138271
+ Misses 151076 9631 -141445
+ Partials 3437 746 -2691
| Flag | Coverage Δ | |
|---|---|---|
| Debug | 97.06195% <99.72771%> (+21.37174%) |
:arrow_up: |
| integration | ? |
|
| production | ? |
|
| test | 97.06195% <99.72771%> (+0.01142%) |
:arrow_up: |
| unit | ? |
Flags with carried forward coverage won't be shown. Click here to find out more.
@Tanya-Solyanik @KlausLoeffelmann this and the following draft PR's need to wait until at least mid October for review by Klaus and it needs API review if the new Friend Async functions are to be made public and if ProgressDialog was Public this PR could be simpler.
Replaced by PR #12489