Kirsten
Kirsten

Reputation: 18160

Nuget command to replace existing references with nuget references?

In VS2017 I created a new Winforms project using the XAF Solutions Wizard ( Entity Framework Code - First)

The wizard adds references according to options I select.

Now I want to change all the packages to use my Nuget Feed for the Dev Express References.

XAF does have Nuget packages

Is there a Nuget command that I can use to do this automatically?

Cross posted to Dev Express

Upvotes: 1

Views: 473

Answers (1)

Apostolis Bekiaris
Apostolis Bekiaris

Reputation: 2285

There is no way to do this with Nugets unless you script your way out as we are doing in XAF community project expandFramework. For some cases it won't work, however for a similar case here is what we do.

  1. Parse all your projects for References start with DevExpress and construct a list of assemblies
  2. For all assemblies in the list add them to packages.config
  3. For all assemblies use the DevExpress.PackageContent project to link to the containing the packages.
Get-DxNugets 18.2.6
  1. Install the found packages from step 3
`Nuget  Install packageName -OutputFolder $commonOutputFolder
  1. Update the DevExpress references HintPath to the packages installation folder.
Update-HintPath -OutputPath "$packageInstallationfolder" -SourcesPath $rootPath -filter "DevExpress*"

all powershell functions come from the XpandPosh project. There are many helpful methods there unfortunately no docs. But you can get support

Upvotes: 1

Related Questions