Skip to content

Conversation

@KevinRansom
Copy link
Contributor

Multi-targeting doesn't work correctly in the F# IDE.

Relies on this Project System PR: dotnet/project-system#3198

The reason is the IDE doesn't know how to identify the correct cached references and source files. Currently it uses the project file name, this is insufficient because in a multi-targeting project there is in fact an in memory project for each target framework.
The project tracker can identify the correct in memory project using the binpath of the project output file. In the project system the context object also identifies the binpath for the project being "design-time" built.

This change modifies the CommandLine notification to send the binpath rather than the project path.

The code can handle the existing behavior of the CommandLine If the binpath doesn't find a project, it then tries the project file name. And behaves the same as before.

Kevin

@KevinRansom KevinRansom requested review from TIHan and brettfo January 30, 2018 19:09
Copy link
Member

@brettfo brettfo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit: pending ship room approval

@cartermp
Copy link
Contributor

cartermp commented Jan 30, 2018

Link #4084 - I suspect that this will be difficult for OSS folks to test.

@ctaggart and @eiriktsarpalis, can you help provide some examples of things you'd like to do so that we can test those scenarios prior to merging?

@ctaggart
Copy link
Contributor

Here is an open source one I just created. I can't set a breakpoint in Froto.Parser if I make it multi-targeting. Try running Froto.Compiler and setting a breakpoint anywhere in Froto.Parser.

git clone -b TargetFrameworks https://github.com/ctaggart/froto.git
dotnet restore .\Froto.sln
.\Froto.sln

@KevinRansom
Copy link
Contributor Author

@ctaggart
With Fixes:
image

Shipped version:
image

@eiriktsarpalis
Copy link
Member

I think fixing intellisense and debugging are the main blockers for me.

Another issue is that net4x projects using the new project structure lose the ability to do certain useful things such as "Send references to F# Interactive" or "Send Project output to F# Interactive". Would be nice to get this back eventually.

@brettfo brettfo merged commit 923f42c into dotnet:dev15.6 Jan 31, 2018
@KevinRansom KevinRansom deleted the fixmultitargetting branch May 31, 2018 02:06
nosami pushed a commit to xamarin/visualfsharp that referenced this pull request Jan 26, 2022
* Fix multi-targetting

* Refactor

* address project relative paths
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants