Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simple dependency resolution #963

Closed
lgreenlee opened this issue Nov 18, 2016 · 4 comments
Closed

Simple dependency resolution #963

lgreenlee opened this issue Nov 18, 2016 · 4 comments

Comments

@lgreenlee
Copy link

As a developer I would like to add a dependency to a buildable project folder located anywhere on my file system. It should be as simple as providing a path to a folder with a project.json or .csproj file located in its root.

At the moment it not possible to do this in this way - it is overly constraining to require that projects be located in the same file structure in order to be built together.

@DustinCampbell
Copy link
Member

This should be possible with the move to .csproj .NET Core projects. You should be able to specify a project reference to a project outside of the open folder that will be included correctly.

@DustinCampbell
Copy link
Member

I just tried this and it doesn't work like I'd hoped. I'll need to tweak omnisharp-roslyn to make this work.

@DustinCampbell DustinCampbell modified the milestones: 1.9.1, 1.10 Apr 24, 2017
DustinCampbell added a commit to DustinCampbell/omnisharp-roslyn that referenced this issue Apr 24, 2017
Fixes dotnet/vscode-csharp#963

This change adds support for MSBuild project references that point to projects
outside of OmniSharp's path. I've also taken the time to do some long
needed renames (ProjectFileInfo -> MSBuildProject) and move some
MSBuild-specific events from OmniSharp.Abstractions to
OmniSharp.MSBuild.
@bakakaba
Copy link
Contributor

For csproj based projects, it was possible to workaround this by restoring and building using the CLI then rerunning omnisharp.

In versions < 1.9.0 you did not have to add the referenced projects in the solution file but in version 1.9.0, you have to add those projects to the solution file to make it work. The CLI (v1.0.1) does not require the referenced projects to be added to the solution.

@DustinCampbell
Copy link
Member

Thanks for the added detail @cruz82: I understand what happened now. Around December, we introduced a regression into OmniSharp, which caused project references to get added twice -- once for the project, and once for its output binary. This resulted in projects getting ambiguity errors (OmniSharp/omnisharp-roslyn#795, PR: OmniSharp/omnisharp-roslyn#815). However, this regression also had a side effect in that it could handle the scenario that you described.

I'm working on just fixing this properly so that both scenarios work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants