hat gerade angefangen, dot net core 2.0 zu lernen.ef-core Add-Migration funktioniert nicht
wenn ich versuche, die Migration zu erstellen:
PM> Add-Migration InitialModel
i erhalten Fehler:
Add-Migration : Exception calling "Substring" with "1" argument(s): "StartIndex cannot be less than zero. Parameter name: startIndex" At line:1 char:1 + Add-Migration InitialModel + ~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [Add-Migration], MethodInvocationException + FullyQualifiedErrorId : ArgumentOutOfRangeException,Add-Migration
mein Dotnet --info
.NET Command Line Tools (2.0.0)
Product Information: Version: 2.0.0 Commit SHA-1 hash: cdcd1928c9
Runtime Environment: OS Name: Windows OS Version: 10.0.15063 OS Platform: Windows RID: win10-x64 Base Path: C:\Program Files\dotnet\sdk\2.0.0\
Microsoft .NET Core Shared Framework Host
Version : 2.0.0 Build : e8b8861ac7faf042c87a5c2f9f2d04c98b69f28d
meine csproj Datei:
<PropertyGroup>
<TargetFramework>netcoreapp2.0</TargetFramework>
<TypeScriptCompileBlocked>true</TypeScriptCompileBlocked>
<TypeScriptToolsVersion>Latest</TypeScriptToolsVersion>
<IsPackable>false</IsPackable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.0" />
<PackageReference Include="Microsoft.DotNet.Watcher.Tools" Version="2.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="2.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="2.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="2.0.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>
danke für Hilfe!
Siehe [this] (https://stackoverflow.com/questions/44178411/error-in-migrations-in-efcore)? –
Hmm ... Dieses Problem sollte in 2.0.0 behoben werden. @ user3373603 Können Sie [eine neue Ausgabe senden] (https://github.com/aspnet/EntityFrameworkCore/issues/new)? – bricelam
@Bricelam ok, ich werde Problem erstellen, als Workaround ich hinzufügen Migration mit Entwickler Eingabeaufforderung 'dotnet ef Migrationen hinzufügen ' – user3373603