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

Project loading without solution file #634

Closed
wjk opened this issue Sep 12, 2016 · 12 comments
Closed

Project loading without solution file #634

wjk opened this issue Sep 12, 2016 · 12 comments
Assignees
Labels

Comments

@wjk
Copy link

wjk commented Sep 12, 2016

I am trying to write and maintain a fairly large codebase that uses C# *.csproj files. However, since I am doing this on macOS and therefore have no access to “full” Visual Studio, I cannot (easily) write a solution file. The problem is, without a solution file, OmniSharp won’t recognize the *.csproj files. Could OmniSharp be modified to support loading a *.csproj file by itself, one at a time, without needing a solution? (Of course, if a *.csproj file is loaded by itself, its project and assembly references would be recursively parsed to provide IntellliSense.)

@willl
Copy link
Member

willl commented Sep 12, 2016

Maybe try using this to generate an .sln file? https://github.com/sriramgd/create-vs-sln-from-proj-files/

As for your other question, yes, it would be possible to modify Omnisharp to search for .csproj files. In fact I suspect we already have code to do so.

@wjk
Copy link
Author

wjk commented Sep 12, 2016

@willl That won’t work for me, as it doesn’t run on Mac.

@willl
Copy link
Member

willl commented Sep 12, 2016

@wjk Perhaps you could use MonoDevelop/Xamarin Studio to generate a .sln file?

@wjk
Copy link
Author

wjk commented Sep 12, 2016

@willl I really would prefer to avoid using Xamarin Studio if it can be helped, but between this and continuous problems building Xamarin.Mac, I might just have to.

@willl
Copy link
Member

willl commented Sep 17, 2016

Looks like there is a new PR underway to do this: #635

@DustinCampbell DustinCampbell self-assigned this Sep 17, 2016
@DustinCampbell
Copy link
Contributor

yup! #635 should address this

@DustinCampbell
Copy link
Contributor

At least, #635 should address this for OmniSharp. @wjk: it's not clear what editor you're using with OmniSharp from your report. The editor would need to be updated to take advantage of this PR.

@wjk
Copy link
Author

wjk commented Sep 17, 2016

@DustinCampbell It’s VSCode. If I understand properly, all I need to do is set the omnisharp.path VSCode preference to point to an updated version of OmniSharp.

@DustinCampbell
Copy link
Contributor

The C# Extension for VS Code will need to be taught to launch OmniSharp when there's just a folder of .csproj files. Today, it doesn't do that. I'll be updating this code in the next few days after #635 is merged in to take advantage of the changes.

@DustinCampbell
Copy link
Contributor

I just submitted dotnet/vscode-csharp#760 for the VS Code extension to better process launch targets for .csproj files when no .sln is present.

@DustinCampbell
Copy link
Contributor

Re-opening this issue until the change in the omnisharp-vscode repo is merged.

@DustinCampbell
Copy link
Contributor

v1.5-beta1 of the C# extension has been released which can launch OmniSharp on a folder of .csproj files when no .sln file is present.

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

No branches or pull requests

3 participants