Skip to content

feat(console): Add Linux build for dnSpyEx.Console - #522

Open
yukieiji wants to merge 16 commits into
dnSpyEx:masterfrom
yukieiji:feat/linux-build
Open

yukieiji wants to merge 16 commits into
dnSpyEx:masterfrom
yukieiji:feat/linux-build

Conversation

@yukieiji

Copy link
Copy Markdown

Link to issue(s) this pull request covers:

Problem

Currently, dnSpyEx.Console is only available for Windows. This restricts its availability on Linux-based systems, preventing automated tools, CI/CD pipelines, and modern Linux-hosted AI agents from easily running and interacting with dnSpyEx via CLI.

Solution

  • Added build/publish support for dnSpyEx.Console targeting Linux environments.
  • Enables seamless CLI inspection and execution on Linux setups, facilitating easier integration with AI agents and command-line automation tools operating on Linux.

Note: This change focuses almost entirely on project config and doesn't introduce major modifications to existing codebase/logic.

  • Added clarifying comments for code that are unreachable on Linux.
  • Made minor adjustments to bypass Windows Forms ResX dependencies so the console can compile and run on Linux.

google-labs-jules Bot and others added 16 commits July 25, 2026 13:30
- Modified DnSpyCommon.props and Directory.Build.props to support cross-platform net10.0 target for dnSpy.Console and its decompiler dependencies.
- Updated dnSpy.Console.csproj and dnSpy.Decompiler.csproj to use Microsoft.NET.Sdk and conditionally configure WPF/WinForms only on Windows.
- Added preprocessor-conditional fallback for ResXResourceWriter in ResXResourceFileWriter.cs to allow compiling and writing resx files on Linux.
- Updated build.ps1 and GitHub Actions CI workflow to support building and packaging net-linux platform target.
- Modified DnSpyCommon.props and Directory.Build.props to support cross-platform net10.0 target for dnSpy.Console and its decompiler dependencies.
- Fix CI error NETSDK1082 by dynamically setting DnSpyRuntimeIdentifiers to linux-x64 only when the current target framework is net10.0.
- Updated dnSpy.Console.csproj and dnSpy.Decompiler.csproj to use Microsoft.NET.Sdk and conditionally configure WPF/WinForms only on Windows.
- Added preprocessor-conditional fallback for ResXResourceWriter in ResXResourceFileWriter.cs to allow compiling and writing resx files on Linux.
- Updated build.ps1 and GitHub Actions CI workflow to support building and packaging net-linux platform target.
…17604809463960779940

Enable Linux builds for dnSpy.Console
… builds

This commit resolves MSBuild warning MSB3270 during Linux cross-platform
builds where dnSpy.Console (targeting AnyCPU/MSIL) references
dnSpy.Contracts.Logic and dnSpy.Decompiler.

By conditionally specifying PlatformTarget=AnyCPU when the target
framework is net10.0, we ensure that both referenced class libraries
are built as AnyCPU (MSIL) rather than defaulting to the host's x64 (AMD64)
architecture, thereby aligning the target architecture and eliminating
the mismatch warning. This is scoped strictly to TargetFramework=net10.0
to completely avoid any unintended impact on Windows builds.
Fix MSB3270 Processor Architecture Mismatch for Linux net10.0 Builds
…tLinux

Specify -p:PublishDir="$publishDir/" explicitly during the Linux publish step to ensure that files are placed into the correct output directory ($net_baseoutput/net10.0-linux/publish) instead of the default location. This fixes the CI artifact upload and prevents conflicts with the Windows builds.
…18647646537269

Fix Build-NetLinux output and CI paths conflict
When invoking dotnet publish or msbuild with PublishDir, the target path is resolved relative to the csproj file directory, causing output to land in an unintended subdirectory.
Resolving $publishDir to an absolute path ($absolutePublishDir) fixes the destination and ensures subsequent copying of extension DLLs works correctly in CI.
Explicitly pass -p:PublishDir="$publishDir/" resolving directly via "$PSScriptRoot" to ensure that the publish directory is an absolute path. This guarantees that msbuild/dotnet publish writes to the correct target directory ($net_baseoutput\net10.0-linux\publish) in both local and CI environments.
…18647646537269

Fix/net linux publish path 12680118647646537269
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant