52 Commits
Author SHA1 Message Date
martin 7af7edc9d1 Add analyzer section in project.assets.json file (#7464) 2026-07-17 13:23:19 -07:00
Nikolche Kolev fbcb61756a Full restore support for aliasing - make the assets file aliasing aware (#6972) 2026-01-30 13:46:26 -08:00
Andy Zivkovic ba112de7ee Make nullable enabled by default across entire repo (#6960) 2025-11-20 21:13:26 +10:30
Nikolche Kolev a979750a71 Migrate tests that are using the dependencies element (#6823) 2025-10-02 11:40:55 -07:00
Nikolche Kolev a6d58e1ffd Add alias to LockFileTarget and IRestoreTargetGraph, pivot based on alias in restore (#6805) 2025-10-02 11:40:39 -07:00
Simon Cropp 579b09a035 Avoid the perf hit of using linq .Count() (#6716) 2025-09-30 15:56:57 -07:00
Andy Zivkovic 795d8b1bee Convert DGSpec reading to System.Text.Json (#6558) 2025-07-16 11:38:53 +09:30
Todd Grunke efb90a1b75 Make LockFileLibrary immutable for performance and sanity reasons (#6519) 2025-06-30 13:11:07 -07:00
Andy Zivkovic 5f147a3119 Revert "Convert DGSpec reading to System.Text.Json (#6405)" (#6416)
This reverts commit fe9d212246.
2025-04-29 09:03:13 +09:30
Andy Zivkovic fe9d212246 Convert DGSpec reading to System.Text.Json (#6405)
Also delete all the read assets file Newtonsoft.Json code
2025-04-26 09:20:26 +09:30
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
Nigusu Solomon Yenework ecdbb79984 Add SDKAnalysisLevel and UsingMicrosoftNETSdk to packageSpec (#5833)
Add SDKAnalysisLevel and UsingMicrosoftNETSdk to  packageSpec (#5833)
2024-07-12 10:24:12 -07:00
Todd Grunke 12ff52f461 Reduce memory allocations during solution load in VS (#5857) 2024-06-24 14:00:17 -07:00
Jonatan Gonzalez 0e3adb1200 Use LogError instead of LogInformation when an error occurs while parsing project.assets.json file using STJ (#5637) 2024-02-20 15:36:45 -08:00
Jonatan Gonzalez ef5bce3282 Parse the assets file with System.Text.Json (#5627)
Crated a new struct to parse the assets file using System.Text.Json instead of Newtonsoft. It will read the file without loading it completely in memory, reducing memory allocations. 

PRs associated with this:
* Create class for reading Json files in chunks (#5530)
* System.Text.Json Migration - Adding code to parse the PackageSpec using STJ (#5541)
* System.Text.Json Migration - Adding code to parse the Project.Assets.Json file using STJ.  (#5558)
* Create class for reading Json files in chunks (#5530)
2024-02-12 11:04:31 -08:00
Erick Yondon 64c6f9ddbd Fix file formattings (#4922) 2022-11-11 12:58:12 -08:00
mjolka ea3119d43d Use JsonTextWriter in LockFileFormat (#4683) 2022-06-20 14:19:54 -07:00
Martin Ruiz 2b410b1179 Fix comparison for floating versions in transitive lock files (#4445) 2022-05-10 10:42:35 -07:00
Jeff Kluge 71424bcf70 Add ability to override centrally defined package version (#4426) 2022-02-28 15:02:11 -08:00
Nikolche Kolev 63b8dbad93 Obsolete unused types, LibraryDependencyType and related (#4145) 2021-07-16 11:47:54 -07:00
cmanu 1b0b4c05fe Reduce the information written to centralTransitiveDependencyGroups (#3670)
Reduce the information written to centralTransitiveDependencyGroups
2020-09-28 12:37:08 -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
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 821951fae6 Add the transitive dependencies enforced by the Central Package Versions to the nuspec. (#3313)
Include transitive dependencies to the nuspec.
2020-04-13 09:26:05 -07:00
Nikolche Kolev f6e732f928 FrameworkReference support in pack & restore (#2745) 2019-03-27 21:44:39 -07:00
Ashish Jain 08919001ee Embed interop type for PackageReference (#2532)
* [wip] supporting embedInteropType with PackageReference

* Updated existing BuildOutputTargetFolder to accept multiple values

* Updated the BuildOutputFolder variable name to plural form

* Added tests

* Added Pack integration test
2018-12-18 14:08:47 -08: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 b82a7274e5 Dotnet Tool impementation (#1900)
We introduce a new package type for dotnet tools, with compatible asset as "tools/tfm/rid/any.extension.

That package is only compatible with a special project type that the CLI will create, DotnetToolReference.
1 package per project, that package has to be a dotnettool.
DotnetTooReference works almost exactly the same way as Package Reference with the above restrictions in place.
Notable: Tool Restore does not generate Msbuild props and targets, for failures
No no-op artifacts for tool restore.
2018-01-18 12:52:07 -08:00
Nikolche Kolev 3b388e6eed Normalize the assets file/ no-op hash dg writing (#1659)
- Writing out of shortNames for tfms, specifically change the original target frameworks logic.
- Sorting dependencies when writing them out.
- Using normalized strings of the versions for the dependencies.
2017-09-13 16:10:36 -07:00
Nikolche Kolev a17f2c0288 address feedback 2017-06-13 14:18:11 -07:00
Nikolche Kolev 0f8e9f00cb rework saferead method 2017-06-12 23:45:19 -07:00
Nikolche Kolev d3bdaef7b8 merge dev 2017-06-11 15:07:51 -07:00
Nikolche Kolev cb9b699b3f add a simple test 2017-06-09 11:57:22 -07:00
Ankit Mishra fb4bbc8ff2 Improving default values for Log messages to match msbuild task logging helper (#1472)
* Changing default line and column number values to 0 to match msbuild TaskLoggingHelper
2017-06-08 14:09:09 -07:00
Ankit Mishra ec809e6a1b Fixing warning level read/write logic (#1394) 2017-05-22 15:54:33 -07:00
Ankit Mishra e89746f91c Adding logic to read project path as filepath and skip writing filepath if same as project path (#1393) 2017-05-22 11:06:12 -07:00
Ankit Mishra fcc97a7ae0 Adding tests around LockFileFormat Read and Write with LogMessages and updating LockFile Version to 3 (#1359) 2017-05-11 11:44:14 -07:00
Ankit Mishra 67b14d1221 Plumbing Collector logger into restore and adding APIs for assets file read/write (#1343) 2017-05-11 11:44:12 -07:00
Justin Emgarten d56985eedd RestoreProjectType property support in MSBuild
Adding a public property that can be set externally for the project style.
Renaming OutputType to ProjectStyle

Renaming OutputType values. UAP -> ProjectJson, NETCore -> PackageReference

Fixes https://github.com/NuGet/Home/issues/4047
Fixes https://github.com/NuGet/Home/issues/4046
Fixes https://github.com/NuGet/Home/issues/3504
2016-12-19 18:42:20 -08:00
Joel Verhagen 096826ad99 Remove tools from project.json (PackageSpec model) (#1030)
DotnetCliToolReference packages get their own PackageSpec instead of filling the "tools" property
Fix https://github.com/NuGet/Home/issues/3986
2016-11-21 15:52:15 -08:00
Joel Verhagen 1a6d41b8d7 Include input PackageSpec in assets (lock) file under property "project" (#1025) 2016-11-21 11:19:47 -08:00
Justin Emgarten 097349c2fd Remove locked property from project.lock.json 2016-06-20 12:36:29 -07:00
Pavel Krymets 7c42586ff8 Merge ProjectModel with CLI project model 2016-03-23 09:25:09 -07:00
Joel Verhagen 059e4e94f0 Read the existing lock file for the tool
Don't rewrite the same tool lock file (just like existing project lock file logic)
Do not observe the "locked" property in tool restore
2016-03-22 15:53:49 -07:00
Justin Emgarten 53a3b646cb WriteBasicLockFile test fix
test fixed

more path issue fixed

Remove OPC files from the lock file

more path fixed

RestoreCommand_LeftOverNupkg_Overwritten casing fix for linux

Unit test fixes for sorting and lock file overwrites

machine wide base path fix
2016-01-08 17:00:55 -08:00
Justin Emgarten 829427135f LockFileFormat v1 fallback support based on p2p references
DTE unique name path fix

Temp path fix for linux

remove tmp export and mono

run all projects on coreclr
2016-01-08 17:00:55 -08:00
Justin Emgarten 2a2581c56d Adding support for v1 lock file writing
Syncing build script

Lock file verification version fixes
2016-01-08 17:00:55 -08:00
Justin Emgarten e75c44920c Adding p2p references to project.lock.json 2016-01-08 17:00:55 -08:00