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