How to attach library source to JetBrains Rider - jetbrains-ide

How can I attach the library source, such as MySql.Data.dll (source code file:mysql-connector-net-6.9.9-src.zip), to the IDE?
When I Ctrl + Click the library class, it decompiles the dll file automatically, but I want to attach the source code to it.

This is not possible. Rider will always either decompile sources or download sources from a symbol server.

Related

Embed *.pdb files in managed library with Visual Studio 2022 17.1

The 17.1 update for Visual Studio 2022 recently hit and one of the added functionalities is:
When building managed libraries developers can choose to embed their source files with the debug information (PDB file) that is produced by the build, and even embed the PDB file into the assembly itself. We now surface embedded source as part of Go to Definition if a referenced assembly has embedded source and the PDB is available. This allows you to navigate to the original source files that declare the target symbol. Place your cursor on a symbol and press F12 to navigate to the original source file.
However I can't find anything on how to do that.
Does anyone know?
In addition, if I want to publish a package to NuGet and make it so anyone who adds that package to their solution can debug my package's code, do I only need to embed the PDBs or is something more required?
Turns out it's an option found in project properties:

Opened project in android studio and all packages/symbols are marked as incorrect

I am trying to contribute to my first open source project but after forking and cloning from the repo, all files are marked as an error.
Sample error
This is after selecting a source folder.
Current project source
Under package it says: package name does not correspond to filepath
... but I have this
misnamed packages?
Android studio isn't picking up those libraries.
IME there are 2 ways of importing these (I have only had success with the first):
1) copy the source parallel to your own (ie example.com)
2a) include the jar in a libs folder and tell AS to look out for it. (right click will typically provide a good option that I can't recall)
2b) because Android can struggle (ie I couldn't do it, though inroads may have been made since) with importing jars, you may need to use AAR's (android library packages, Android Archive Library (aar) vs standard jar)
However, because this is an open source project, this should all be handled auto-magically for you via the gradle scripts included in the distro.

What's the best way to debug a nuget package with its souce code?

I'm using a NuGet package in my project and sometimes I need to debug into the source code.
The NuGet package itself is open sourced on github.com so its source code can be downloaded as well. I can build and generate .dlls on my local computer.
But during my debugging, I can see the function names of the package, and even the file path of the source code (or course it's from someone else's computer), but it's grayed out and I can not double click to go into the source code. I checked the right-click menu, there's no way to load symbols there.
In this case, how can I let visual studio load the debug symbols so I can debug into the package's source code?
My understanding is that you install the specific package in your project, if you want to debug the package in your project, you could add the source file to the solutions Common Properties -> Debug Source Files list.
If you download the source code of the package and open/compile it in your VS, I think you could refer them manually to your previous project, and then debug it directly like add breakpoint or others as general class library project.
Reference:
How to debug using Nuget source code
How to debug into my nuget package deployed from TeamCity?

Get intellisense data for uncompiled projects

I inherited a project setup from a previous programmer. He used to develop for linux, but instead of coding directly in ubuntu, he shared the drives with samba and used Visual Studio to edit the files.
Now I can't compile this project in Visual Studio directly obviously, so I can't get data for intellisense and such. Would it be possible to associate symbols without compiling?
I know that what I ask seems counter intuitive, but Vim plugin OmniCPP does not come with a compiler and yet, is able to provide code completition up to a certain degree.
The commercial addin Visual Assist X can help. How well it helps is dependent upon how much information it can get from the project (if one exists): things like source files, header files and include directories. If no project is being used, you can create a dummy project just as a container to associate source and header files (not for compiling).

Creating a static library with the Visual C++ 6 compiler instead of a dynamic library (DLL)

I am able to create a DLL, but I want it to compile into a .lib file using Visual C++ 6 (commmad line).
Any ideas?
Use a 'Win32 Static Library' project for that.
When you create a new project you have the option to create a Win32 Static Library.
Having just created one to check the options I see that the tabs on the project settings dialog are different to those for DLL project.
Your best bet is to create a new project and copy the source files across. If you need the code to compile into both then you'll need to create the projects in the same directory (but with different names) or link the source from one directory to the other.

Resources