You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I don't know why we did this, but it doesn't really make sense:
System.IO.Compression.FileSystem defines the ZipFile class which has convenience methods for ZipArchive that allow using paths instead of Stream. We did this originally for Windows 8 because you couldn't use paths in store apps. Since ZipArchive is defined in System.IO.Compression and is returned from various methods on ZipFile, users will usually get a compilation error:
The type 'ZipArchive' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.IO.Compression, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
it doesn't seem old-style (i.e. non-SDK style) projects add an assembly reference to System.IO.Compression.FileSystem.
Comparing what an old-style .NET Framework 4.7.2 project references it seems there are quite a few inconsistencies:
Assembly
Referenced in old-style
Referenced in SDK-style
Microsoft.CSharp
Yes
No
mscorlib
Yes
Yes
System
Yes
Yes
System.Core
Yes
Yes
System.Data
Yes
Yes
System.Data.DataSetExtensions
Yes
No
System.Drawing
No
Yes
System.IO.Compression.FileSystem
No
Yes
System.Net.Http
Yes
No
System.Numerics
No
Yes
System.Runtime.Serialization
No
Yes
System.Xml
Yes
Yes
System.Xml.Linq
Yes
Yes
At the minimum, we should add System.IO.Compression to make the references consistent but we might also want to add some of the missing ones, most notably System.Net.Http.
The text was updated successfully, but these errors were encountered:
I don't know why we did this, but it doesn't really make sense:
System.IO.Compression.FileSystem
defines theZipFile
class which has convenience methods forZipArchive
that allow using paths instead ofStream
. We did this originally for Windows 8 because you couldn't use paths in store apps. SinceZipArchive
is defined inSystem.IO.Compression
and is returned from various methods onZipFile
, users will usually get a compilation error:Regardless of the comment here:
sdk/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.BeforeCommon.targets
Lines 160 to 161 in 5e9972a
it doesn't seem old-style (i.e. non-SDK style) projects add an assembly reference to
System.IO.Compression.FileSystem
.Comparing what an old-style .NET Framework 4.7.2 project references it seems there are quite a few inconsistencies:
At the minimum, we should add
System.IO.Compression
to make the references consistent but we might also want to add some of the missing ones, most notablySystem.Net.Http
.The text was updated successfully, but these errors were encountered: