gpt4 book ai didi

azure - Azure SDK 更新后 WCF 停止生成 Silverlight 类

转载 作者:行者123 更新时间:2023-12-03 04:38:49 25 4
gpt4 key购买 nike

我最近更新到Azure SDK 1.8,但生成的代码文件包含这样的错误:

  /// <summary>
/// Gets the context that is registered as a lifetime object with the current application.
/// </summary>
/// <exception cref="InvalidOperationException"> is thrown if there is no current application,
/// no contexts have been added, or more than one context has been added.
/// </exception>
/// <seealso cref="System.Windows.Application.ApplicationLifetimeObjects"/>
public new static WebContext Current
{
get
{
return ((WebContext)(WebContextBase.Current));
}
}

贾拉尔

最佳答案

我现在找到了以下解决方案。将以下代码添加到 app.config 和 web.config :

<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Microsoft.WindowsAzure.StorageClient" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="1.1.0.0" newVersion="1.7.0.0" />
</dependentAssembly>
</assemblyBinding>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Microsoft.ServiceBus" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="1.6.0.0" newVersion="1.7.0.0" />
</dependentAssembly>
</assemblyBinding>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Microsoft.ApplicationServer.Caching.Core" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="101.0.0.0" newVersion="1.0.4655.0" />
</dependentAssembly>
</assemblyBinding>

关于azure - Azure SDK 更新后 WCF 停止生成 Silverlight 类,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13581033/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com