Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why does my project.assets.json file have packages that are not even used in the project #12266

Closed
dgxhubbard opened this issue Nov 22, 2022 · 2 comments
Labels

Comments

@dgxhubbard
Copy link

dgxhubbard commented Nov 22, 2022

NuGet Product Used

dotnet.exe

Product Version

7.0.100

Worked before?

none

Impact

It bothers me. A fix would be nice

Repro Steps & Context

I have a project file which is attached. The project file lists the nuget packages that are used.
When project.assets.json is generated there are references to Azure.Core, Azure.Identity, Telerik.Reporting and System.Data.SqlClient. None of these things are used in this project. I have tried tracking this down but cannot find why they are included in project.assets.json. The System.Data.SqlCl.ient is a problem because we are using Microsoft.Identity.Client and it uses Microsoft.Data.SqlClient, which cannot have System.Data.SqlClient in the same directory
Foo.zip.

I am running "dotnet restore" from the command line to generate project.assets.json.

Verbose Logs

No response

@dgxhubbard
Copy link
Author

From Microsoft.Data.SqlClient:

Release notes for Microsoft.Data.SqlClient 5.0
Breaking changes in 5.0
Dropped support for .NET Framework 4.6.1 #1574
Added a dependency on the Microsoft.SqlServer.Server package. This new dependency may cause namespace conflicts if your application references that namespace and still has package references (direct or indirect) to System.Data.SqlClient from .NET Core.

@dgxhubbard
Copy link
Author

I found out where Sql.Data.SqlClient is coming from. It was not included in Foo.csproj, and Azure.Identity and Azure.Core come from Microsoft.Data.SqlClient.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants