handzlikchris / handzlikchris/FastScriptReload

Visual Studio Code: Omnisharp can't resolve primary reference "0Harmony"

オープン
#51 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る
documentation
主要言語
C#
スター
2.2k
フォーク
167
PR マージ指標
30日以内にマージされた PR はありません

説明

I'm using Visual Studio Code and Omnisharp complains that it cannot resolve "0Harmony" because it was built against a different framework version (v4.8) than the currently targeted one (v4.7.1):
```
[info]: OmniSharp.MSBuild.ProjectManager
Successfully loaded project file 'c:\dev\unity\Simulator\FastScriptReload.Runtime.csproj'.
c:\dev\unity\Simulator\FastScriptReload.Runtime.csproj
C:\Program Files\dotnet\sdk\7.0.103\Microsoft.Common.CurrentVersion.targets(2352,5): Error: The primary reference "0Harmony" could not be resolved because it was built against the ".NETFramework,Version=v4.8" framework. This is a higher version than the currently targeted framework ".NETFramework,Version=v4.7.1".
```
Some more info:

- **FastScriptReload 1.4-rc1**
- **Unity 2022.2.10**
- **Visual Studio Code**
Version: 1.77.0 (system setup)
Commit: 7f329fe6c66b0f86ae1574c2911b681ad5a45d63
Date: 2023-03-29T10:02:16.981Z
Electron: 19.1.11
Chromium: 102.0.5005.196
Node.js: 16.14.2
V8: 10.2.154.26-electron.0
OS: Windows_NT x64 10.0.19045
Sandboxed: Yes
- **Visual Studio Code C# Extension**
Id: ms-dotnettools.csharp
Description: C# for Visual Studio Code (powered by OmniSharp).
Version: 1.25.4
Publisher: Microsoft
VS Marketplace Link: https://marketplace.visualstudio.com/items?itemName=ms-dotnettools.csharp

Is there any way to resolve this issue?

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

調査の方向性

まず FastScriptReload.Runtime.csproj と、issue に表示されている OmniSharp/MSBuild の診断を調べます。0Harmony が 4.8 を必要としている一方で、プロジェクトが .NET Framework 4.7.1 を対象としている理由を特定し、その後、参照が解決され、OmniSharp がこのエラーなしでプロジェクトを読み込むことを確認します。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
csharp, unity, vscode
領域
build-system, devtools
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
25/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。