handzlikchris / handzlikchris/FastScriptReload

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

Offen
#51 2 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
documentation
Vorherrschende Sprache
C#
Sterne
2.2k
Forks
167
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

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?

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Rechercherichtung

Start by inspecting FastScriptReload.Runtime.csproj and the OmniSharp/MSBuild diagnostic shown in the issue. Determine why the project targets .NET Framework 4.7.1 while 0Harmony requires 4.8, then verify that the reference resolves and OmniSharp loads the project without this error.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
csharp, unity, vscode
Bereich
build-system, devtools
Issue-Typ
Bug
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Muss geklärt werden
Anfängerfreundlichkeit
25/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.