locked
.net core 2.2 app gives System.Drawing.Common Error on hosting RRS feed

  • Question

  • User-1202579601 posted

    Error:
    An assembly specified in the application dependencies manifest (StaffRepos.deps.json) was not found:
    package: 'System.Drawing.Common', version: '4.5.0-preview1-25914-04'
    path: 'runtimes/win/lib/netcoreapp2.0/System.Drawing.Common.dll'

    On local machine the .net core 2.2 app works.   Published on local folder has package: 'System.Drawing.Common', version: '4.6.25914.4'. along with the other files.  On the hosting machine, it gives the above error. 

    my project.deps.json contains something like-


    "System.Drawing.Common/4.5.0-preview1-25914-04": {
    "dependencies": {
    "Microsoft.NETCore.Platforms": "2.2.0"
    },
    "runtime": {
    "lib/netstandard2.0/System.Drawing.Common.dll": {
    "assemblyVersion": "4.0.0.0",
    "fileVersion": "4.6.25914.4"
    }
    },

    Tuesday, October 8, 2019 5:01 AM

Answers

  • User711641945 posted

    Hi pmdrait,

    The correct .deps.json file should be like below:

    "System.Drawing.Common/4.5.0-preview1-25914-04": {
            "dependencies": {
              "Microsoft.NETCore.Platforms": "2.2.0"
            },
            "runtime": {
              "lib/netstandard2.0/System.Drawing.Common.dll": {
                "assemblyVersion": "4.0.0.0",
                "fileVersion": "4.6.25914.4"
              }
            },
            "runtimeTargets": {
              "runtimes/unix/lib/netcoreapp2.0/System.Drawing.Common.dll": {
                "rid": "unix",
                "assetType": "runtime",
                "assemblyVersion": "4.0.0.0",
                "fileVersion": "4.6.25914.4"
              },
              "runtimes/win/lib/netcoreapp2.0/System.Drawing.Common.dll": {
                "rid": "win",
                "assetType": "runtime",
                "assemblyVersion": "4.0.0.0",
                "fileVersion": "4.6.25914.4"
              }
            },
            "compile": {
              "ref/netstandard2.0/System.Drawing.Common.dll": {}
            }
          },

    Did you install or reinstall the runtime package as my previous post said?And publish again after you installing it successfully.

    Could you share details about how did you publish your project?

    Best Regards,

    Rena

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, October 10, 2019 9:20 AM

All replies

  • User711641945 posted

    Hi pmdrait,

    I could not reproduce your issue.For this issue,you could try to install or reinstall the corosponding runtime package.For example:If you use Asp.Net Core SDK 2.2.402,you need to install the Runtime 2.2.7.

    Reference:

    https://dotnet.microsoft.com/download/dotnet-core/2.2

    Best Regards,

    Rena

    Wednesday, October 9, 2019 9:33 AM
  • User-1202579601 posted

    The published app dependencies file. part of it shown below, the point of error is underlined. I could not understand the details-

    {
    "runtimeTarget": {
    "name": ".NETCoreApp,Version=v2.2",
    "signature": "8e79a59ae90b6087e6312fdbec60afc9d65fbd13"
    },
    "compilationOptions": {
    "defines": [
    "TRACE",
    "RELEASE",
    "NETCOREAPP",
    "NETCOREAPP2_2"
    ],
    "languageVersion": "",
    "platform": "",
    "allowUnsafe": false,
    "warningsAsErrors": false,
    "optimize": true,
    "keyFile": "",
    "emitEntryPoint": true,
    "xmlDoc": false,
    "debugType": "portable"
    },
    "targets": {
    ".NETCoreApp,Version=v2.2": {
    "StaffRepos/1.0.0": {
    "dependencies": {
    "Bootstrap.v3.Datetimepicker": "4.17.45",
    "Bootstrap.v3.Datetimepicker.CSS": "4.17.45",
    "EPPlus.Core": "1.5.4",
    "Microsoft.AspNetCore.App": "2.2.0",
    "Microsoft.AspNetCore.Razor.Design": "2.2.0",
    "Microsoft.NETCore.App": "2.2.0",
    "bootstrap": "4.3.1",
    "jQuery": "3.4.1"
    },
    "runtime": {
    "StaffRepos.dll": {}
    },
    "compile": {
    "StaffRepos.dll": {}
    }
    },
    "bootstrap/4.3.1": {
    "dependencies": {
    "jQuery": "3.4.1",
    "popper.js": "1.14.0"
    }
    },
    "bootstrap.less/3.3.5": {
    "dependencies": {
    "jQuery": "3.4.1"
    }
    },
    "Bootstrap.v3.Datetimepicker/4.17.45": {
    "dependencies": {
    "Moment.js": "2.9.0",
    "bootstrap.less": "3.3.5"
    }
    },
    "Bootstrap.v3.Datetimepicker.CSS/4.17.45": {
    "dependencies": {
    "Moment.js": "2.9.0",
    "bootstrap": "4.3.1"
    }
    },
    "EPPlus.Core/1.5.4": {
    "dependencies": {
    "System.Collections.NonGeneric": "4.3.0",
    "System.Data.Common": "4.3.0",
    "System.Data.SqlClient": "4.6.0",
    "System.Drawing.Common": "4.5.0-preview1-25914-04",
    "System.Reflection": "4.3.0",
    "System.Security.Claims": "4.3.0",
    "System.Security.Cryptography.Pkcs": "4.5.0",
    "System.Security.Cryptography.X509Certificates": "4.3.0",
    "System.Text.Encoding.CodePages": "4.5.0",
    "System.Threading.Thread": "4.3.0",
    "System.Threading.ThreadPool": "4.3.0",
    "System.Xml.XPath.XmlDocument": "4.3.0",
    "System.Xml.XmlDocument": "4.3.0"
    },
    "runtime": {
    "lib/netstandard2.0/EPPlus.Core.dll": {
    "assemblyVersion": "1.5.4.0",
    "fileVersion": "1.5.4.0"
    }
    },
    "compile": {
    "lib/netstandard2.0/EPPlus.Core.dll": {}
    }
    },
    "jQuery/3.4.1": {},
    "Moment.js/2.9.0": {},
    "popper.js/1.14.0": {},
    "System.Data.Common/4.3.0": {
    "dependencies": {
    "System.Collections": "4.3.0",
    "System.Globalization": "4.3.0",
    "System.IO": "4.3.0",
    "System.Resources.ResourceManager": "4.3.0",
    "System.Runtime": "4.3.0",
    "System.Runtime.Extensions": "4.3.0",
    "System.Text.RegularExpressions": "4.3.0",
    "System.Threading.Tasks": "4.3.0"
    }
    },
    "System.Drawing.Common/4.5.0-preview1-25914-04": {
    "dependencies": {
    "Microsoft.NETCore.Platforms": "2.2.0"
    },
    "runtime": {
    "lib/netstandard2.0/System.Drawing.Common.dll": {
    "assemblyVersion": "4.0.0.0",
    "fileVersion": "4.6.25914.4"
    }
    },

    Wednesday, October 9, 2019 1:53 PM
  • User711641945 posted

    Hi pmdrait,

    The correct .deps.json file should be like below:

    "System.Drawing.Common/4.5.0-preview1-25914-04": {
            "dependencies": {
              "Microsoft.NETCore.Platforms": "2.2.0"
            },
            "runtime": {
              "lib/netstandard2.0/System.Drawing.Common.dll": {
                "assemblyVersion": "4.0.0.0",
                "fileVersion": "4.6.25914.4"
              }
            },
            "runtimeTargets": {
              "runtimes/unix/lib/netcoreapp2.0/System.Drawing.Common.dll": {
                "rid": "unix",
                "assetType": "runtime",
                "assemblyVersion": "4.0.0.0",
                "fileVersion": "4.6.25914.4"
              },
              "runtimes/win/lib/netcoreapp2.0/System.Drawing.Common.dll": {
                "rid": "win",
                "assetType": "runtime",
                "assemblyVersion": "4.0.0.0",
                "fileVersion": "4.6.25914.4"
              }
            },
            "compile": {
              "ref/netstandard2.0/System.Drawing.Common.dll": {}
            }
          },

    Did you install or reinstall the runtime package as my previous post said?And publish again after you installing it successfully.

    Could you share details about how did you publish your project?

    Best Regards,

    Rena

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, October 10, 2019 9:20 AM
  • User-1202579601 posted

    Thanks for highlighting the path. I had loaded System.Drawing.Common.dll under the main folder. I created the spacified path on the hosting server.

    Can we not change the path in the dependencies as required.

    Thursday, October 10, 2019 3:30 PM