c# - Could not load file or assembly 'System.Runtime, Version=4.1.0.0' in .NET Core -
unhandled exception: system.io.filenotfoundexception: not load file or assembly 'system.runtime, version=4.1.0.0, culture=neutral, publickeytoken=b03f5f7f11d50a3a' or 1 of dependencies. system cannot find file specified. @ system.modulehandle.resolvetype(runtimemodule module, int32 typetoken, intptr* typeinstargs, int32 typeinstcount, intptr* methodinstargs, int32 methodinstcount, objecthandleonstack type) @ system.modulehandle.resolvetypehandleinternal(runtimemodule module, int32 typetoken, runtimetypehandle[] typeinstantiationcontext, runtimetypehandle[] methodinstantiationcontext) @ system.reflection.runtimemodule.resolvetype(int32 metadatatoken, type[] generictypearguments, type[] genericmethodarguments) @ system.reflection.customattribute.filtercustomattributerecord(customattributerecord carecord, metadataimport scope, assembly& lastaptcaokassembly, runtimemodule decoratedmodule, metadatatoken decoratedtoken, runtimetype attributefiltertype, boolean mustbeinheritable, object[] attributes, ilist derivedattributes, runtimetype& attributetype, iruntimemethodinfo& ctor, boolean& ctorhasparameters, boolean& isvararg) @ system.reflection.customattribute.getcustomattributes(runtimemodule decoratedmodule, int32 decoratedmetadatatoken, int32 pcacount, runtimetype attributefiltertype, boolean mustbeinheritable, ilist derivedattributes, boolean isdecoratedtargetsecuritytransparent) @ system.reflection.customattribute.getcustomattributes(runtimeassembly assembly, runtimetype catype) @ system.attribute.getcustomattributes(assembly element, type attributetype, boolean inherit) @ system.appdomain.gettargetframeworkname()
i using assemblyloadcontext in application have "system.runtime.loader": "4.0.0" dependency after publish project have above error.
dotnet --version 1.0.0-preview2-003121 { "version": "1.0.0-*", "buildoptions": { "emitentrypoint": true }, "dependencies": { "microsoft.netcore.app": { "type": "platform", "version": "1.0.0" }, "commandlineargumentsparser": "3.0.4", "system.runtime.loader": "4.0.0", "microsoft.extensions.dependencymodel": "1.0.0", "system.runtime": "4.1.0" }, "frameworks": { "netcoreapp1.0": { "imports": "dnxcore50" } } }
with visual studio can run application dotnet command line have above error. can me ?
'dotnet restore' in project folder? (i met such problem rc2 -> project.lock.json didn't contain link lib right arch after 'restore' on solution level)
Comments
Post a Comment