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.
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.
.NET forums are moving to a new home on Microsoft Q&A, we encourage you to go to Microsoft Q&A for .NET for posting new questions and get involved today.
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
.NET forums are moving to a new home on Microsoft Q&A, we encourage you to go to Microsoft Q&A for .NET for posting new questions and get involved today.
Member
16 Points
100 Posts
.net core 2.2 app gives System.Drawing.Common Error on hosting
Oct 08, 2019 05:01 AM|pmdrait|LINK
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"
}
},
Contributor
2710 Points
874 Posts
Re: .net core 2.2 app gives System.Drawing.Common Error on hosting
Oct 09, 2019 09:33 AM|Rena Ni|LINK
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
Member
16 Points
100 Posts
Re: .net core 2.2 app gives System.Drawing.Common Error on hosting
Oct 09, 2019 01:53 PM|pmdrait|LINK
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"
}
},
Contributor
2710 Points
874 Posts
Re: .net core 2.2 app gives System.Drawing.Common Error on hosting
Oct 10, 2019 09:20 AM|Rena Ni|LINK
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
Member
16 Points
100 Posts
Re: .net core 2.2 app gives System.Drawing.Common Error on hosting
Oct 10, 2019 03:30 PM|pmdrait|LINK
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.