diff --git a/CHANGELOG.md b/CHANGELOG.md index f1ad1e0f84..ced2ed00db 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ All changes to the project will be documented in this file. ## [1.35.4] - Not yet released * Added LSP handler for the `workspace/symbol` request. (PR: [#1799](https://github.com/OmniSharp/omnisharp-roslyn/pull/1799)) +* Use global MSBuild property when resetting target framework ([#1738](https://github.com/OmniSharp/omnisharp-roslyn/issues/1738), PR: [#1846](https://github.com/OmniSharp/omnisharp-roslyn/pull/1846)) * Do not use Visual Studio MSBuild if it doesn't have .NET SDK resolver ([#1842](https://github.com/OmniSharp/omnisharp-roslyn/issues/1842), [#1730](https://github.com/OmniSharp/omnisharp-roslyn/issues/1730), PR: [#1845](https://github.com/OmniSharp/omnisharp-roslyn/pull/1845)) ## [1.35.3] - 2020-06-11 diff --git a/src/OmniSharp.MSBuild/ProjectLoader.cs b/src/OmniSharp.MSBuild/ProjectLoader.cs index a6b882abaf..2e6050f805 100644 --- a/src/OmniSharp.MSBuild/ProjectLoader.cs +++ b/src/OmniSharp.MSBuild/ProjectLoader.cs @@ -148,7 +148,7 @@ private static void SetTargetFrameworkIfNeeded(MSB.Evaluation.Project evaluatedP // For now, we'll just pick the first target framework. Eventually, we'll need to // do better and potentially allow OmniSharp hosts to select a target framework. targetFramework = targetFrameworks[0]; - evaluatedProject.SetProperty(PropertyNames.TargetFramework, targetFramework); + evaluatedProject.SetGlobalProperty(PropertyNames.TargetFramework, targetFramework); evaluatedProject.ReevaluateIfNecessary(); } }