Skip to content

Instantly share code, notes, and snippets.

@agtcooke
Created October 25, 2018 12:43
Show Gist options
  • Save agtcooke/5ab6ba2480d576a50dd0b964fa76ae7e to your computer and use it in GitHub Desktop.
Save agtcooke/5ab6ba2480d576a50dd0b964fa76ae7e to your computer and use it in GitHub Desktop.
Migrate Projects to `PackageReference`

Use PackageReferences over packages.config.

  1. Automatically convert the project to PackageReferece
  2. Remove unused dependencies for the project (I think I have an extension installed)
  3. Add the following to the project file:
   <PropertyGroup>
      <SkipValidatePackageReferences>true</SkipValidatePackageReferences>
      <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
      <GenerateBindingRedirectsOutputType>true</GenerateBindingRedirectsOutputType>
      <RestoreProjectStyle>PackageReference</RestoreProjectStyle>
   </PropertyGroup>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment