40 Commits
Author SHA1 Message Date
Nikolche Kolev 7c22394ec1 Test dotnet integration with current and next SDKs (#7423) 2026-06-09 11:39:13 -07:00
Nikolche Kolev c8a073c36c Simplify ProjectFileUtils.AddItem overloads (#7378) 2026-05-11 08:58:08 -07:00
Jan Jones d070eb6666 Add support for file-based apps to the XPlat CLI (#7169) 2026-03-25 12:34:03 -07:00
Nikolche Kolev 9373d6b7fe Add package and update package treat --framework as aliases correctly for aliased projects (#7130) 2026-02-17 13:22:15 -08:00
Nikolche Kolev af9df1d886 LockFile.GetTarget now uses LockFileTarget aliases to match the target, remove more project.json usage, simplify SpecValidationUtility API (#6992) 2025-12-10 08:09:45 -08:00
Andy Zivkovic ba112de7ee Make nullable enabled by default across entire repo (#6960) 2025-11-20 21:13:26 +10:30
Simon Cropp 579b09a035 Avoid the perf hit of using linq .Count() (#6716) 2025-09-30 15:56:57 -07:00
Nikolche Kolev 9f2f7f24da Account for project and package reference with the same name when adding a package reference (#6660) 2025-08-01 17:08:53 +00:00
Nikolche Kolev ad6033bef7 Consolidate tests to PackageReference (#6335) 2025-03-25 16:09:02 -07:00
Nikolche Kolev 652730141e Migrate RestoreRetryTests, fix up test utilities as well (#6332) 2025-03-20 22:19:15 +00:00
Jeff Kluge 86bcc5fee1 Use .NET SDK 9.0.2xx to build repository and .NET SDK 9.0.3xx for integration tests (#6285) 2025-02-27 10:18:17 -08:00
Nikolche KolevandSimon Cropp d762526b40 Simplify Linq expressions and enable the IDE0120 rule (#6214)
Co-authored-by: Simon Cropp <simon.cropp@gmail.com>
2025-01-14 14:23:59 -08:00
Todd Grunke 15691b7351 Attempt to move several data structures to be immutable (#5930) 2024-10-17 12:31:15 -07:00
Andy Zivkovic b8efbf37ba Move signed package testing utils to new package (#6100) 2024-10-17 22:03:36 +10:30
Kartheek Penagamuri c13cea4dfd dotnet list package prompts only once for authentication even though there are multiple projects in a solution (#5571) 2024-01-11 11:51:54 -08:00
Nikolche Kolev 1b3c993538 Cache assets file in the project context(#4525) 2022-03-30 17:58:34 -07:00
Jeff Kluge 71424bcf70 Add ability to override centrally defined package version (#4426) 2022-02-28 15:02:11 -08:00
Nirmal Guru 97311b5cb4 Improve test fixtures and related code (#3637)
* Consolidate Restore/Build/Pack methods in Tests

Test Fixture now has similar API surface across Restore/Build/Pack commands

* Fix 'dotnet pack' tests when testing under VS IDE

The NuGet Pack artifacts aren't being copied to the test SDK layout,
when building/testing under VS IDE locally and not on CI/CLI.

* Rename 'OutputPath' to 'ProjectExtensionsPath' in 'SimpleTestProjectContext'

The 'OutputPath' property under 'SimpleTestProjectContext' is an alias of 'MSBuildProjectExtensionsPath',
but there is an 'OutputPath' property already in MSBuild project system.

So, Rename 'OutputPath' to 'ProjectExtensionsPath' to better reflect it's intent.

* Refactor 'CreateDotnetToolProject' method & calls in 'DotNetToolTests'

Rename 'source' param to 'packageSources'
Make 'packageSources' param to accept null
Fix template's 'MSBuildProjectExtensionsPath' with explicit Sdk import
Remove redundant parameter labels on 'CreateDotnetToolProject' in 'DotNetToolTests'

* Miscellaneous refactoring and whitespace fixes

cosmetic refactors that are leftover from this patch tree

* Trim trailing whitespaces

Only files in this patch have been trimmed for trailing whitespace
2020-10-03 20:06:51 -07:00
Nikolche Kolev 508808ef8e Use the original TargetFramework string for conditions in nuget.g.* for frameworks with platforms (such as net5.0-windows) (#3603) 2020-08-26 18:33:17 -07:00
Kat Marchán 65abcc61f7 automatic formatting (#3587)
Fixes: https://github.com/NuGet/Client.Engineering/issues/487
2020-08-26 15:08:11 -07:00
Nikolche Kolev 935b1d2f5b Infer the framework using the TargetPlatformMoniker instead of TPI and TPV, GetReferenceNearestTargetFrameworkTask now handles P2P frameworks with platforms, Add a LockFile.GetTarget utility for aliases (#3578) 2020-08-18 11:30:01 -07:00
Nikolche Kolev 280abd3f8a In commandline restore, in multi targeting scenarios, read the target framework details from the inner build (#3548) 2020-08-03 18:36:54 -07:00
Nikolche Kolev a7d6742750 Add Aliases support for PackageReference (#3340) 2020-04-23 12:07:53 -07:00
cmanu 32cbb0ad13 Invalidate lock file(packages.lock.json) if central versions change (#3322)
Fix for issue 9293 https://github.com/NuGet/Home/issues/9293 (Lock file needs to get invalidated if central dependencies change.)
2020-04-13 09:31:48 -07:00
Jeff Kluge 0735174f6a Do not load assets file during no-op restore (#3104) 2019-11-14 15:42:39 -08:00
cmanu ee36836479 Fix for "Locked-mode restore fails with sha512 errors & installs new packages when a project's RuntimeIdentifier is changed" (#2933)
* Fix for issue 8260

* Unit test changes

* Feedback

* Small change to trigger a new test run.

* Fix for issue 8260

* Unit test changes

* Feedback

* Small change to trigger a new test run.

* Add more comments and update Unit Tests.
2019-07-17 15:00:04 -07:00
Nikolche Kolev 0570ea9dc4 MSBuild resolvable path to the assets file in the nuget.g.props (#2805) 2019-04-18 11:56:51 -07:00
Nikolche Kolev bdc2790261 Add support for reading the PackageDownload items (#2694)
* the targets now read the package download items similar to the PackageReference items
2019-03-20 12:03:23 -07:00
Ashish Jain a933f23516 Repeatable build using Project lock file implementation (#2342)
generating/ updating project lock file

consuming project lock file during restore in VS

Validation of package's sha512 and added error messages as appropriate

Test infra for legacy PackageReference func tests

Base workflow is completed

Added telemetry events for project lock file feature
2018-09-11 23:08:56 -07:00
Ashish Jain ad246e6c0d Fix dotnet add package command to commit restore (#2394)
* Fix dotnet add package command to commit restore

Currently dotnet add package runs a preview restore, update project file, but doesn't commit the restore artifacts. So next time, a restore happens, it runs a full restore again and then commit.

This PR fixes it by committing restore as part of add package command.
2018-08-24 09:51:19 -07:00
Rohit Agrawal deab84db30 Use MSBuildProjectExtensionsPath for RestoreOutputPath (#2131)
* Use Array.Empty<string>() instead of new string[0]

* Use MSBuildProjectExtensionsPath for RestoreOutputPath

* Change meaning of IVsProjectRestoreInfo.BaseIntermediatePath rather than add a new property to the interface

* update microsoft.build.runtime package to latest stable

* fix tests
2018-03-30 17:02:51 -07:00
Nikolche Kolev 7b9f4c1088 Avoid writing restoreSettings to assets file, sort project references for noop (#1959)
* sort project references, remove restore settings from the package spec writer

* Add test for project reference sorting

* Add test for package types affecting the writing of the lock file
2018-01-19 11:43:21 -08:00
Nikolche Kolev 947c35db34 Per tfm PackageSpecOperations AddOrUpdate actually updates if the references is already present for that tfm. (#1816) 2017-11-21 12:29:26 -08:00
Nikolche Kolev 93d85237e4 Fix original target framework normalization in XPLAT case (#1775)
Only normalize the original target framework in the non-xplat case, as in the xplat case these frameworks are used in the targets for conditions
2017-10-30 11:30:55 -07:00
Justin Emgarten 1b521c2bb9 Add RestoreAdditionalProjectFallbackFoldersExcludes project property support
Additional sources and fallback folders are added conditionally on TargetFramework, to collect those values the following properties will now be read from the inner build
* RestoreAdditionalProjectSources
* RestoreAdditionalProjectFallbackFolders
* RestoreAdditionalProjectFallbackFoldersExcludes

RestoreAdditionalProjectFallbackFoldersExcludes is a new property added in this change, it will remove values from RestoreAdditionalProjectFallbackFolders.

Fixes https://github.com/NuGet/Home/issues/5596
2017-07-21 17:48:58 -07:00
Nikolche Kolev 967f1586cb Ignore the restore settings for net core projects during no-op (#1491)
Ignore the restore settings for net core projects
2017-06-15 15:08:38 -07:00
Ankit Mishra bfaa227808 Adding Test coverage to Warnings and Errors code paths and improving filtering/logging code (#1484)
* Adds functional tests on NuGet.CommandLine to cover scenarios related to warning properties.
* Improved Console and RestoreSummary logging code to use helper methods.
* Added more filtering in WarningPropertiesCollection to not upgrade Warnings if their NuGetLogCode is Undefined.
* Improved the default NuGetLogCode for RestoreLogMessages which are below LogLevel.Warning to NuGetLogCode.Undefined.
2017-06-12 14:18:24 -07:00
Nikolche Kolev d45d8f989c Fix tests broken by No-Op changes (#1403)
Fix tests
2017-05-24 15:15:11 -07:00
Ankit Mishra 34e1a9b070 Fix add package command to work well with DotnetCliToolsReferences (#1323) 2017-04-19 10:26:33 -07:00
Justin Emgarten 7c5404ba65 Merging test utilities into Test.Utility
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.
2017-03-30 18:03:12 -07:00