PintaProject / Pinta

Simple GTK# Paint Program
http://www.pinta-project.com/
MIT License
1.87k stars 277 forks source link

[Question] Delete old projects to restore #1074

Closed zwillikon closed 1 month ago

zwillikon commented 1 month ago

When I build Pinta /usr/bin/dotnet publish Pinta.sln --configuration Release -p:BuildTranslations=true -maxcpucount:1 --self-contained false -p:PublishDir=./pinta/src/Pinta/publish

my .NET SDK wants to restore an old private project of mine:

  Determining projects to restore...
.Pinta/installer/addins/Pinta.AddinUtils.csproj : error NU1301: The local source '[old_private_project]/csharp' doesn't exist. [./pinta/src/Pinta/Pinta.sln]

This is obviously out of your domain – I would be nevertheless glad for an answer. How do I direct dotnet to give up on and delete those old builds?

cameronwhite commented 1 month ago

There is probably some nuget configuration somewhere that's referring to those old folders - I assume at some point they were added as extra package sources

You could look for a nuget.config file under the ~/.nuget folder and see if you can edit out those old references. Or, dotnet new nugetconfig would generate you a fresh default configuration file

zwillikon commented 1 month ago

I've never used nuget.

https://github.com/OSGeo/gdal/tree/master/swig/csharp is the perpetrator – dotnet new nugetconfig didn't reset that.

cameronwhite commented 1 month ago

I'm not really sure what else to suggest, other than just wiping your ~/.nuget folder entirely?

It looks like dotnet new nugetconfig just generates a new nuget.config file in your current directory, so you'd have to move that to replace the one under your ~/.nuget folder

zwillikon commented 1 month ago

@cameronwhite I don't have nuget (or pip, conda, conan, ...) installed.

I'm sorry for my ignorance: .NET always includes some NuGet e.g. at /usr/share/dotnet/sdk/8.0.108/NuGet.Configuration.dll

cameronwhite commented 1 month ago

Sorry yeah, I should have clarified that dotnet is using nuget internally for packages