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

dotnet cli and all tooling 1.0.0 support #294

Open
johnhidey opened this issue Mar 12, 2017 · 5 comments
Open

dotnet cli and all tooling 1.0.0 support #294

johnhidey opened this issue Mar 12, 2017 · 5 comments

Comments

@johnhidey
Copy link

With the announcement recently that the dotnet tooling has went 1.0.0 are there plans to added in support for this. Currently, I'm unable to build a project without a makefile present.

all:
    dotnet build

It could be that I am doing something wrong, but I have never been able to get this to work without the makefile. Any insight into this

@markwoodhall
Copy link
Contributor

markwoodhall commented Mar 12, 2017 via email

@johnhidey
Copy link
Author

Thanks @markwoodhall, I'll give that a try. I'm fairly new to vim and have been loving it. Left visual studio behind about 3 months ago and haven't looked back yet. Keep up the great work on this project.

@markwoodhall
Copy link
Contributor

To give a bit more info, I do something like this:

autocmd BufNewFile,BufRead *.cs setlocal errorformat=\ %#%f(%l\\\,%c):\ %m
autocmd BufNewFile,BufRead *.cs setlocal makeprg=dotnet\ build\ /property:GenerateFullPaths=true

@johnhidey
Copy link
Author

Thanks @markwoodhall

Here is what I am using and seems to be doing the trick, but I do like the way you have done it a little better using the BufNewFile and BufRead. I'll make that change.

autocmd FileType cs let &makeprg="dotnet build"

I do have a few questions if you wouldn't mind helping out a newbie.

My setup is as follows.

  • ctrlp.vim
  • syntastic
  • vim-dispatch
  • youcompleteme

Intellisense is working great, but not all the other commands. Some of the other commands like Code Actions will throw an exception.

Error detected while processing function <SNR>92_AcceptSelection[27]..ctrlp#OmniSharp#findcodeactions#accept:
line    3:                                                                                                                                       
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/johnhidey/.vim/bundle/omnisharp-vim/python/OmniSharp.py", line 94, in runCodeAction
    text = json.loads(js)['Text']
  File "/usr/lib/python2.7/json/__init__.py", line 339, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python2.7/json/decoder.py", line 364, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python2.7/json/decoder.py", line 382, in raw_decode
    raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded
E858: Eval did not return a valid python object

I would be grateful for any help you might be able to provide.

@JasonThomasData
Copy link

JasonThomasData commented Aug 4, 2017

I might just add that OmniSharp will work fine without this, all you need is to use the dotnet new sln --name <NAME> command, since OmniSharpServer needs that .sln file.
I thought I'd mention this in case there's any plans to support the dotnet cli, since this is my favourite feature of it so far. Sorry if this is slightly off topic but I wanted to make a mention of this.
Info about this handy trick is here - https://andrewlock.net/creating-and-editing-solution-files-with-the-net-cli/

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

No branches or pull requests

3 participants