Runtime: UWP 5.2 meta-package doesn't include clrcompression

Created on 29 Jun 2016  路  20Comments  路  Source: dotnet/runtime

clrcompression.dll is missing from the output when updating to 5.2 UWP meta-package.

Looking at the dependencies in the System.IO.Compression nuspec:

      <group targetFramework=".NETCore5.0">
        <dependency id="System.IO" version="4.1.0" />
        <dependency id="System.Runtime" version="4.1.0" />
        <dependency id="System.Text.Encoding" version="4.0.11" />
        <dependency id="System.Threading.Tasks" version="4.0.11" />
      </group>
      <group targetFramework=".NETStandard1.1">
        <dependency id="System.IO" version="4.1.0" />
        <dependency id="System.Runtime" version="4.1.0" />
        <dependency id="System.Text.Encoding" version="4.0.11" />
      </group>
      <group targetFramework=".NETStandard1.3">
        <dependency id="Microsoft.NETCore.Platforms" version="1.0.1" />
        <dependency id="runtime.native.System" version="4.0.0" exclude="Compile" />
        <dependency id="runtime.native.System.IO.Compression" version="4.1.0" exclude="Compile" />
        <dependency id="System.Collections" version="4.0.11" exclude="Compile" />
        <dependency id="System.Diagnostics.Debug" version="4.0.11" exclude="Compile" />
        <dependency id="System.IO" version="4.1.0" />
        <dependency id="System.Resources.ResourceManager" version="4.0.1" exclude="Compile" />
        <dependency id="System.Runtime" version="4.1.0" />
        <dependency id="System.Runtime.Extensions" version="4.1.0" exclude="Compile" />
        <dependency id="System.Runtime.Handles" version="4.0.1" exclude="Compile" />
        <dependency id="System.Runtime.InteropServices" version="4.1.0" exclude="Compile" />
        <dependency id="System.Text.Encoding" version="4.0.11" />
        <dependency id="System.Threading" version="4.0.11" exclude="Compile" />
        <dependency id="System.Threading.Tasks" version="4.0.11" />
      </group>

looks like the netcore50 section is missing a dependency on "runtime.native.System.IO.Compression" and perhaps others when comparing it to netstandard1.3 which is the actual library asset we end up with for netcore50. There isn't a netcore50 specific asset for this library but there is a netcore50 ref assembly. @ericstj I think this might be a result of automatically adding a ref for netcore50 to help ensure we pick-up the correct references for lower netcore versions.

packaging

Most helpful comment

agree with the version 5.2.2 but even so I shows this error.alguna solution? Add the reference "runtime.native.System.IO.Compression": "4.1.0" in project.json but even so not works

captura

All 20 comments

As a temporary workaround someone can add the following under dependencies in project.json:

    "runtime.native.System.IO.Compression": "4.1.0"

This is happening because all the implementation dependencies are missing. We create a netcore50 group because the reference assembly needs to be promoted to obscure the win8 ref placeholder but this isn't needed for the implement assembly since that is runtime-specific and preferred over the win8 lib placeholder. It looks like this issue has existed since the x-plat work was done.

As a temporary workaround someone can add the following under dependencies in project.json

Thanks! I just updated the UWP NuGet package to 5.2.0 in my project and the ZipArchive class began throwing DllNotFoundException with clrcompression.dll for Debug builds (.NET Native builds kept working fine). This workaround fixed it for Debug.

Microsoft.NETCore.UniversalWindowsPlatform 5.2 broke my UWP projects.
Reverting fixes the issue with clrcompression.

I'm not using native toolchain / NetCore.

  • Xamarin.Forms 2.3.1.11
  • Microsoft.AspNet.SignalR.Client 2.2.1
  • Microsoft.Azure.Mobile.Client 2.1.1.
  • SQLite.Net.Core-PCL 3.1.1
  • SQLitePCL 3.8.7.2
  • Unity 4.0.1
  • WindowsAzure.Storage 4.4.1-preview

@tomcrusader 5.2.2 package should fix the issue as well.

agree with the version 5.2.2 but even so I shows this error.alguna solution? Add the reference "runtime.native.System.IO.Compression": "4.1.0" in project.json but even so not works

captura

Hello There!
I faced with this issue when I tried to use System.IO.Compression.ZipArchive class.

  • Visual Studio 2015
  • target Windows 10 Anniversary Edition (10.0; Build 14393)

And as here was described, this problem appears only with ARM version of the app, and only when I trying to use shared libraries ("Compile with .NET Native toolchain" is UNchecked).

----- PROJECT.JSON -----------
{
"dependencies": {
"Microsoft.EntityFrameworkCore.Sqlite": "1.1.1",
"Microsoft.EntityFrameworkCore.Tools": "1.1.0",
"Microsoft.NETCore.UniversalWindowsPlatform": "5.2.3",
"Microsoft.Xaml.Behaviors.Uwp.Managed": "2.0.0",
"MvvmLight": "5.3.0"
},
"frameworks": {
"uap10.0": {}
},
"runtimes": {
"win10-arm": {},
"win10-arm-aot": {},
"win10-x86": {},
"win10-x86-aot": {},
"win10-x64": {},
"win10-x64-aot": {}
}

}

2017-04-17 1
2017-04-17 2

Is there any thoughts how to fix this without compiling with native tool chain? Thanks!

Please share your project.lock.json file if you'd like us to identify the problem. Typically this would happen if you've somehow downgraded one of the packages that makes up UWP so that you're bringing in an older version of one of our packages.

The workaround is to directly reference the runtime-specific package, in project.json:

  "dependencies": {
    "runtime.win8-arm.runtime.native.System.IO.Compression":  "4.0.1"

/cc @ianhays @MattWhilden

Looking at your lock file I see that both the win10-arm and win10-arm-aot targets have a clrcompression.dll provided, so this does not appear to be an issue with the packages. @MattWhilden @ianhays are you aware of any issues in the toolchain/targets that @andrey-denisenko may be hitting?

I guess we'll start with the foolish sounding questions, does clrcompresison.dll end up in the bin directory? (aka \bin\ARM[Release|Debug]\clrcompression.dll)

I can take a closer look tomorrow but it's not something I've seen before.

Yes, clrcompression.dll exists my bin directory.
It even included into .APPX file (when I generate it)
image

I hope this might be useful to someone, who is facing a new compile error with the latest version of UWP libraries in release mode.

If you have added this line in your project.json to fix the above issue previously then time has come to remove it as this is now giving another compilation error.
"runtime.win8-arm.runtime.native.System.IO.Compression": "4.0.1"

New error due to above line.

error APPX1101: ...nuget\packages\runtime.win10-arm-aot.runtime.native.System.IO.Compression\4.0.1\runtimes\win10-arm-aot\lib\netcore50\clrcompression.dll ,
error APPX1101: ...nuget\packages\runtime.win8-arm.runtime.native.System.IO.Compression\4.0.1\runtimeswin8-arm\native\clrcompression.dll

Still have this issue in debug mode:

  1. Target version (creators update, 15063)
  2. Min version (november update, 10586)
  3. "Microsoft.NETCore.UniversalWindowsPlatform": "5.3.3",
  4. Test phone running 10.0.10586.164

Got these reports from users that are on phones that are stuck on the november update (left behind for whatever reason). I don't want to drop support for these users & their phones. Everything in the app works except Gzip decompression.

This is not happening in release mode, but makes it hard to test the app.

Basically you have to jump between solutions:

  1. DEBUG mode: use the workaround like @ericstj mentions
  2. RELEASE mode: remove the workaround like @MMalikKhan mentions

As an update, I've got a fix for this merged in the 1.1 servicing branch, but it hasn't shipped a new package yet. cc: @weshaggard

Still happening without the workaround. Has anybody got a DEBUG version working without the workaround?

@weshaggard is this fixed for good? Did you ship @ianhays fix?

Yes I expect the latest version of the package should just work. If you aren't seeing that place open another issue with the details of what you are using and seeing.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jamesqo picture jamesqo  路  3Comments

iCodeWebApps picture iCodeWebApps  路  3Comments

jzabroski picture jzabroski  路  3Comments

matty-hall picture matty-hall  路  3Comments

GitAntoinee picture GitAntoinee  路  3Comments