GlitchEnzo / NuGetForUnity

A NuGet Package Manager for Unity

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unable to debug on M2 Max Mac.

JakeManfre opened this issue · comments

Description

When trying to attach my debugger to my Unity instance, I get three of the same error The name 'ZipFile' does not exist in the current context in the file NuspecFile.cs. This is preventing me from debugging my code as the debugger never successfully attaches.

  • NuGetForUnity Version: 3.1.0
  • Unity Version: 2023.1.0b19
  • Operating System: Ventura 13.3
commented

Hi @JakeManfre
A college had a similar issue since we updated to Unity 2023.1.1. ZipFile is in a dll that is not "imported by default" in unity. So NuGetForUnity has a configuration file https://github.com/GlitchEnzo/NuGetForUnity/blob/master/src/NuGetForUnity/Editor/csc.rsp which tells Unity to import the DLL's. Unity somehow doesn't include them into the .csproj file it generates. The easiest workaround I know is disabling the generation of the NuGetForUnity.Editor.csproj. This can be done by unchecking the type of package, you installed the package as, in 'Prefferences' -> 'External Tools'.
image
Eventually the issue can also be solved by switching the Editor Assemblies Compatibility Level to .NET Standard 2.1 (located under 'Project Settings' -> 'Player'.
image

Unchecking the generate .csproj files for Git packages resolved my issues. I already have my project set for .NET Standard 2.1.

Thanks for clearing that up and the workaround!