microsoft / win32metadata

Tooling to generate metadata for Win32 APIs in the Windows SDK.
Other
1.34k stars 118 forks source link

Update Install-DotNetTool.ps1 to use repos NuGet.config #2013

Closed philnach closed 2 weeks ago

philnach commented 3 weeks ago

Issue: NuGet.config was not being taking into account when running Install-DotNetTool.ps1.

Fix: Pass NuGet.config into Install-DotNetTool.ps1.

Since, Install-DotNetTool.ps1 now required a NuGet.config file winmdgenerator needed to be updated to supply a NuGet.config as Install-DotNetTool.ps1 is called to install ClangSharpPInvokeGenerator.

To allow for flexibility by consumers NuGetPackageSource build property was added to Code, Props and targets to enable overriding from the default package source. CONTRIBUTING.MD was also generated to mention the NuGetPackageSource override.

How tested:

  1. Ran .\DoAll.ps1 -clean and confirmed successful output and test pass
  2. Tested generated local package from of winmdgenerator in the wdkmetadata repo using .\DoAll.ps1 -clean and confirmed successful output and tests pass.