Closed Eiim closed 7 months ago
Please let me know if the changes proposed in https://github.com/dnSpyEx/dnSpy/pull/320 solve your problem!
That looks great! One issue that prevents me from more thoroughly testing it: when I build dnSpy, the 32-bit version doesn't even have a debug menu, or a few other features. Am I using the wrong executable, or is there something weird with the build process, or something?
That looks great! One issue that prevents me from more thoroughly testing it: when I build dnSpy, the 32-bit version doesn't even have a debug menu, or a few other features. Am I using the wrong executable, or is there something weird with the build process, or something?
You need to build the entire solution when using Visual Studio with default settings. Clicking the run/debug button in VS will only build dnSpy
main project and all direct references. This is problematic as dnSpy does not use direct references for components like the debugger or decompiler.
If you use Rider the build solution workaround will work but you can also do this automatically by editing the run configuration like so:
Hope this helps!
I'm not using Visual Studio or Rider, I don't even have either installed, I just ran ./build.ps1 -NoMsbuild
per the README instructions.
I'm not using Visual Studio or Rider, I don't even have either installed, I just ran
./build.ps1 -NoMsbuild
per the README instructions.
Oh that' interesting. It should work as the CI uses this exact script and it produces correct artifacts. Does the build log contain any errors or warnings?
There are a few... in the "Building .NET x64 binaries MSBuild version 17.9.8+b34f75857 for .NET" section, there's a few access errors like this:
C:\Program Files\dotnet\sdk\8.0.204\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Publish.targets(351,5): warning MSB3026: Could not copy "C:\Users\ethan\.nuget\packages\microsoft.windowsdesktop.app.runtime.win-x64\8.0.4\runtimes\win-x64\lib\net8.0\System.Drawing.Common.dll" to "..\dnSpy\bin\Release\net8.0-windows\win-x64\publish\System.Drawing.Common.dll". Beginning retry 1 in 1000ms. The process cannot access the file 'C:\Users\ethan\Documents\GitHub\dnSpy\dnSpy\dnSpy\bin\Release\net8.0-windows\win-x64\publish\System.Drawing.Common.dll' because it is being used by another process. [C:\Users\ethan\Documents\GitHub\dnSpy\dnSpy\dnSpy.Console\dnSpy.Console.csproj::TargetFramework=net8.0-windows]
C:\Program Files\dotnet\sdk\8.0.204\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Publish.targets(351,5): warning MSB3026: Could not copy "C:\Users\ethan\.nuget\packages\microsoft.windowsdesktop.app.runtime.win-x64\8.0.4\runtimes\win-x64\lib\net8.0\System.Diagnostics.PerformanceCounter.dll" to "..\..\dnSpy\dnSpy\bin\Release\net8.0-windows\win-x64\publish\System.Diagnostics.PerformanceCounter.dll". Beginning retry 1 in 1000ms. The process cannot access the file 'C:Users\ethan\Documents\GitHub\dnSpy\dnSpy\dnSpy\bin\Release\net8.0-windows\win-x64\publish\System.Diagnostics.PerformanceCounter.dll' because it is being used by another process. [C:\Users\ethan\Documents\GitHub\dnSpy\Extensions\dnSpy.Analyzer\dnSpy.Analyzer.csproj::TargetFramework=net8.0-windows]
C:\Program Files\dotnet\sdk\8.0.204\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Publish.targets(351,5): warning MSB3026: Could not copy "C:\Users\ethan.nuget\packages\microsoft.windowsdesktop.app.runtime.win-x64\8.0.4\runtimes\win-x64\lib\net8.0\System.Diagnostics.PerformanceCounter.dll" to "....\dnSpy\dnSpy\bin\Release\net8.0-windows\win-x64\publish\System.Diagnostics.PerformanceCounter.dll". Beginning retry 1 in 1000ms. The process cannot access the file 'C:Users\ethan\Documents\GitHub\dnSpy\dnSpy\dnSpy\bin\Release\net8.0-windows\win-x64\publish\System.Diagnostics.PerformanceCounter.dll' because it is being used by another process. [C:\Users\ethan\Documents\GitHub\dnSpy\Extensions\dnSpy.Analyzer\dnSpy.Analyzer.csproj::TargetFramework=net8.0-windows]
The files appear to be locked by a different process. Are you sure you do not have an instance of dnSpy running form the output directory already or that any sort of other software is accessing said files?
There definitely wasn't any other dnSpys running. I had a cmd in the root dnSpy directory but that shouldn't affect anything. To be sure, I rebuilt with that window closed to no luck. I'm still not certain exactly which executable I should be running, as best as I can tell there's about eight of them built. However, any dnSpy-x86.exe
seems to simply not run, and any dnSpy.exe
in C:\Users\ethan\Documents\GitHub\dnSpy\dnSpy\dnSpy-x86\
exhibits the above behavior.
Just to make sure, here are the correct output paths for the completely compiled binaries:
.NET Framework:
dnSpy\dnSpy\bin\Release\net48\dnSpy.exe
and dnSpy\dnSpy\bin\Release\net48\dnSpy-x86.exe
for the two different architectures.
.NET 8:
dnSpy\dnSpy\bin\Release\net8.0-windows\win-x64\publish\dnSpy.exe
for the .NET 8 64 bit version.
dnSpy\dnSpy\bin\Release\net8.0-windows\win-x86\publish\dnSpy.exe
for the .NET 8 32 bit version.
Other directories are either temporary and used by the compiler or produce incomplete outputs. Please ensure you are using files from the appropriate directories and that the build log contains not errors. If the errors persist try to reboot your computer and try to build again before opening any other software which could interfere with the directory.
Thank you so much for your work and patience. I can confirm that it works as intended. I was indeed using the wrong location for the 32-bit exe. I was working off the last lines of the build output, which are:
dnSpy -> C:\Users\ethan\Documents\GitHub\dnSpy\dnSpy\dnSpy\bin\Release\net8.0-windows\win-x64\publish\
dnSpy-x86 -> C:\Users\ethan\Documents\GitHub\dnSpy\dnSpy\dnSpy-x86\bin\Release\net8.0-windows\win-x64\dnSpy-x86.dll
dnSpy-x86 -> C:\Users\ethan\Documents\GitHub\dnSpy\dnSpy\dnSpy-x86\bin\Release\net8.0-windows\win-x64\publish\
As such I had completely overlooked dnSpy\dnSpy\bin\Release\net8.0-windows\win-x86\
. It's probably a fairly standard thing but I've never done any .NET development so I was definitely confused by the release structure.
Anyways, I'm super impressed with how well this works, and dnSpyEx in general! Thanks again!
Thank you so much for your work and patience. I can confirm that it works as intended. I was indeed using the wrong location for the 32-bit exe. I was working off the last lines of the build output, which are:
dnSpy -> C:\Users\ethan\Documents\GitHub\dnSpy\dnSpy\dnSpy\bin\Release\net8.0-windows\win-x64\publish\ dnSpy-x86 -> C:\Users\ethan\Documents\GitHub\dnSpy\dnSpy\dnSpy-x86\bin\Release\net8.0-windows\win-x64\dnSpy-x86.dll dnSpy-x86 -> C:\Users\ethan\Documents\GitHub\dnSpy\dnSpy\dnSpy-x86\bin\Release\net8.0-windows\win-x64\publish\
As such I had completely overlooked
dnSpy\dnSpy\bin\Release\net8.0-windows\win-x86\
. It's probably a fairly standard thing but I've never done any .NET development so I was definitely confused by the release structure.Anyways, I'm super impressed with how well this works, and dnSpyEx in general! Thanks again!
Great to hear that you got your build working and that the feature is working well. I went ahead and merged it into master and the CI is currently building the latest version which you can grab from the link below which includes all changes from master and the environment variable editor. https://github.com/dnSpyEx/dnSpy/actions/runs/8869926845
Problem Description
Steam passes environment variables to games. For example, when I run Human Fall Flat, the executable has these (among other) variables to it:
Some games rely on these variables to work properly, especially online functionality.
Proposal
It would be helpful, if, when running Debug Program, a list of environment variables could be passed, similar to how custom arguments can currently be passed.
Alternatives
A debug build can be created for Unity games, and then a debug build run via Steam can be connected to.
Additional Context
No response