admin管理员组文章数量:1024664
I'm developing an "ASP.Net Core Web API" in Framework .Net 8.0 working with Microsoft WSUS, I have referenced the file :
C:\Program Files\Update Services\Api\Microsoft.UpdateServices.Administration.dll
When I try to run the code :
AdminProxy proxy = new AdminProxy();
objUpdateServer = proxy.GetRemoteUpdateServerInstance(sServerName, false, iPort);
I get this exception at the 2nd line :
{"Could not load file or assembly 'Microsoft.UpdateServices.BaseApi, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified.":"Microsoft.UpdateServices.BaseApi, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"}
at System.Reflection.RuntimeAssembly.InternalLoad(AssemblyName assemblyName, StackCrawlMark& stackMark, AssemblyLoadContext assemblyLoadContext, RuntimeAssembly requestingAssembly, Boolean throwOnFileNotFound) at System.Reflection.Assembly.Load(String assemblyString) at Microsoft.UpdateServices.Administration.AdminProxy.CreateUpdateServer(Object[] args) at Microsoft.UpdateServices.Administration.AdminProxy.GetUpdateServer(String serverName, Boolean useSecureConnection, Int32 portNumber) at Microsoft.UpdateServices.Administration.AdminProxy.GetRemoteUpdateServerInstance(String serverName, Boolean useSecureConnection, Int32 portNumber) at iWSUS_Server.WSUSAPI..ctor(String sServerName, Int32 iPort, Logger pm_Logger) in C:\GitLab\Projects\iWSUS-Server\iWSUS_Server\Classes\WSUSAPI.cs:line 32
How can I fix this problem ?
I had developed a WCF service in Framework 4.7.2 with the same referenced dll and this was working properly.
Thanks per advance for your help :)
I'm developing an "ASP.Net Core Web API" in Framework .Net 8.0 working with Microsoft WSUS, I have referenced the file :
C:\Program Files\Update Services\Api\Microsoft.UpdateServices.Administration.dll
When I try to run the code :
AdminProxy proxy = new AdminProxy();
objUpdateServer = proxy.GetRemoteUpdateServerInstance(sServerName, false, iPort);
I get this exception at the 2nd line :
{"Could not load file or assembly 'Microsoft.UpdateServices.BaseApi, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified.":"Microsoft.UpdateServices.BaseApi, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"}
at System.Reflection.RuntimeAssembly.InternalLoad(AssemblyName assemblyName, StackCrawlMark& stackMark, AssemblyLoadContext assemblyLoadContext, RuntimeAssembly requestingAssembly, Boolean throwOnFileNotFound) at System.Reflection.Assembly.Load(String assemblyString) at Microsoft.UpdateServices.Administration.AdminProxy.CreateUpdateServer(Object[] args) at Microsoft.UpdateServices.Administration.AdminProxy.GetUpdateServer(String serverName, Boolean useSecureConnection, Int32 portNumber) at Microsoft.UpdateServices.Administration.AdminProxy.GetRemoteUpdateServerInstance(String serverName, Boolean useSecureConnection, Int32 portNumber) at iWSUS_Server.WSUSAPI..ctor(String sServerName, Int32 iPort, Logger pm_Logger) in C:\GitLab\Projects\iWSUS-Server\iWSUS_Server\Classes\WSUSAPI.cs:line 32
How can I fix this problem ?
I had developed a WCF service in Framework 4.7.2 with the same referenced dll and this was working properly.
Thanks per advance for your help :)
本文标签:
版权声明:本文标题:c# - Could not load file or assembly 'Microsoft.UpdateServices.BaseApi' with the referenced "Microsoft. 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://it.en369.cn/questions/1745615654a2159274.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论