Open PiotrZierhoffer opened 3 years ago
No tweaks to any .csproj
files are needed. I managed to make IntelliSense work on VSCode with 3 things:
$ dotnet --info
.NET SDK (reflecting any global.json):
Version: 5.0.202
Commit: db7cc87d51
Runtime Environment: OS Name: ubuntu OS Version: 20.04 OS Platform: Linux RID: ubuntu.20.04-x64 Base Path: /usr/share/dotnet/sdk/5.0.202/
Host (useful for support): Version: 5.0.5 Commit: 2f740adc14
.NET SDKs installed: 3.1.408 [/usr/share/dotnet/sdk] 5.0.202 [/usr/share/dotnet/sdk]
.NET runtimes installed: Microsoft.AspNetCore.App 3.1.14 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 5.0.5 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App] Microsoft.NETCore.App 3.1.14 [/usr/share/dotnet/shared/Microsoft.NETCore.App] Microsoft.NETCore.App 5.0.5 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
To install additional .NET runtimes or SDKs: https://aka.ms/dotnet-download
You can see your .NET SDKs etc.
The same with mono:
```bash
$ mono --version
Mono JIT compiler version 6.12.0.122 (tarball Mon Feb 22 17:29:18 UTC 2021)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
TLS: __thread
SIGSEGV: altstack
Notifications: epoll
Architecture: amd64
Disabled: none
Misc: softdebug
Interpreter: yes
LLVM: yes(610)
Suspend: hybrid
GC: sgen (concurrent by default)
Set it to use your global mono (in your User
settings). By either adding this JSON line to your config:
"omnisharp.useGlobalMono": "always"
Or just toggle it in the settings:
Renode.sln
. by either adding this JSON line to your local .vscode/settings.json
:"omnisharp.defaultLaunchSolution": "Renode.sln"
Or do it using VSCodes GUI for settings like so (just make sure that you are in the Workspace
tab, otherwise Omnisharp will try to start every C#
project you open in VSCode with a Renode.sln
solution):
After following these 3 steps you should restart VSCode, after that it will probably prompt you about a few problems but you should ignore them, but also agree if its asking to "Restore" some missing dependencies, etc. Open a .cs
file (for example: renode/src/Renode/Network/NetworkServer/NetworkServer.cs
, for it to fully parse the renode
project it needs a few minutes so just wait. When it finished your VSCode should look something like that, with references, authors, etc shown:
and when you hover over a function or ash VSCode to get you to its Definition etc it also should work:
I confirm this works. We'll consider how to put it in our docs, thanks
You can take a look at https://github.com/betrusted-io/xous-core/tree/master/emulation#editing-renode-peripherals
It boils down to creating a specifc csproj that has proper references. I have not tested it, but you might be able to employ this approach if needed.