dotnet / upgrade-assistant

A tool to assist developers in upgrading .NET Framework applications to .NET 6 and beyond
MIT License
1.1k stars 161 forks source link

How to use a packagemap.json in my project? #1570

Closed claudeHasler closed 1 month ago

claudeHasler commented 2 months ago

I'm trying to automate the upgrade of a very large application with many .csproj using the upgrade-assistant CLI. I'd like to force certain packages in those .csproj to be updated to certain versions.

The packagemap.json feature seems to support this functionality, But I can't figure out where this file must be placed to be picked up by the cli.

I am running a command like this:

upgrade-assistant upgrade `
            SomeProj/.csproj `
            --non-interactive `
            --operation Inplace `
            --targetFramework net8.0

But my custom defined packagemap.json file is never respected

Where do the packagemap files go? Is this documented anywhere? Is this even how these files are intended to be used?

mgoertz-msft commented 1 month ago

Take a look at this blog post for how to test package map changes locally: https://devblogs.microsoft.com/dotnet/announcing-api-map-support-for-ua/

DianaSoltani commented 1 month ago

Guidance has been provided.