* Added relationship table to hold ancesstors and descendents relationship for target projects.
* Now 1065 is solved because we pass correct update PackageSpec of child before parent restores.
* Remove RelationshipTree for now.
* Add unshipped public api.
* Remove unused item and add initial value to dictionary to prevent from null exception.
* More streamline package reference type code restore.
* Revert "More streamline package reference type code restore."
This reverts commit 875968b0a1eb814c0a6cee817673ee56a4f323ce.
* Restore NugetBuiltIntegrated restore works only in 1 pass.
* Minor refactoring for naming.
* Explicit clearing of cache.
* Initial refactoring of moving caching of updated PackageSpec near to usage, make it run parellel not finished yet.
* Made BuiltIntegratedProject project upgrade/downgrade parallel run for faster run.
* Fix minor typos.
* Remove unused methods and variables.
* Remove more unused item.
* Revert "Remove more unused item."
This reverts commit efa178296edb9f2c5bb9c48488a056ec6ef0e334.
* Patching in memory works.
* Cleanup
* Minor text change
* More code cleanup.
* Rename PreviewBuildIntegratedProjectActionsParallelAsync method to PreviewBuildIntegratedProjectsActionsAsync
* Add unit tests for covering PreviewBuildIntegratedProjectsActionsAsync method in NuGetPackageManager.
* Add more unit tests for BuildIntegratedTests
* Address Andy's code review comment.
* Add unit test for DependencyGraphSpec>>WithReplacedPackageSpecs new method I created.
* Get Andy's advise for reduce runtime time complexity.
* Change package versions because it's failing on .NetCore unit tests.
* Check if Newtonsoft version matches.
* Try different pacakge for unit test.
* Test
* Address comment about foreach loop variable name.
* Remove 'parallel' word from comment. Because actual parallel code is called thown the line different method.
* PackageReference/SDK style unit tests start working.
* Making source works for unit tests.
* Fixed problem of Unit test project not picking up my custom PackageSource.
* Revert LegacyPackageReferenceProject related changes, maybe I don't need it for now.
* Git clean up and fix added unit tests with new PackSource logic.
* Fix typo.
* Add NU1065 and new PackageSource handling to some unit test I forgot to add.
* Fix formatting recommendation in code review.
* Remove parallel wording from method comment, because actual parallelization happend down the line another called method here.
* Fix typo.
* Refactor code after Andy's code review.
thinking about API design:
Why does this method only accept BuildIntegratedNuGetProject?
Why can't this method be made internal, and the existing public API PreviewInstallPackageAsync calls it for compatible project types?
* Fix small typo.
* After refactoring code PreviewBuildIntegratedProjectActionsAsync and PreviewBuildIntegratedProjectActionsAsync share same logic via PreviewBuildIntegratedProjectsActionsAsync
method.
* All PreviewProjectsInstallPackageAsync related unit test for NugetPackageManager are ported to NetCorePackageReferenceProject(reference) type unit test from project json type unit tests.
* Remove the spaces and correct comments.
* Revert changes to BuildIntegratedTests.cs since we already ported all new unit tests to NetCorePackageReferenceProjectTests.cs
* Fix typo.
* Revert changes to LegacyPackageReferenceProjectTests.cs
* Revert back unneeded changes to NuGetPackageManagerTests.cs
* Remove unneeded change.
* Add missing copy right notice for new file GetPackageReferenceUtility.cs
* Add missing copyright notice for ProjectInstalledPackages.cs
* Remove wrong file.
* Revert unneeded changes.
* Fix typos.
* Address code review comments and clean up.
* Now also remembers we evaluated the parents too.
* Rename method name after nkolve92 code review.
* Address Nikolche code review comment about parent projects.
* Remove method PreviewResolveActionsForBuildIntegratedProjectsAsync method since it's so simple.
* Make sure restore happens only once during uninstall process for chain referenced projects. Address: https://github.com/NuGet/Home/issues/9932#issuecomment-679439201
* Changed install package to all projects that it check for restore only happens once per project.
* Clean up unused items.
* Replace StringComparer.OrdinalIgnoreCase with PathUtility.GetStringComparerBasedOnOS() for other OS compatibility.
* Refactor the unit tests after Nikolche's code review.
* Change unit test names.
* Fix formatting.
* Fix with dot net formatting.
* Add comment why we're separating BuildIntegratedNuGetProject vs packages.config projects.
* Address more code review comments by Cristina.
* Address Svet's code review comment.
* Fix formatting.
* Address Andy's latest code review.
* Refactor unit test after Andy's code review.
* Fix unit test after Nikolche review.
* Fix formatting.
Co-authored-by: Erick Yondon <eryondon@microsoft.com>
## Bug
Fixes: https://github.com/NuGet/Home/issues/6318
Regression: No
## Fix
Details: This PR adds support, in `INuGetProjectContext` and all of its child types, to log/error using `ILogMessage`. This primarily improves package install scenarios into classic csproj, where warnings were logged into the output console but not displayed in the VS error list.
Further, this fixes a regression caused by https://github.com/NuGet/NuGet.Client/commit/d0f97b53c1850d7209723afc7aa85986beabe3b8 where the error list would not clear on solution close and build.
## Testing/Validation
Tests Added: No
Reason for not adding tests: UI change
Validation done: manual validation
## Bug
`ProjectRestoreInformation` data event was missing `ProjectId` that can be used to correlate it to `Projectinformation` data event inside VS.
## Fix
Details: I have added `ProjectId` to the `PackageSpec` for `LegacyPackageReferenceProject`, `MSBuildNuGetProject`, `ProjectJsonNuGetProject` and `NetCorePackageReferenceProject` via `VsSolutionRestoreService`.
The logic is implemented in `NuGetProject` which read the `ProjectId` from `InternalMetadata` and returns an empty string if it is not found.
## Testing/Validation
Tests Added: Yes
Validation done: Manual validation using vstelmon
## Bug
Fixes: https://github.com/NuGet/Home/issues/6700
Regression: No
## Fix
Details: This PR adds the following -
1. Updates SignedPackageVerifierSettings to contain 4 additional fields -
- `bool AllowNoRepositoryCertificateList`
- `bool AllowNoClientCertificateList`
- `IReadOnlyList<VerificationAllowListEntry> RepositoryCertificateList`
- `IReadOnlyList<VerificationAllowListEntry> ClientCertificateList`
The new fields allow us to pass client and repository allow lists to `AllowListVerificationProvider`
2. Refactor `ISignatureVerificationProvider` to accept allow lists via `SignedPackageVerifierSettings`
3. Add `RepositorySignatureInfoUtility` to process `RepositorySignatureInfo` and generate effective `SignedPackageVerifierSettings`.
4. Update `PackageExtractor` to check if the download source has `RepositorySignatureInfo` and use that to verify signed packages.
5. Supporting refactoring and tests.
ResolvesNuGet/Home#5290.
Fixed failing functional tests:
🔨💯 CI tests failed on MAC due to a stack overflow bug in `MSBuildLogger`
🔨 `BuildIntegratedTests.TestPacManBuildIntegratedInstallPackageWithInitPS1`
🔨 `BuildIntegratedTests.TestPacManBuildIntegratedUpdatePackageCallsInitPs1OnNewPackages`
🔨 `MSBuildNuGetProjectTests.TestMSBuildNuGetProjectPSInstallAndInit`
🔨 `MSBuildNuGetProjectTests.TestMSBuildNuGetProjectPSUninstall`
* Lightweight solution load: Merge feature branch
This change summarizes feature work done to enable full support of LSL
in NuGet Package Manager.
Main concepts introduced
- `IVsProjectAdapter` - An abstraction layer over `EnvDTE.Project`.
Represents a virtual project object. It is aware of LSL mode and is
capable to force load project when it's needed. All occurances of DTE
project have been replaced with new adapter object.
- `INuGetProjectServices` - Collection of project services as building
blocks to access underlying project system functionality, such as
reference reader, build properties, project system capabilites, script host.
- `VsCoreProjectSystemService` - Implementation of project services for VS
core project system (DTE).
- `VsLangProjectSystemService` - Implementation of project services for
managed languages project system (VsLangProj80).
- `WorkspaceProjectServices` - Implementation of project services for
deferred projects based on Workspace* API.
Notable refactorings
- Decommissioned `EnvDTEProjectAdapter` in favour of the new adapter.
- `LegacyCSProjPackageReferenceProject` =>
`LegacyPackageReferenceProject`.
- `CpsPackageReferenceProject` => `NetCorePackageReferenceProject`
- Multiple renamings to avoid confusion betwen projects and project
systems.
ResolvesNuGet/Home#5180.
* Cumulative PR feedback plus bug fixes
* Applied recommended design changes
* [BUG 441140] An error dialog pop up when creating C# ASP.NET Sigle Page Application
Fixes internal bug 441140.
Merging into the migrated 4.3.0 branch, original changes are from @scottbommarito
Creates a `MetadataReferenceCache` class. It caches references to `string`s and `NuGetVersion`s and can be used to replace duplicate values in our metadata models. The cache only lives for a short amount of time--a single request--so it does not take up significant amounts of memory itself.
Also added a couple fields to particular models.
- `V2FeedPackageInfo` and `PackageSearchMetadataV2Feed` now have `Created` and `LastEdited`, which are exposed in the feed.
- `PackageSearchMetadataRegistration` is a subclass of `PackageSearchMetadata` that contains a `CatalogUri` and is returned by `PackageMetadataResourceV3`.
Merging all test utilities together. Test.Utility is now a common layer that all tests can use that sits between the product projects and test projects.