PMC + xproj: dotnet-ef uses incorrect build directory #6335
Labels
closed-fixed
The issue has been fixed and is/will be included in the release indicated by the issue milestone.
type-bug
Milestone
Steps to reproduce
File -> New ASP.NET Web Application (.NET Core)
Install Microsoft.EntityFrameworkCore.Tools 1.0.0-preview2-final
Add-Migration Initial -Verbose
The issue
PMC cmdlets will call dotnet-ef with the incorrect build base path option. In project that use global.json, this can cause .NET Core SDK to use
./bin/src/<projectName>/bin/
as the build directory instead of just./bin/
.e.g.:
In many cases, the PMC command will continue to function correctly. However, this causes problems for projects using SQLite and
Update-Database
. See aspnet/Microsoft.Data.Sqlite#275. In other cases, it causes misleading "class libraries not supported" errors.Further technical details
PMC uses DTE to determine build base path. Before preview2, the behavior of web tooling in VS was to build in
<solutionRoot>/bin/<projectName>
. This was changed for preview 2 to instead use<projectDirectory>/bin/
. dotnet-ef preview2 still uses the original behavior.EF Core version: 1.0.0-preview2-final tooling
Visual Studio version: VS 2015 U3, Web Tooling Preview 2
Workaround
Use dotnet-ef directly and don't pass in the --build-base-path option.
Use absolute paths in connection strings for SQLite.
The text was updated successfully, but these errors were encountered: