Skip to content

Efficient package management

apobekiaris edited this page Apr 28, 2019 · 1 revision

Working with a universe of nuget packages can be counter productive if you are not best friends with Powershell, which is actually C# in a forgivable/scripting flavor.

In this page we will list a few basic tips to make your life easier. If you have questions/suggestions for this list please open an issue and will update the list.

Requirements

We have created the XpandPosh powershell module which the contains functions used in this page. So, it is required to install it once. Open any Powershell session as Admin and type:

Install-Module XpandPosh -Force

After this all XpandPosh functions are available in any Powershell session included the VS Package Manager Console.

FAQ

  1. How to list all eXpandFramework packages?
    Find-XpandPackage *Xpand*
    Name                                    Version
    ----                                    -------
    eXpandAdditionalViewControlsProvider    18.2.704
    eXpandAdditionalViewControlsProviderWeb 18.2.704
    ...
    Xpand.VersionConverter                  1.0.16
    Xpand.XAF.Modules.AutoCommit            0.0.16
    Xpand.XAF.Modules.CloneMemberValue      1.2.15
    ...
    
  2. How to list e.g. Model related packages
    Find-XpandPackage *model*
    Name                                   Version
    ----                                   -------
    eXpandModelArtifactState               18.2.704
    eXpandModelDifference                  18.2.704
    eXpandModelDifferenceWeb               18.2.704
    eXpandModelDifferenceWin               18.2.704
    Xpand.XAF.Modules.CloneModelView       0.0.4
    Xpand.XAF.Modules.ModelViewInheritance 1.1.12
    
  3. How to install all standalone modules in my XAF module? Open VS package manager console and type:
    Find-XpandPackage Xpand*|Install-Package
  4. How to uninstall all standalone modules?
    Uninstall-ProjectAllPackages Xpand*
  5. How to update project packages and all their dependencies?
    Get-project MyXAFProject.Module|Update-ProjectPackage -Filter Xpand*
  6. My solution contains many modules but targets .NET 4.5.2 and want to upgrade to 4.6.1 to install all standalone modules that target it. Is there a fast way to do it?
    Update-ProjectTargetFramework
You can’t perform that action at this time.