-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Closed as duplicate of#18840
Labels
Description
Tools ignore custom $(BaseIntermediateOutputPath)
Steps to reproduce
- Create a project
- Open <project_name>.csproj and change
$(BaseIntermediateOutputPath) - Run
dotnet efcommand - Expected that file
<project_name>.csproj.EntityFrameworkCore.targetswas created inside$(BaseIntermediateOutputPath), but was<project_root>/obj
See buildExtensionsDir variable inside class Microsoft.EntityFrameworkCore.Tools.Project:
if (buildExtensionsDir == null)
{
buildExtensionsDir = Path.Combine(Path.GetDirectoryName(file), "obj");
}
Directory.CreateDirectory(buildExtensionsDir);
var efTargetsPath = Path.Combine(
buildExtensionsDir,
Path.GetFileName(file) + ".EntityFrameworkCore.targets");
using (var input = typeof(Resources).GetTypeInfo().Assembly.GetManifestResourceStream(
"Microsoft.EntityFrameworkCore.Tools.Resources.EntityFrameworkCore.targets"))
using (var output = File.OpenWrite(efTargetsPath))
{
// NB: Copy always in case it changes
Reporter.WriteVerbose(Resources.WritingFile(efTargetsPath));
input.CopyTo(output);
}Further technical details
EF Core version: 3.0.0
Target framework: .NET Core 3.0
Operating system: Windows 10 x64
IDE: Visual Studio 2019 16.3
Reactions are currently unavailable