question

HemanthB-9452 avatar image
0 Votes"
HemanthB-9452 asked HemanthB-9452 commented

Can we add Assemblies in .NET 3.1 C#

Hi, I just want to ask that can we add Assemblies in .NET 3.1 C# like I don't see any assemblies in project references in my .NET 3.1 Core framework project. How do I add the assembly? I want to add the System.IO.Compression.FileSystem assembly to my project.

dotnet-csharp
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

DanielZhang-MSFT avatar image
0 Votes"
DanielZhang-MSFT answered HemanthB-9452 commented

Hi HemanthB-9452,
Right-click your project name->Manage NuGet Packages->search for "System.IO.Compression.FileSystem " in Browse page-> Install it.
103685-69.png
Best Regards,
Daniel Zhang


If the response is helpful, please click "Accept Answer" and upvote it.

Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.



69.png (21.4 KiB)
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

vb2ae avatar image
0 Votes"
vb2ae answered HemanthB-9452 commented

There is a System.IO.Compression.FileSystem nuget package that was last updated in 2015. Since that was before .net core was released I doubt you can use it with your project. Plus remember .net core is cross platform and file systems are not the same in windows, linux, and mac

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

DuaneArnold-0443 avatar image
0 Votes"
DuaneArnold-0443 answered

If you are trying to use ZipFile then the article says it can be used in Core 3.1 it shows the versions of what frameworks it can be used in at the bottom of the article.

https://docs.microsoft.com/en-us/dotnet/api/system.io.compression.zipfile?view=net-5.0

I don't know what you are trying to do, but maybe there are other DLL(s) in the namespace of system.io.compression that can be used with Core 3.1, which you can install using Nuget.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.