The type name 'ZipArchive' could not be found in the namespace 'System.IO.Compression'. This type has been forwarded to assembly 'System.IO.Compression, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' Consider adding a reference to that assembly.
I did add them in Visual Studio, but I don’t know how to add them in Unity. I restarted the Unity in hopes that it could solve it, but it didn’t.
The only think I could find was:
But that’s about Unity’s own namespace, but the one I want to add comes from System namespace. I add this reference to Visual Studio and it doesn’t report the error anymore, but Unity does. Is there a way to have Unity include all the references needed?
I’ve found out solution to thing I don’t comprehend. If you have such issue happened to you, I’ve found couple solutions for couple different causes.
In Visual Studio (I don’t know about others) you need to add reference to whatever namespace you need. To do that in VS go Project > Add Reference, then select the namespaces you need and apply.
If Unity won’t react to the change, and you close Visual Studio and start it again, and it drops the reference:
See in Unity, in Edit > Project Settings > Other Settings > Configuration > API compatibility and choose another version, and see if that fixes your problem.
To forcibly add namespace to your project you can create an empty file called csc.rsp, put it in the Assets folder and write following in it: