project-system icon indicating copy to clipboard operation
project-system copied to clipboard

project.OutputFilePath is null

Open KevinRansom opened this issue 9 years ago • 11 comments

@jmarolf

We retrieve a project following the ProjectAdded workspace event.

At this time the OutputFilePath property is null

@KevinH-MS has also seen this behavior.

Is this expected behavior.

KevinRansom avatar Oct 12 '17 20:10 KevinRansom

We currently only populate immediate output path after the first design-time build - it comes with the compiler arguments.

davkean avatar Oct 12 '17 20:10 davkean

I'm seeing in the latest d15prerel bits that it often stays null even after doing an explicit full build of the solution.

halverson-dev avatar Oct 12 '17 20:10 halverson-dev

Explicit full builds have no effect on a design-time build.

Can you turn on design-time build logging https://github.com/dotnet/project-system/blob/master/docs/design-time-builds.md#visual-studio-2017 and tell me if you are seeing the CompileDesignTime target being run for the project before you query it?

davkean avatar Oct 12 '17 21:10 davkean

And if this isn't a CPS project? (do the same steps to collect logs still work?)

halverson-dev avatar Oct 13 '17 04:10 halverson-dev

In the same document has steps. If it is legacy, I wonder if it's new batched design time builds...

davkean avatar Oct 13 '17 04:10 davkean

If I set TRACEDESIGNTIME=true, no logs are produced in %temp% when the issue repros. If I close and open VS a couple times, eventually the issue goes away and logs are produced. Thoughts on what to try next?

halverson-dev avatar Oct 13 '17 04:10 halverson-dev

If I delete the .vs folder and re-open, the issue comes back.

halverson-dev avatar Oct 13 '17 04:10 halverson-dev

If this is a legacy project pull in a Roslyn IDE dev and SvetKere I suspect behavior difference due to batched design-time builds.

davkean avatar Oct 13 '17 05:10 davkean

Thanks @davkean I've started a thread and opened a VSO bug for the VS IDE team. Leaving this issue open, because it sounds like there may be a separate issue affecting F#/CPS.

halverson-dev avatar Oct 13 '17 23:10 halverson-dev

The F# issue looks like a different issue, where Roslyn's CPSProject doesn't update the workspace when the output path changes (and it's initially populated with null based on just an evaluation.

Pilchie avatar Oct 17 '17 18:10 Pilchie

Moved to https://github.com/dotnet/roslyn/issues/22732

Pilchie avatar Oct 17 '17 18:10 Pilchie