question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Absolute path in OutputPath breaks Add-Migration

See original GitHub issue

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

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:15 (10 by maintainers)

github_iconTop GitHub Comments

2reactions
joelverhagencommented, Apr 23, 2018

Workaround

Comment out the OutputPath, add the migration, uncomment out the OutputPath, then delete the bin directory.

1reaction
ajcvickerscommented, Jan 29, 2019

@gusmally This issue is fixed in EF Core 2.2.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to change the output folder for migrations with asp.net ...
To do so, you need to explore to your root project folder, eg: C:\project\SampleAPi\ and use this command dotnet ef migrations add DbInitial ......
Read more >
Solution-level `--output` option no longer valid for build- ...
Learn about a breaking change in the .NET 7.0.200 SDK where using the `--output` option is no longer valid when using a solution...
Read more >
Specify an Output Path for a PeopleSoft Job - TechDocs
The OUTDESTPATH specifies the path to an output directory or the path to a printer for a PeopleSoft job.
Read more >
Configuration Reference - Astro Docs
Set the directory that astro build writes your final build to. The value can be either an absolute file system path or a...
Read more >
DSL 2 — Nextflow 23.04.1 documentation
DSL 2 . Nextflow provides a syntax extension that allows the definition of module libraries and simplifies the writing of complex data...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found