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

After "spot-deleting" files from NuGet package installation, NuGet puts them back. #352

Closed
DanVioletSagmiller opened this issue Nov 2, 2020 · 2 comments

Comments

@DanVioletSagmiller
Copy link

DanVioletSagmiller commented Nov 2, 2020

Description

NuGet for Unity automatically updates the package if something is missing. Many packages made for VS include multiple language versions of DLL's. DLL's that possess the same name, but are found in different sub folders. Since Unity is unable to handle this, it breaks the projects. However, After deleting the offending duplicate files, the program works. But at certain events, like reloading, NuGet adds the deleted content back. My current solution requires uninstalling NuGet, and later re-installing when I want to check for updates.

Recommendations

  • Instead of automatically updating, post a warning or error
  • Provide a check box in the NuGet Management panel for "Automatic Update" that is checked by default, that gives the current behavior. Unchecking it would either post warnings about things being out of date, or that it would do nothing at all.

Details

  • NuGet Package: Microsoft.CodeAnalysis.CSharp
  • NuGetForUnity Version: 2.0.1
  • Unity Version: 2019.4.13f1
  • Operating System: Windows 10, X64, Latest
@DanVioletSagmiller DanVioletSagmiller changed the title As a User, I want to turn off NuGet for Unity's automatic update feature. After "spot-deleting" files from NuGet package installation, NuGet puts them back. Nov 2, 2020
@jwittner
Copy link
Collaborator

jwittner commented Jan 5, 2021

Are you ignoring Assets/Packages from source control? If not then you should be able to add the nupkg and nuspec to source and NugetForUnity shouldn't update the folder as it will consider it "installed" already. If you have, then you could explicitly remove this package from your ignore and then commit what you need to retain the folder.

If you can give me some more details on the exact package shape, and what you're deleting then I might be able to help you further. NugetForUnity detects what target frameworks are viable and keeps which ones to use based on the current Unity settings and tries to be smart. It doesn't have support for 'runtimes' yet, but that's something we'd love to have. Again, with some more details on the structure you have vs. what you want I think we might find a way to get NugetForUnity working for you without any of the work arounds I mentioned above.

@JoC0de
Copy link
Collaborator

JoC0de commented Apr 8, 2023

Fixed in #503 and #393

@JoC0de JoC0de closed this as completed Apr 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants