efcore: Absolute path in OutputPath breaks Add-Migration
I created a netcoreapp2.0 project from VS template and changed the output path <OutputPath> to be an absolute path. I use this (along with other MSBuild properties) on my devbox to separate where my source lives and where my intermediate and output directories are. This is useful for me since I want Dropbox syncing my code by not my binaries.
Minimal repro .csproj file:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.0</TargetFramework>
<OutputPath>D:\Dropbox\Programming\Repro\Repro\bin\$(Configuration)</OutputPath>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="2.1.0-preview2-final" />
</ItemGroup>
</Project>
I have tried older versions of the Tools package. The Program.cs doesn’t even matter since it seems like Add-Migration can’t even find the output assembly.
VS version: 15.6.4 NuGet version: 4.6.1.5019
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 15 (10 by maintainers)
Workaround
Comment out the
OutputPath, add the migration, uncomment out theOutputPath, then delete thebindirectory.@gusmally This issue is fixed in EF Core 2.2.