简体   繁体   English

无法加载文件或程序集'Microsoft.Azure.AppConfiguration.AzconfigClient

[英]Could not Load file or assembly 'Microsoft.Azure.AppConfiguration.AzconfigClient

I keep getting this exception on the build. 我一直在生成此异常。

it stops at this line: 它在此行停止:

IConfigurationRoot config = builder.Build();

and gives this exception: 并给出此异常:

System.IO.FileNotFoundException: 'Could not load file or assembly 'Microsoft.Azure.AppConfiguration.AzconfigClient, Version=1.0.0.0, Culture=neutral, PublicKeyToken=69dad7634abb75e4' or one of its dependencies. System.IO.FileNotFoundException:'无法加载文件或程序集'Microsoft.Azure.AppConfiguration.AzconfigClient,版本= 1.0.0.0,区域性=中性,PublicKeyToken = 69dad7634abb75e4'或其依赖项之一。 The system cannot find the file specified.' 该系统找不到指定的文件。'

I have tried to add this reference in the packages.config : 我试图在packages.config中添加此引用:

<package id="Microsoft.Azure.AppConfiguration.AzconfigClient" Version="1.0.0-preview-008870001-1052" targetFramework="net472"/>

but it still do not work. 但它仍然不起作用。

var builder = new ConfigurationBuilder(); //new config builder
            builder.AddAzureAppConfiguration(Environment.GetEnvironmentVariable("ConnectionString")); //get the connecting string

IConfigurationRoot config = builder.Build(); //call the build method in config builder

I am expecting it to build so that I can use the config variable. 我期望它可以构建,以便可以使用config变量。

You can install Microsoft.Extensions.Configuration.AzureAppConfiguration which is support .net standard project. 您可以安装支持.net标准项目的Microsoft.Extensions.Configuration.AzureAppConfiguration For .net it is preview . 对于.net来说是Preview

Here is a tutorial you could refer to. 这是您可以参考的教程

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 无法加载文件或程序集“Microsoft.Azure.Management.ServiceBus.Fluent” - Could not load file or assembly 'Microsoft.Azure.Management.ServiceBus.Fluent' 无法加载文件或程序集&#39;Microsoft.Azure.Graphs&#39; - Could not load file or assembly 'Microsoft.Azure.Graphs' 无法加载文件或程序集“ Microsoft.WindowsAzure.Storage” Azure函数 - Could not load file or assembly 'Microsoft.WindowsAzure.Storage' Azure Functions 无法加载文件或程序集“ Microsoft.Azure.Storage.Emulator.Controller” - Could not load file or assembly 'Microsoft.Azure.Storage.Emulator.Controller' 无法加载文件或程序集&#39;Microsoft.Azure.Documents.Client - Azure-Table-Api - Could not load file or assembly 'Microsoft.Azure.Documents.Client - Azure-Table-Api 无法加载文件或程序集 Microsoft.CodeAnalysis - Could not load file or assembly Microsoft.CodeAnalysis 无法加载文件或程序集“Microsoft.ReportViewer” - Could not load file or assembly 'Microsoft.ReportViewer' Azure应用服务:无法加载文件或程序集Microsoft.Azure.Mobile.Server - Azure App Service: Could not load file or assembly Microsoft.Azure.Mobile.Server mscorlib:无法加载文件或程序集“Microsoft.Azure.WebJobs,版本=3.0.2.0 - mscorlib: Could not load file or assembly 'Microsoft.Azure.WebJobs, Version=3.0.2.0 Azure WebJob失败:无法加载文件或程序集 - Azure WebJob fails: Could not load file or assembly
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM