Jump to content
Tuts 4 You

How to build dnspy with dnlib as dependency project


extonoxt

Recommended Posts

I am trying to build dnspy with dnlib as a dependency project in VS2019. So I can debug dnspy and follow whats happening in the dnlib source.

Things I have tried:

1. git clone just dnspy and build using "dotnet build" works. But how can I add dnlib project to dnspy solution in vs2019 and make it build.

2. I also tried the NuGet from vs2019 and install dnlib, but it gets only the dnlib.dll not the entire project.

3. downloaded the dnlib project and added manually to the dnspy sln. it wasnt building at all.

4. dnlib byitself builds fine.

5. dnspy builds fine in git bash shell. Once this is done. the dnspy sln builds fine in vs2019 but only with the dnlib.dll already downloaded by the script.

Any help would be appreciated.

Edited by extonoxt
Link to comment

Hi atom0s,

Thanks. I did

git clone --recursive https://github.com/0xd4d/dnspy.git

and that didnt pull the dnlib.

This is what I did today, still no dnlib

1. no response

592599931_1-10-20204_34_39AM.jpg.3bb685e34a8b1e8d29f5124a6a59e76a.jpg

2. All of the following did not pull the dnlib

1918107599_1-10-20204_35_13AM.jpg.0e110b144da9f4f98e982ce2211d3a70.jpg

 

2067551178_1-10-20204_35_36AM.jpg.9e0cc82ef6486ae4a51f10623053be64.jpg

 

1668016895_1-10-20204_36_01AM.jpg.b6c6dc63bce5696299d556678de0e22f.jpg

 

3. VS2019 shows the dnlib.dll from NuGetI, but dont know how to replace them with the actual project

943499138_1-10-20205_04_37AM.jpg.233b5359008030d79d9dd628cd2a1cd6.jpg

 

 

Link to comment

If they are referenced through nuget then you would have to remove all the nuget references from each project that uses it. Then readd the dnlib project to the solution and add references back to each project that used to have it.

  • Like 1
Link to comment

@atom0s : no offence but you should probably try the advice before giving it..

dnSpy/dnLib/de4dot have switched to SDK-style projects. Removing nuget reference is trivial. Adding dnlib project to the dnspy solution and making it compile is not. There are no build dependencies in SDK-style projects, libraries can (and do) target different platforms and it all is one unholy unmaintainable mess. I spent last hour trying to do what you suggested and I've still failed to make it compile.

If you manage to build it, would you kindly post the required steps so that I can do that too? :)

  • Like 1
Link to comment

kao,

Thank you. I tried that too. There are simply too many references and errors. I dont know how to resolve them. I was able to build de4dot though. There has to be a way.

Edited by extonoxt
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...