我一直在撞墙撞到一堵非常烦人的问题。如果有人有任何想法会很棒!我在视觉工作室2017中使用.net核心1.1 asp.net网站。我正在使用ravendb。问题是我得到了4个构建警告,导致部署到azure失败。警告是:
警告检测到的软件包降级:RavenDB.Client从3.5.35130-Unstable到3.5.4-patch-35202 ApiHubNunitTests(> = 1.0.0) - > ApiHub(> = 1.0.0) - > RavenDB.DependencyInjection(> = 1.0.0) - > RavenDB.Client(> = 3.5.35130-Unstable) ApiHubNunitTests(> = 1.0.0) - > ApiHub(> = 1.0.0) - > RavenDB.Client(> = 3.5.4-patch-35202)
警告检测到的软件包降级:RavenDB.Client从3.5.35130-Unstable到3.5.4-patch-35202 ApiHub(> = 1.0.0) - > RavenDB.DependencyInjection(> = 1.0.0) - > RavenDB.Client(> = 3.5.35130-Unstable) ApiHub(> = 1.0.0) - > RavenDB.Client(> = 3.5.4-patch-35202)
警告MSB3277发现无法解析的同一依赖程序集的不同版本之间发生冲突。当日志详细程度设置为详细时,这些引用冲突将在构建日志中列出。 BlueSkyApiHub C:\ Program Files(x86)\ Microsoft Visual Studio \ 2017 \ Community \ MSBuild \ 15.0 \ Bin \ Microsoft.Common.CurrentVersion.targets 1964
警告MSB3277发现无法解析的同一依赖程序集的不同版本之间发生冲突。当日志详细程度设置为详细时,这些引用冲突将在构建日志中列出。 ApiHubNunitTests C:\ Program Files(x86)\ Microsoft Visual Studio \ 2017 \ Community \ MSBuild \ 15.0 \ Bin \ Microsoft.Common.CurrentVersion.targets 1964 Build
我打开了详细的构建输出,发现了这个:
" System.Net.Primitives,Version = 4.0.10.0,Culture = neutral,PublicKeyToken = b03f5f7f11d50a3a"之间存在冲突。和" System.Net.Primitives,Version = 4.0.11.0,Culture = neutral,PublicKeyToken = b03f5f7f11d50a3a"。
和这个
" Raven.Client.Lightweight,Version = 3.5.4.0,Culture = neutral,PublicKeyToken = null"之间存在冲突。和" Raven.Client.Lightweight,Version = 3.5.3.0,Culture = neutral,PublicKeyToken = null"。
和这个
" Raven.Client.UniqueConstraints,Version = 3.5.4.0,Culture = neutral,PublicKeyToken = null"之间存在冲突。和" Raven.Client.UniqueConstraints,Version = 3.5.3.0,Culture = neutral,PublicKeyToken = null"。
还有一些与ravendb有关。
我不确定现在要去哪里?有什么想法吗?
编辑:以下是两个项目的.csproj文件
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>netcoreapp1.1</TargetFramework>
<PackageTargetFallback>portable-net45+win8</PackageTargetFallback>
</PropertyGroup>
<ItemGroup>
<Folder Include="wwwroot\" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="BCrypt.Net-Core" Version="1.4.0" />
<PackageReference Include="Flurl.Http" Version="1.2.0-pre" />
<PackageReference Include="Maqduni.AspNetCore.Identity.RavenDb" Version="1.3.34" />
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.1.1" />
<PackageReference Include="Microsoft.AspNetCore" Version="1.1.2" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="1.1.2" />
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="1.1.3" />
<PackageReference Include="Microsoft.AspNetCore.StaticFiles" Version="1.1.2" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="1.1.2" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="2.0.0-preview2-final" />
<PackageReference Include="Microsoft.VisualStudio.Web.BrowserLink" Version="1.1.2" />
<PackageReference Include="Newtonsoft.Json" Version="10.0.3" />
<PackageReference Include="NodaTime" Version="2.2.0" />
<PackageReference Include="RavenDB.Client" Version="3.5.4-patch-35202" />
<PackageReference Include="RavenDB.Client.UniqueConstraints" Version="3.5.4-patch-35202" />
<PackageReference Include="RavenDB.DependencyInjection" Version="1.0.0" />
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="5.1.4" />
</ItemGroup>
<ItemGroup>
<DotNetCliToolReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Tools" Version="1.0.0-msbuild3-final" />
</ItemGroup>
<ItemGroup>
<Content Update="appsettings.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
</Project>
和另一个项目:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp1.1</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="CompareNETObjects" Version="3.9.0" />
<PackageReference Include="FakeItEasy" Version="4.0.0-beta001" />
<PackageReference Include="Flurl.Http" Version="1.2.0-pre" />
<PackageReference Include="MyTested.AspNetCore.Mvc.Universe" Version="1.1.0" />
<PackageReference Include="Newtonsoft.Json" Version="10.0.3" />
<PackageReference Include="NodaTime" Version="2.2.0" />
<PackageReference Include="NUnit" Version="3.7.1" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\BlueSkyApiHub\BlueSkyApiHub.csproj" />
</ItemGroup>
</Project>
答案 0 :(得分:1)
我在这个上做了相当多的谷歌搜索,我尝试在csproj文件上添加各种命令,但没有任何对我有用。 我正在将我的软件包升级到.net core 2.0 ,然后我遇到了软件包降级错误。
最后我做了以下事情: