nuget-package-restore

Nuget restore in TFS restores packages to different directory

烈酒焚心 提交于 2021-02-09 09:20:50
问题 I placed packages.config and nuget.config to my root folder. When I run nuget restore on my dev machine, packages is restored into root/packages folder as described in nuget.config. However, when I add Nuget Installer build step to my TFS2015 build definition, the packages are restored to ../Nuget/Packages, which is outside my root folder. I have a problem referencing the restored nuget packages in next build steps then. Why nuget restore behaves differently on build server? How to fix it?

Nuget restore in TFS restores packages to different directory

这一生的挚爱 提交于 2021-02-09 09:18:57
问题 I placed packages.config and nuget.config to my root folder. When I run nuget restore on my dev machine, packages is restored into root/packages folder as described in nuget.config. However, when I add Nuget Installer build step to my TFS2015 build definition, the packages are restored to ../Nuget/Packages, which is outside my root folder. I have a problem referencing the restored nuget packages in next build steps then. Why nuget restore behaves differently on build server? How to fix it?

Azure DevOps - conditional package restoration

限于喜欢 提交于 2021-02-08 04:32:12
问题 A solution that is built via Azure DevOps pipeline has some projects that use conditional package references such as: <Choose> <When Condition="'$(Configuration)'=='Debug'"> <ItemGroup> <PackageReference Include="Mock.MyPackage" Version="1.0.0" /> </ItemGroup> </When> <Otherwise> <ItemGroup> <PackageReference Include="MyPackage" Version="1.2.0" /> </ItemGroup> </Otherwise> </Choose> The package source is a private NuGet feed. The dotnet restore task does not respect the conditional package

nuget dll is used by another process

心已入冬 提交于 2021-01-28 08:23:05
问题 I have the error from below and I'm quite out of ideas how to solve it. Tried the following until now: Clean bin/obj/packages/packages cache Remove manually from csproj and packages files the package and add it afterwards..still error Update Visual Studio 2017 Reinstall Visual Studio 2017 Trace which processes are using a file with name that contains Newtonsoft Copy the solution from another laptop where the builds works just fine Yet, after all from above, I still get: Error NuGet Package

How to include pre-release packages with MSBuild restore target

自闭症网瘾萝莉.ら 提交于 2021-01-03 05:34:24
问题 This question is specific to MSBuild 15.1+ (Visual Studio 2017) and to PackageReference , which is the new way Nuget is fully integrated within MSBuild . In my continuous integration script, I've got something like: MSBuild.exe /t:Restore MySolution.sln /p:RestoreConfigFile=NuGet.config One of the csproj file contains: <PackageReference Include="MyPackageA"> <Version>1.2.*</Version> </PackageReference> MyPackageA is an internal package and I would like nuget to resolve the reference to the

Azure Devops - Compatibility problems moving from .NET Core 3.1 to .NET 5 at Nuget Package

孤人 提交于 2020-12-12 09:10:30
问题 I have a .NET Core solution which was running well using .NET Core 3.1 using a Pipeline on Azure Devops. Everything was working fine on the Pipeline. After moving from .NET Core 3.1 to .NET 5.0, I started to have some strange troubles running the pipeline, specifically with Nuget packages. I can build with no problems, but when it starts to pack using Nuget Package, I've got this error: [error] The nuget command failed with exit code(1) NU1202: Package Microsoft.EntityFrameworkCore 5.0.0 is

Vs2017: NuGet packages not restored with MSBuild

纵然是瞬间 提交于 2020-06-25 03:24:54
问题 I build from VS2017 and the packages are downloaded and the projects build. Then I nuke the packages folder. Then I build using MSBuild the projects fail because the packages don't exist, they haven't been restored. I have "download missing packages" on The project files would have been originally created in VS 2013 The build.proj using the MSBuild task to build the solution. <MSBuild Projects ="$(root)\src\MySolution.sln" ContinueOnError ="false" Properties="Configuration=$(Configuration)">