NET Core 2.0に更新しようとしていますが、参照でインストールされたすべてのパッケージでこれらのエラーが発生します。
問題、おそらく:
netcoreapp1.0
出力で参照を取得しています:
Microsoft.EntityFrameworkCore.Tools.DotNet 2.0.0パッケージは、netcoreapp1.0(.NETCoreApp、バージョン= v1.0)と互換性がありません。Microsoft.EntityFrameworkCore.Tools.DotNet 2.0.0パッケージは以下をサポートします:netcoreapp2.0(.NETCoreApp、バージョン= v2.0)1つ以上のパッケージが.NETCoreApp、バージョン= v1.0と互換性がありません。検出されたパッケージの検出:2.1.1から2.0.0までのMicrosoft.ApplicationInsights.AspNetCore Microsoft.AspNetCore.All(> = 2.0.0)-> Microsoft.AspNetCore.ApplicationInsights.HostingStartup(> = 2.0.0)-> Microsoft。 ApplicationInsights.AspNetCore(> = 2.1。1)アプリケーション(> = 1.0.0)-> Microsoft.ApplicationInsights.AspNetCore(> = 2.0.0)
その後、すべてのコンポーネントに対してこのメッセージが表示されます。
Microsoft.AspNetCore.ANYPACKAGE 2.0.0パッケージは、netcoreapp2.0(.NETCoreApp、バージョン= v2.0)と互換性がありません。Microsoft.AspNetCore.WebSockets 2.0.0パッケージは次をサポートします:netstandard2.0(.NETStandard、バージョン= v2.0)
これはマニュアルです:
https://docs.microsoft.com/en-us/aspnet/core/migration/1x-to-2x/
SDKが2.0に更新されました:
これは私のcsproj
です:
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>netcoreapp2.0</TargetFramework>
</PropertyGroup>
<PropertyGroup>
<AssetTargetFallback>$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;</AssetTargetFallback>
</PropertyGroup>
<ItemGroup>
<Compile Remove="wwwroot\lib\kendo-ui-core\**" />
<Content Remove="wwwroot\lib\kendo-ui-core\**" />
<EmbeddedResource Remove="wwwroot\lib\kendo-ui-core\**" />
<None Remove="wwwroot\lib\kendo-ui-core\**" />
</ItemGroup>
<ItemGroup>
<Content Include="wwwroot\css\bootstrap-lumen.css" />
<Content Include="wwwroot\css\bootstrap-sand.css" />
<Content Include="wwwroot\css\bootstrap-sand.min.css" />
<Content Include="wwwroot\js\application-role-index.js" />
<Content Include="wwwroot\js\family-index.js" />
<Content Include="wwwroot\js\jquery-3.2.1.min.js" />
<Content Include="wwwroot\js\modal-action-store.js" />
<Content Include="wwwroot\js\populate-district.js" />
<Content Include="wwwroot\js\store-index.js" />
<Content Include="wwwroot\js\type-index.js" />
<Content Include="wwwroot\js\user-index.js" />
<Content Include="wwwroot\js\jquery.filtertable.min.js" />
<Content Include="wwwroot\js\machine-index.js" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Bootstrap.v3.Datetimepicker" Version="4.17.45" />
<PackageReference Include="Bootstrap.v3.Datetimepicker.CSS" Version="4.17.45" />
<PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.0" />
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="2.0.0" />
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="2.0.0" />
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGenerators.Mvc" Version="2.0.0" />
<PackageReference Include="Newtonsoft.Json" Version="10.0.3" />
<PackageReference Include="NuGet.CommandLine" Version="4.1.0" />
</ItemGroup>
<ItemGroup>
<DotNetCliToolReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Tools" Version="2.0.0" />
<DotNetCliToolReference Include="Microsoft.EntityFrameworkCore.Tools.DotNet" Version="2.0.0" />
</ItemGroup>
</Project>
助けてくれてありがとう。
編集:詳細
ソリューションをコンパイルした後、次のメッセージが表示されました。
1> CSC:エラーCS1703:同等のIDを持つ複数のアセンブリがインポートされました: 'C:\ Users \ user \ .nuget \ packages \ microsoft.netcore.app \ 2.0.0 \ ref \ netcoreapp2.0 \ System.ComponentModel.dll 「そして」C:\ Users \ User \ .nuget \ packages \ system.componentmodel \ 4.3.0 \ ref \ netstandard1.0 \ System.ComponentModel.dll '。重複する参照の1つを削除してください。
Visual Studioを最新バージョンに更新する ことで解決しました(私にとっては15.3.3でした)
また、SDKがバージョン2.0に、NuGetが最新バージョンに更新されていることを確認してください。
この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。
侵害の場合は、連絡してください[email protected]
コメントを追加