Skip to content

Port projects from pkgproj to dotnet pack  #53202

Closed
@Anipik

Description

@Anipik

steps to port projects

Steps to start porting projects

  • Remove PkgProj folder
  • set <IsPackable>true</IsPackable> for src proj
  • Move the PackageDescription from the project's Directory.Build.props file into the csproj.
  • Run the pack command

Examine the package

  • use /p:GenerateCompatibilitySuppressionFile=true to generate suppressions file. Examine the suppresions before automatically suppressing them.
  • https://github.com/Anipik/PackagePortTester to validate the new and old packages are same
  • if there are any extra dependencies, see if the dependency is actuall needed. If not, remove it or add a condition so that it doesn't apply to the TargetFramework. If the ProjectReference is to an inbox framework assembly that does not have a package add PrivateAssets="all" to the ProjectReference.
  • if there are missing references for a compatible framework, add the project reference and a comment explaining why.
  • Removing placeholder frameworks is fine. Do not remove placeholder files though (ie Xamarin).
  • For any extra files compaterror, analyserfiles you will have to hook up to the new pack command (support added for analyzers, & compat errors)
  • Add git diffs to the pr for reviewers.

eg
#55134
#54250

Following is the list of packages that need to be ported to dotnet pack task

cc @ericstj @ViktorHofer @safern

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions