I need to use the System.IO.Package namespace but keep getting complaints from Unity3D

I am attempting to use the System.IO.Package namespace in my project (there’s a good reason for needing it, but I’m not allowed to explain the details about it here). I’ve added a .Net reference to WindowsBase.dll (C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.5\\WindowsBase.dll). The only thing I added to the default stubbed code is a using statement for System.IO.Packaging:

using System.IO.Packaging;

So, after adding the WindowsBase.dll assembly reference, MonoDevelop builds fine - no errors. But upon returning to the Unity3D window, Unity continues to report a build error:

error CS0234: The type or namespace name `Packaging' does not exist
in the namespace System.IO Are you missing an assembly reference?

I am quite new at all this, and have Googled this to no end and reached no joy. I need some help from someone to understand if it is at all possible to use the System.IO.Package namespace, or if someone has an idea for a workaround. My end goal is to use Open Packaging Conventions to handle OPC packages of specialized, custom data.

Anyone have any thoughts or ideas about how to leverage/use OPC in a Unity project?

Any help would be appreciated! Thx.

Warmest Regards,
Scott

Solution is here: Using .NET 4.x in Unity | Microsoft Learn

Set .NET to 4 and add a csc.rps file to Assets and specify WindowsBase.dll in there using: -r:WindowsBase.dll

EditProject SettingsPlayerOther Settings → change .Net 2.0 Subset to .Net 2.0

Unity runs on the .Net 2.0 framework and the namespace you want runs on 3.0 and higher. You can’t import it - it’s not possible.

You’ll have to find a third party .Net 2.0 compatible library instead.

If you are just unzipping some basic .zip formats, you can use this namespace:
System.IO.Compression.GZipStream

But if they get complex, it’ll fail. In that event, you’ll have to find a third party solution.