LazyStack

ProjectOptions Directive

PackageReferences

Add or override package references using the PackageReferences directive. Package references look like this:


ProjectOptions:    
  LambdaProjects:
    PackageReferences:
      AWSSDK.Extensions.NETCore.Setup: '3.3.100.1'
      Amazon.Lambda.AspNetCoreServer: ''

PackageReferences may be applied to a project type, as in the LambdaProjects example above, or be applied to specific projects.

When the PackageReference version number is supplied then that version will be used. If the PackageReference version number is an empty value, then the version number will be looked up in the NugetPackageVersions.

Ignore Option

Sometimes you want to use a ProjectReference instead of a default PackageReference. For example, in the ProjectOptions.ClientSDKProjects.PackageReferences above the LazyStackAuth package is referenced by default. If you want use the LazyStackAuth project instead you will need to defeat the inclusion of the LazyStackAuth default. This is accomplished by specifying a value of 'ignore for that package as shown below":


ProjectOptions:
  NugetPackageVersions:
    System.ComponentModel.Annotations: '5.0.0'
    JsonSubTypes: '1.8.0'
    Newtonsoft.Json: '12.0.3'
    AWSSDK.Extensions.NETCore.Setup: '3.3.101'
    Amazon.Lambda.AspNetCoreServer: '5.2.0'
    Swashbuckle.AspNetCore: '5.6.2'    
    LazyStackAuth: '1.0.0'
  ClientSDKProjects:
    PackageReferences:
      LazyStackAuth: 'ignore'
      System.ComponentModel.Annotations: ''
      JsonSubTypes: ''
      Newtonsoft.Json: ''
    ProjectReferences:
    - ..\..\LazyStack\LazyStackAuth\LazyStackAuth.csproj

Note: You can't just delete the LazyStackAuth package reference because it is automatically added during LazyStack project processing.

Project Types

Project types supporting PackageReferences include:

  • SchemaProjects
  • ControllerProjects
  • LambdaProjects
  • ClientSDKProjects
  • WebApiProjects