まず:Tutorial.NETコアNuGet EFコアバージョンのdoesan't一致
を私はsienceに約4時間を検索し、このエラーを修正する方法解決策を見つけることができませんでした:
Startup project 'DatabaseConnection' is an ASP.NET Core or .NET Core project for Visual Studio 2015. This version of the Entity Framework Core Package Manager Console Tools doesn't support these types of projects.
私は、次のコマンドを使用して生産:
Scaffold-DbContext "Server=127.0.0.1;Database=vicotv;Trusted_Connection=True;" Microsoft.EntityFrameworkCore.SqlServer -OutputDir Models
私はEFのSQLサーバーを更新しようとした後。
PM> Install-Package Microsoft.EntityFrameworkCore.Tools -Version 1.1.0-msbuild3-final
GET https ://api.nuget.org/v3/registration1-gz/microsoft.entityframeworkcore.tools/index.json GET https ://www.nuget.org/api/v2/curated-feeds/microsoftdotnet/Packages(Id='Microsoft.EntityFrameworkCore.Tools',Version='1.1.0-msbuild3-final') OK https ://api.nuget.org/v3/registration1-gz/microsoft.entityframeworkcore.tools/index.json 143ms Error finding repository for 'https ://www.nuget.org/api/v2/curated-feeds/microsoftdotnet/': An error occurred while retrieving package metadata for 'Microsoft.EntityFrameworkCore.Tools.1.1.0-msbuild3-final' from source 'Microsoft and .NET'. A task was canceled. Retrieving package 'Microsoft.EntityFrameworkCore.Tools 1.1.0-msbuild3-final' from 'nuget.org'. Installing NuGet package Microsoft.EntityFrameworkCore.Tools.1.1.0-msbuild3-final. Successfully installed 'Microsoft.EntityFrameworkCore.Tools 1.1.0-msbuild3-final' to DatabaseConnection Executing nuget actions took 122.12 ms Time Elapsed: 00:00:00.9439736
ただし、このエラーではパッケージは更新されません。
.NETコマンドラインツール(1.0.0-preview2-1-003155)
--infoPM> DOTNET:
{
"buildOptions":{
"emitEntryPoint":true,
"preserveCompilationContext":true
},
"dependencies":{
"Microsoft.EntityFrameworkCore.SqlServer":"1.1.0",
"Microsoft.EntityFrameworkCore.SqlServer.Design":"1.1.0",
"Microsoft.ApplicationInsights.AspNetCore":"2.0.0",
"Microsoft.AspNetCore.Mvc":"1.1.1",
"Microsoft.AspNetCore.Routing":"1.1.0",
"Microsoft.AspNetCore.Server.IISIntegration":"1.1.0",
"Microsoft.AspNetCore.Server.Kestrel":"1.1.0",
"Microsoft.Extensions.Configuration.EnvironmentVariables":"1.1.0",
"Microsoft.Extensions.Configuration.FileExtensions":"1.1.0",
"Microsoft.Extensions.Configuration.Json":"1.1.0",
"Microsoft.Extensions.Logging":"1.1.0",
"Microsoft.Extensions.Logging.Console":"1.1.0",
"Microsoft.Extensions.Logging.Debug":"1.1.0",
"Microsoft.Extensions.Options.ConfigurationExtensions":"1.1.0",
"Microsoft.NETCore.App":"1.1.0",
"Microsoft.EntityFrameworkCore.Design":"1.1.0",
"Microsoft.EntityFrameworkCore":"1.1.0",
"Microsoft.AspNetCore.Server.IISIntegration.Tools":"1.1.0-preview4-final",
"Microsoft.EntityFrameworkCore.Tools":"1.1.0-msbuild3-final"
},
"frameworks":{
"netcoreapp1.0":{
"imports":[
"dotnet5.6",
"portable-net45+win8"
]
}
},
"publishOptions":{
"include":[
"wwwroot",
"**/*.cshtml",
"appsettings.json",
"web.config"
]
},
"runtimeOptions":{
"configProperties":{
"System.GC.Server":true
}
},
"scripts":{
"postpublish":[
"dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%"
]
},
"tools":{
},
"runtimes":{
"win10-x86":{
},
"win10-x64":{
}
}}
マイDOTNETの情報:私のproject.jsonファイルに続き
製品情報:
バージョン:1.0.0-preview2-1-003155
d7b0190bd4ランタイム環境:
OS名:Windowsの
OSバージョン:10.0.14393
OSプラットフォーム:Windowsの
RID:win10-
は、SHA-1ハッシュをコミットx64
注:私は十分な評判がないので、リンクに空白を追加しました。
私は何をしたいと思いますか?
Visual Studioのバージョンとプロジェクトで使用している.NET Frameworkのバージョンは何ですか? – Baro
@Baro私は私のプロジェクトで使用しているVisualStudio 2015 Professionalと.NETフレームワークを使用しています:.NET Framework 4.5.2と私のプロジェクトはASP.NetコアWebアプリケーションです –
チュートリアルのリンクおそらく時代遅れです。必要なのはVS 2017ですが、おそらくその瞬間に.netコアとVS 2015がサポートされていないためです。しかし、あなたのプロジェクトがフレームワークの4.5.2バージョンを使用することは奇妙に思えます。コアバージョンは6.xです!あなたの問題だろうか? – Baro