Skip to content

升級至 .NET 8 並解決相容性問題#1

Merged
ChengBoChuan merged 1 commit intomasterfrom
Fix-修改mod檔案
Oct 26, 2025

Hidden character warning

The head ref may contain hidden characters: "Fix-\u4fee\u6539mod\u6a94\u6848"
Merged

升級至 .NET 8 並解決相容性問題#1
ChengBoChuan merged 1 commit intomasterfrom
Fix-修改mod檔案

Conversation

@ChengBoChuan
Copy link
Owner

This pull request updates the project to improve compatibility with .NET 8 and ensures reference resolution works correctly while avoiding issues with the post-processing step. It also updates the project's GitHub link and adjusts build metadata.

.NET 8 migration and build configuration:

  • Modified InfiniteDemand.csproj to only import Mod.props and skip Mod.targets to avoid ModPostProcessor issues that may arise with .NET 8. Added a property to explicitly skip running the ModPostProcessor.
  • Set the target framework to net8.0 in InfiniteDemand.csproj to ensure compatibility with .NET 8.

Project metadata and links:

  • Updated the GitHub URL in PublishConfiguration.xml to point to the new repository location.
  • Updated the build/process identifier in ilpp.pid, likely reflecting a new build or process state.- 在 InfiniteDemand.csproj 中:
    • 更新目標框架為 .NET 8,並設定語言版本為最新。
    • 跳過匯入 Mod.targets,避免與 .NET 8 的 ModPostProcessor 問題。
    • 新增 <RunModPostProcessor>false</RunModPostProcessor>
  • ilpp.pid 中:

    • 將數值從 13112 修改為 17400
  • PublishConfiguration.xml 中:

    • 更新 GitHub 外部連結至新的儲存庫。
    • 新增註解,說明此版本基於 .NET 8 建置以提升效能與相容性。

- 在 `InfiniteDemand.csproj` 中:
  - 更新目標框架為 .NET 8,並設定語言版本為最新。
  - 跳過匯入 `Mod.targets`,避免與 .NET 8 的 `ModPostProcessor` 問題。
  - 新增 `<RunModPostProcessor>false</RunModPostProcessor>`。

- 在 `ilpp.pid` 中:
  - 將數值從 `13112` 修改為 `17400`。

- 在 `PublishConfiguration.xml` 中:
  - 更新 GitHub 外部連結至新的儲存庫。
  - 新增註解,說明此版本基於 .NET 8 建置以提升效能與相容性。
@ChengBoChuan ChengBoChuan requested a review from Copilot October 26, 2025 22:59
@ChengBoChuan ChengBoChuan merged commit 6945bb6 into master Oct 26, 2025
@ChengBoChuan ChengBoChuan deleted the Fix-修改mod檔案 branch October 26, 2025 23:00
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR migrates the InfiniteDemand mod to .NET 8 by updating the project configuration to target net8.0 and resolving compatibility issues with the game's build tooling. The changes avoid ModPostProcessor execution which may not be compatible with .NET 8, while maintaining proper reference resolution through selective import of build props.

  • Modified .csproj to target .NET 8 and skip Mod.targets/ModPostProcessor to avoid compatibility issues
  • Updated GitHub repository URL to reflect new location
  • Updated build process identifier in ilpp.pid

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
InfiniteDemand/InfiniteDemand.csproj Updated to target .NET 8, commented out Mod.targets import, and explicitly disabled ModPostProcessor
InfiniteDemand/Properties/PublishConfiguration.xml Updated GitHub external link to new repository location
InfiniteDemand/Library/ilpp.pid Updated process identifier from 13112 to 17400

<TargetFramework>net8.0</TargetFramework>
<LangVersion>latest</LangVersion>
<GenerateDependencyFile>false</GenerateDependencyFile>
<!--Skip ModPostProcessor which may not be compatible with .NET 8-->
Copy link

Copilot AI Oct 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment states ModPostProcessor 'may not be compatible' with .NET 8, but this is speculative without concrete evidence. Consider documenting the specific incompatibility encountered (e.g., error message, behavior) or noting this is a preventive measure pending verification of .NET 8 compatibility.

Suggested change
<!--Skip ModPostProcessor which may not be compatible with .NET 8-->
<!--Preventively skip ModPostProcessor: .NET 8 compatibility has not been verified as of this release. If you encounter issues, please document the specific error here.-->

Copilot uses AI. Check for mistakes.
</PropertyGroup>

<!--Imports must be after PropertyGroup block-->
<!--Only import Mod.props for reference resolution, skip Mod.targets to avoid ModPostProcessor issues with .NET 8-->
Copy link

Copilot AI Oct 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Commenting out the Mod.targets import may cause build functionality loss beyond just ModPostProcessor. The comment should clarify what build steps/targets are being skipped and document any manual workarounds required (e.g., missing MSBuild tasks for PDX publishing, deployment steps). Consider whether critical build targets from Mod.targets need to be manually replicated.

Suggested change
<!--Only import Mod.props for reference resolution, skip Mod.targets to avoid ModPostProcessor issues with .NET 8-->
<!--
Only import Mod.props for reference resolution.
Mod.targets is NOT imported to avoid ModPostProcessor issues with .NET 8.
By skipping Mod.targets, the following build steps/targets are NOT run:
- ModPostProcessor (custom post-build step, incompatible with .NET 8)
- PDX publishing/deployment MSBuild targets (e.g., tasks for packaging and uploading to Paradox Mods)
- Any other custom build steps defined in Mod.targets
Manual workarounds required:
- If publishing to Paradox Mods, use the Paradox launcher or upload manually.
- Deployment: Copy output DLLs to the mod folder manually as needed.
- If any other build steps from Mod.targets are required, replicate them manually in this .csproj.
Re-enable the Mod.targets import ONLY if all targets are compatible with .NET 8.
-->

Copilot uses AI. Check for mistakes.
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.

3 participants