我在
Net Framework 4.6.2
中开发了一个插件,它使用 Azure.Storage.Blobs
nuget 包来访问容器内的文件夹并下载其内容。
此插件从具有“收到 HTTP 请求时”触发器的云流中使用。
并使用一个动作来调用注册的插件
使用过的
Azure.Storage.Blobs is 12.17.0
版本直到大约三周前才开始工作。现在我收到此错误Could not load file or assembly 'Azure.Storage.Blobs, Version=12.17.0.0, Culture=neutral, PublicKeyToken=92742159e12e44c8' or one of its dependencies. The system cannot find the file specified.
突然发生这种情况有什么原因吗?
我把csproj文件的内容留在这里
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{EEC7838A-7F97-4D79-9804-E77208AAF255}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Some_Name</RootNamespace>
<AssemblyName>Some_Name</AssemblyName>
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup>
<SignAssembly>true</SignAssembly>
</PropertyGroup>
<PropertyGroup>
<AssemblyOriginatorKeyFile>Some_Name.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Some_Name.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Azure.Storage.Blobs">
<Version>12.17.0</Version>
</PackageReference>
<PackageReference Include="Microsoft.CrmSdk.CoreAssemblies">
<Version>9.0.2.51</Version>
</PackageReference>
<PackageReference Include="Newtonsoft.Json">
<Version>13.0.3</Version>
</PackageReference>
</ItemGroup>
<ItemGroup>
<None Include="Some_Name.snk" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
我尝试了很多变体,降级软件包,绑定重定向。我还尝试合并程序集,这是我在其他场合选择的解决方案,例如当我需要使用
Newtonsoft.Json
时。
合并是最乐观的选择,但它未能解决
Microsoft.Bcl.AsyncInterfaces
包的版本。
我找到了一种解决方法,我已更改为与 azure blob 集成的 Microsoft 软件包
Microsoft.WindowsAzure.Storage
,该软件包已被弃用且不受支持,但它给了我时间让我的插件正常工作并计划迁移我的代码以使用azure 存储 blob API Rest。