Share via

Could not locate packages.config

Wally96333 71 Reputation points
2023-10-08T05:27:05.4166667+00:00

To solve a previous problem, I performed a package migration from package.config to PackageReference. I have a new problem. I get the following error when I build:

Could not locate C:\Solution_01\packages.config. Ensure that this project has Microsoft.Bcl.Build installed and packages.config is located next to the project file

When I did the package migration, I got the following:


Package compatibility issues

Description

BouncyCastle v1.8.2

The assembly 'lib\lib\BouncyCastle.Crypto.dll' will be ignored when the package is installed after the migration.

Microsoft.WindowsAPICodePack-Core v1.1.0

The assembly 'lib\lib\Microsoft.WindowsAPICodePack.dll' will be ignored when the package is installed after the migration.

Microsoft.WindowsAPICodePack-Shell v1.1.0

The assembly 'lib\lib\Microsoft.WindowsAPICodePack.Shell.dll' will be ignored when the package is installed after the migration.

The assembly 'lib\lib\Microsoft.WindowsAPICodePack.ShellExtensions.dll' will be ignored when the package is installed after the migration.

MSBuild.ILMerge.Task v1.1.3

'content' assets will not be available when the package is installed after the migration.

NLog.Config v4.2.3

install.ps1 script will be ignored when the package is installed after the migration.

'content' assets will not be available when the package is installed after the migration.

NLog.Schema v4.0.0

'content' assets will not be available when the package is installed after the migration.

Windows7APICodePack-Core v1.1.0

The assembly 'lib\lib\Microsoft.WindowsAPICodePack.dll' will be ignored when the package is installed after the migration.

Windows7APICodePack-Shell v1.1.0

The assembly 'lib\lib\Microsoft.WindowsAPICodePack.Shell.dll' will be ignored when the package is installed after the migration.

WindowsAPICodePack-Core v1.1.2

The assembly 'lib\lib\Microsoft.WindowsAPICodePack.dll' will be ignored when the package is installed after the migration.

WindowsAPICodePack-Shell v1.1.1

The assembly 'lib\lib\Microsoft.WindowsAPICodePack.Shell.dll' will be ignored when the package is installed after the migration.

WindowsAPICodePack-ShellExtensions v1.1.1

The assembly 'lib\lib\Microsoft.WindowsAPICodePack.ShellExtensions.dll' will be ignored when the package is installed after the migration.


This is a WPF project on Windows 10 with VS 2017 Community.

Do I need to reverse the migration?

If so, is there an easy way to do that?

Any help with this would be appreciated.

Thanks.

Developer technologies | .NET | Other
Developer technologies | Visual Studio | Other
Developer technologies | Visual Studio | Other

A family of Microsoft suites of integrated development tools for building applications for Windows, the web, mobile devices and many other platforms. Miscellaneous topics that do not fit into specific categories.


1 answer

Sort by: Most helpful
  1. Anna Xiu-MSFT 31,191 Reputation points Microsoft External Staff
    2023-10-09T07:29:12.8233333+00:00

    Hi @Wally96333

    Welcome to Microsoft Q&A! 

    I am afraid that you need to roll back to packages.config. 

    There are some limitations for PackageReference. Some packages may not be fully compatible with PackageReference. For more information, please view: package compatibility issues

    You can refer to the document to roll back to packages.config. 

    Sincerely,

    Anna


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment". 
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

     

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.