Sourcetrail icon indicating copy to clipboard operation
Sourcetrail copied to clipboard

Support C#/VB.Net

Open linuxuser27 opened this issue 7 years ago • 28 comments

Any thoughts given to supporting the common dotNet languages? With the Rosyln compiler this might be relatively cheap to add to Visual Studio.

linuxuser27 avatar Jun 22 '17 16:06 linuxuser27

+1 by mail

egraether avatar Sep 11 '17 10:09 egraether

+1 via reddit comment

mlangkabel avatar Oct 25 '17 16:10 mlangkabel

"+ 1"

erickhouse avatar Oct 26 '17 20:10 erickhouse

I'd like C# support and am in a position to get the commercial version. I also commented on the request for Python support, but C# would be a higher priority for me.

brianly avatar Oct 27 '17 14:10 brianly

+1 via youtube

egraether avatar Dec 18 '17 12:12 egraether

+1 I waste more time browsing/grepping C# code bases than I should.

aggsol avatar Feb 02 '18 08:02 aggsol

"+ 1"

CommanderPho avatar Feb 23 '18 17:02 CommanderPho

+1 very usefull

ghost avatar Apr 05 '18 18:04 ghost

+1

bsw4p avatar Apr 24 '18 08:04 bsw4p

+1 by mail

egraether avatar May 10 '18 14:05 egraether

+1 by mail

egraether avatar Oct 22 '18 13:10 egraether

Since we cannot keep up with language requests, we created the SourcetrailDB library to allow anyone to write custom indexers and extend language support for Sourcetrail.

If you are interested in writing an indexer for C#, please let us know!

egraether avatar Dec 19 '18 16:12 egraether

Has someone been able to implement C# parsing?

pidgeon777 avatar Jun 20 '19 14:06 pidgeon777

+1

Helco avatar Nov 19 '19 12:11 Helco

+1

.NET Core!

danpeavey-fogbank avatar Nov 20 '19 01:11 danpeavey-fogbank

+1 .NET Core / .NET Standard for cross platforms (android / ios / windows/ linux) Please!

AeonDave avatar Nov 25 '19 14:11 AeonDave

+1

Supern00dle avatar Dec 06 '19 08:12 Supern00dle

.NET Core is a strong platform, would be great to have this support it.

kietdlam avatar Dec 11 '19 04:12 kietdlam

Any update on support for C#?

Imperatorn avatar Aug 31 '20 20:08 Imperatorn

I haven't heard of anyone working on this at the moment.

mlangkabel avatar Sep 01 '20 13:09 mlangkabel

Wanted to inform you that i have just finished my first version of an indexer for .net. https://github.com/packdat/SourcetrailDotnetIndexer It DOES NOT parse C# or VB code, it works on compiled assemblies (so it SHOULD be language-independent in theory). Maybe someone out there finds it useful, even without source-code integration. (which had a low priority for me)

Thank you for making Sourcetrail and SourcetrailDB available !

packdat avatar Feb 06 '21 15:02 packdat

@packdat: Wow! This is awesome! I just gave it a try and indexed the our Sourcetrail Extension for Visual Studio (which is written in c#). I mean, ok, you don't get the locations in the source code, but you get the graph! Look at that:

image

With a tiny change to your sourcecode, I even managed to call the indexer from within Sourcetrail's "Custom Source Group", so one can just click the refresh button to trigger the re-indexing:

image

mlangkabel avatar Feb 15 '21 17:02 mlangkabel

Hello!

I have looking for a software like this for c#. I try to understand a project that is very big, actually there are many solutions and every solution haves many projects, so if you follow the data, it will call a function in another solution that maybe call another solition, it span over multiple solutions and projects. I have been trying to sollow the code but it feel like impossible task. Until i found this, to visualize the code, thank you very very much.

But i have a problem. I dont know how to get it to woek, i get a lot of errors. I have: Download the SourcetrailDotnetIndexer. build it in vs code with no Errors then try to make a new project in Sourcetrail, Custom command source group. And in the custom command i write the path to: SourcetrailDotnetIndexer\SourcetrailDotnetIndexer\bin\Debug\SourcetrailDotnetIndexer.exe -i %{SOURCE_FILE_PATH} -s C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETCore\v5.0

And in the files and directory to index i refer it to the asembly path of a small test api project: API/bin/Debug/net5.0

Please help, i dont know what i doing wrong. And thank you in advance, maybe this is a stupid question from anoob, and i should know better, but i dont know how to get this working even after reading the readme in github.

sourcetrail

andresparrab avatar Jun 29 '21 06:06 andresparrab

I have tried more but i get this in powershell: @mlangkabel how did you change the source code to work with sourcetrail in visual studio and indes with refresh. i cang get this to work at all even from powershell: please help sourcetrail2

andresparrab avatar Jun 29 '21 11:06 andresparrab

Are you using a SourcetrailDB dll that is built for the same architecture (32 vs 64 bit) as your SourcetrailDotnetIndexer.exe?

mlangkabel avatar Jun 29 '21 18:06 mlangkabel

@mlangkabel Hi thank you so much for your reply. You ask if I am using the SourcetrailDB dll that is build for the same architecture? But where do I choose that? Power shell terminal? Or in the Sourcetrail application?

I have use the one here : https://github.com/packdat/SourcetrailDotnetIndexer

it say there: "It uses SourcetrailDB for writing the database. For convenience, the native DLL for SourcetrailDB is already included, so you don't have to build it yourself. Note, the native DLL is a x64 DLL so in your project settings, you have to specify x64 as the target platform as well."

I have build SourcetrailDotnetIndexer with x_64 as the plattform target in Microsoft vs code

I have tried to use the command in sourcetrail application command field, and i have also try to do it from powershell. Probably both way that i am doing it are wrong? i am using .Net 5 and the path to that is C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETCore\v5.0 I have others installed too, as you can see in the screenshot and under \Framework.NETFramework i have : v3.5 v4.0 .and all the way to v4.8 Maybe i am using the wrong path of .NetCore and should use intead .NetFramwork? net01 net02 net03

Did I put the correct info in the fields as you can see in the screenshot in source trail custom group? Could it be possible to have like a screen shot step by step how to? Like how did you do step by step screenshot to get c# solution to work? And will this be able to take on a multiple solution application? Thank you again, maybe if I can get this to work I would be able to understand this big application. And i am sure that many people will benefit for a step by step.

andresparrab avatar Jun 29 '21 20:06 andresparrab

Here are som more screenshot if it helps trouble shooting sourcetrail4 sourcetrail6 sourcetrail7 sourcetrail8 sourcetrail3

andresparrab avatar Jun 30 '21 05:06 andresparrab

@mlangkabel Do you mind sharing a sample C# project with a matching SourceTrail project that is known to work please?

codec-abc avatar Nov 24 '21 11:11 codec-abc