It is possible to use PackageReference with other project types, but you have to know to turn this on from the beginning. See NuGet pack and restore as MSBuild targets- restore target. nuget restore and dotnet restore both use this command for applicable projects. Msbuild /t:restore Nuget 4.x+ and MSBuild 15.1+ with package references in project files only. Supposedly NuGet.exe 4+ supports this out of the box, but I was unable to make this work ( NuGet Package Restore): NuGet Restore is built into MSBuild 15 ( msbuild /t:restore) to support the new PackageReference case. Issue #1: Restoring packages.json + PackageReference I’ve outlined the issues I ran into and the individual Build Steps I used to workaround them. The software versions I am working with are: (the last couple years also saw the ill-fated project.json, which isn’t represented here and may or may not be covered by one of these methods) Solution packages (great for tooling) are (still) not supported after VS 2013 ( NuGet #522).Other C# Projects still use the packages.json method for packages.ASP.Net Core uses the new PackageReference for packages instead of packages.json.Hopefully this will help someone else along the way. I have an ASP.Net Core project (.Net Framework) with several class libraries and had to work through a number of problems to get NuGet Restore working on a TeamCity CI server. ASP.Net Projects and NuGet have been a moving target the last couple years.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |