-
Notifications
You must be signed in to change notification settings - Fork 676
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
.Net Framework 4.6.1 omnicharp intellisense abd highlight broken. #5352
Comments
@Edemilorhea If your Full Framework project is not using the new SDK-style project. You can using the |
@JoeRobich I wanna try to use try-convert dotnet tool, But this is my project at the work, So idk if i convert it, Can anyone else successfully read it? update: IDK how to change load .sln path, so I move .sln in to next folder ( I don't know can i do this? ) ,anyway it looks like load successful, But it have other wrong still not have intellisense and highlight. No symbol found. File: c:\VES_Web\Working\WatchsoftAms\WatchsoftAms\Controllers\XXXX.cs, Line: 77, Column: 47. |
@Edemilorhea This sounds very odd. If you have Could you share the OmniSharp Log from the Output pane now that you have gotten farther? |
omnisharp.defaultLaunchSolution is not set anything. This is dosen't use modern net:Starting OmniSharp server at 2022/8/26 上午9:40:17 OmniSharp server started with .NET 6.0.400 Starting OmniSharp on Windows 10.0.19045.0 (x64) Adding project 'c:\TC\project\VES_Web\Working\Ves6WebSale\Ves6WebSale\Ves6WebSale.csproj' This is use modern netStarting OmniSharp server at 2022/8/26 上午10:01:07 OmniSharp server started. Starting OmniSharp on Windows 6.2.9200.0 (x64) Attempted to update project that is not loaded: c:\TC\project\VES_Web\Working\Ves6WebSale\Ves6WebSale\Ves6WebSale.csproj |
We are running into this issue dotnet/msbuild#7873 (comment) and looks like Omnisharp-Roslyn needs to update the version of System.Memory they are referencing. |
@JoeRobich Yes, I having try it now, But My Web.config and WatchsoftAms.csproj their System.Memory all the 4.0.1.2 my nuget also is 4.5.5 version. But it still happen "System.ReadOnlySpan |
@Edemilorhea Sorry, the issue is with the version of System.Memory that is referenced by the OmniSharp Language Server which powers the C# extension. Until it gets updated you will continue to see this issue when using newer builds of the VS Build Tools. |
@JoeRobich Oh I just need keep wait extension update? |
Yes, I will look into updating OmniSharp-Roslyn this afternoon to fix this issue. Once it has updated you will be able to set your |
This will have to wait until next week. Will try to tackle it first thing. |
.NET SDK (reflecting any global.json):
Version: 6.0.400
Commit: 7771abd614
執行階段環境:
OS Name: Windows
OS Version: 10.0.22000
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\6.0.400\
global.json file:
Not found
Host:
Version: 6.0.8
Architecture: x64
Commit: 55fb7ef977
.NET SDKs installed:
6.0.302 [C:\Program Files\dotnet\sdk]
6.0.400 [C:\Program Files\dotnet\sdk]
.NET runtimes installed:
Microsoft.AspNetCore.App 6.0.8 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 6.0.6 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.8 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 6.0.6 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 6.0.7 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 6.0.8 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
VScode Version:
Version: 1.70.0 (user setup)
C# extension version: v1.25.0
OmniSharp log (IF Use Modern Net is False)
Failed to load project file 'd:\工作\WATCHVES\專案\VES_Web\Working\WatchsoftAms\WatchsoftAms\WatchsoftAms.csproj'.
System.MissingMethodException: 找不到方法: 'System.ReadOnlySpan
1<Char> Microsoft.IO.Path.GetFileName(System.ReadOnlySpan
1)'。於 Microsoft.Build.Shared.FileMatcher.IsFileNameMatch(String path, String pattern)
於 System.Linq.Enumerable.WhereArrayIterator
1.MoveNext() 於 System.Linq.Buffer
1..ctor(IEnumerable1 source) 於 System.Linq.Enumerable.ToArray[TSource](IEnumerable
1 source)於 Microsoft.Build.Shared.FileMatcher.GetFilesForStep(RecursiveStepResult stepResult, RecursionState recursionState, String projectDirectory, Boolean stripProjectDirectory)
於 Microsoft.Build.Shared.FileMatcher.GetFilesRecursive(ConcurrentStack
1 listOfFiles, RecursionState recursionState, String projectDirectory, Boolean stripProjectDirectory, IList
1 searchesToExclude, Dictionary2 searchesToExcludeInSubdirs, TaskOptions taskOptions) 於 Microsoft.Build.Shared.FileMatcher.GetFilesImplementation(String projectDirectoryUnescaped, String filespecUnescaped, List
1 excludeSpecsUnescaped)於 Microsoft.Build.Shared.FileMatcher.<>c__DisplayClass67_0.b__1(String _)
於 System.Collections.Concurrent.ConcurrentDictionary
2.GetOrAdd(TKey key, Func
2 valueFactory)於 Microsoft.Build.Shared.FileMatcher.GetFiles(String projectDirectoryUnescaped, String filespecUnescaped, List
1 excludeSpecsUnescaped) 於 Microsoft.Build.Internal.EngineFileUtilities.GetFileList(String directoryEscaped, String filespecEscaped, Boolean returnEscaped, Boolean forceEvaluateWildCards, IEnumerable
1 excludeSpecsEscaped, FileMatcher fileMatcher, Object loggingMechanism, IElementLocation includeLocation, IElementLocation excludeLocation, IElementLocation importLocation, BuildEventContext buildEventContext, String buildEventFileInfoFullPath, Boolean disableExcludeDriveEnumerationWarning)於 Microsoft.Build.Internal.EngineFileUtilities.GetFileListEscaped(String directoryEscaped, String filespecEscaped, IEnumerable
1 excludeSpecsEscaped, Boolean forceEvaluate, FileMatcher fileMatcher, Object loggingMechanism, IElementLocation includeLocation, IElementLocation excludeLocation, IElementLocation importLocation, BuildEventContext buildEventContext, String buildEventFileInfoFullPath, Boolean disableExcludeDriveEnumerationWarning) 於 Microsoft.Build.Evaluation.Evaluator
4.ExpandAndLoadImportsFromUnescapedImportExpression(String directoryOfImportingFile, ProjectImportElement importElement, String unescapedExpression, Boolean throwOnFileNotExistsError, List1& imports) 於 Microsoft.Build.Evaluation.Evaluator
4.ExpandAndLoadImportsFromUnescapedImportExpressionConditioned(String directoryOfImportingFile, ProjectImportElement importElement, List1& projects, SdkResult& sdkResult, Boolean throwOnFileNotExistsError) 於 Microsoft.Build.Evaluation.Evaluator
4.ExpandAndLoadImports(String directoryOfImportingFile, ProjectImportElement importElement, SdkResult& sdkResult)於 Microsoft.Build.Evaluation.Evaluator
4.EvaluateImportElement(String directoryOfImportingFile, ProjectImportElement importElement) 於 Microsoft.Build.Evaluation.Evaluator
4.PerformDepthFirstPass(ProjectRootElement currentProjectOrImport)於 Microsoft.Build.Evaluation.Evaluator
4.EvaluateImportElement(String directoryOfImportingFile, ProjectImportElement importElement) 於 Microsoft.Build.Evaluation.Evaluator
4.PerformDepthFirstPass(ProjectRootElement currentProjectOrImport)於 Microsoft.Build.Evaluation.Evaluator
4.EvaluateImportElement(String directoryOfImportingFile, ProjectImportElement importElement) 於 Microsoft.Build.Evaluation.Evaluator
4.PerformDepthFirstPass(ProjectRootElement currentProjectOrImport)於 Microsoft.Build.Evaluation.Evaluator
4.Evaluate() 於 Microsoft.Build.Evaluation.Evaluator
4.Evaluate(IEvaluatorData4 data, Project project, ProjectRootElement root, ProjectLoadSettings loadSettings, Int32 maxNodeCount, PropertyDictionary
1 environmentProperties, ILoggingService loggingService, IItemFactory2 itemFactory, IToolsetProvider toolsetProvider, ProjectRootElementCacheBase projectRootElementCache, BuildEventContext buildEventContext, ISdkResolverService sdkResolverService, Int32 submissionId, EvaluationContext evaluationContext, Boolean interactive) 於 Microsoft.Build.Evaluation.Project.ProjectImpl.Reevaluate(ILoggingService loggingServiceForEvaluation, ProjectLoadSettings loadSettings, EvaluationContext evaluationContext) 於 Microsoft.Build.Evaluation.Project.ProjectImpl.ReevaluateIfNecessary(ILoggingService loggingServiceForEvaluation, ProjectLoadSettings loadSettings, EvaluationContext evaluationContext) 於 Microsoft.Build.Evaluation.Project.ProjectImpl.ReevaluateIfNecessary(EvaluationContext evaluationContext) 於 Microsoft.Build.Evaluation.Project.ProjectImpl.Initialize(IDictionary
2 globalProperties, String toolsVersion, String subToolsetVersion, ProjectLoadSettings loadSettings, EvaluationContext evaluationContext)於 Microsoft.Build.Evaluation.Project..ctor(String projectFile, IDictionary
2 globalProperties, String toolsVersion, String subToolsetVersion, ProjectCollection projectCollection, ProjectLoadSettings loadSettings, EvaluationContext evaluationContext, IDirectoryCacheFactory directoryCacheFactory) 於 Microsoft.Build.Evaluation.ProjectCollection.LoadProject(String fileName, IDictionary
2 globalProperties, String toolsVersion)於 OmniSharp.MSBuild.ProjectLoader.EvaluateProjectFileCore(String filePath, IReadOnlyDictionary
2 projectConfigurationsInSolution, IList
1 loggers) 於 D:\a\1\s\src\OmniSharp.MSBuild\ProjectLoader.cs: 行 160於 OmniSharp.MSBuild.ProjectLoader.BuildProject(String filePath, IReadOnlyDictionary
2 configurationsInSolution) 於 D:\a\1\s\src\OmniSharp.MSBuild\ProjectLoader.cs: 行 84 於 OmniSharp.MSBuild.ProjectFile.ProjectFileInfo.Load(String filePath, ProjectIdInfo projectIdInfo, ProjectLoader loader, Guid sessionId, DotNetInfo dotNetInfo) 於 D:\a\1\s\src\OmniSharp.MSBuild\ProjectFile\ProjectFileInfo.cs: 行 117 於 OmniSharp.MSBuild.ProjectManager.<>c__DisplayClass32_0.<LoadProject>b__0() 於 D:\a\1\s\src\OmniSharp.MSBuild\ProjectManager.cs: 行 305 於 OmniSharp.MSBuild.ProjectManager.LoadOrReloadProject(String projectFilePath, Func
1 loader) 於 D:\a\1\s\src\OmniSharp.MSBuild\ProjectManager.cs: 行 316d:\工作\WATCHVES\專案\VES_Web\Working\WatchsoftAms\WatchsoftAms\WatchsoftAms.csproj(0,0)
System.MissingMethodException: 找不到方法: 'System.ReadOnlySpan
1<Char> Microsoft.IO.Path.GetFileName(System.ReadOnlySpan
1)'。於 Microsoft.Build.Shared.FileMatcher.IsFileNameMatch(String path, String pattern)
於 System.Linq.Enumerable.WhereArrayIterator
1.MoveNext() 於 System.Linq.Buffer
1..ctor(IEnumerable1 source) 於 System.Linq.Enumerable.ToArray[TSource](IEnumerable
1 source)於 Microsoft.Build.Shared.FileMatcher.GetFilesForStep(RecursiveStepResult stepResult, RecursionState recursionState, String projectDirectory, Boolean stripProjectDirectory)
於 Microsoft.Build.Shared.FileMatcher.GetFilesRecursive(ConcurrentStack
1 listOfFiles, RecursionState recursionState, String projectDirectory, Boolean stripProjectDirectory, IList
1 searchesToExclude, Dictionary2 searchesToExcludeInSubdirs, TaskOptions taskOptions) 於 Microsoft.Build.Shared.FileMatcher.GetFilesImplementation(String projectDirectoryUnescaped, String filespecUnescaped, List
1 excludeSpecsUnescaped)於 Microsoft.Build.Shared.FileMatcher.<>c__DisplayClass67_0.b__1(String _)
於 System.Collections.Concurrent.ConcurrentDictionary
2.GetOrAdd(TKey key, Func
2 valueFactory)於 Microsoft.Build.Shared.FileMatcher.GetFiles(String projectDirectoryUnescaped, String filespecUnescaped, List
1 excludeSpecsUnescaped) 於 Microsoft.Build.Internal.EngineFileUtilities.GetFileList(String directoryEscaped, String filespecEscaped, Boolean returnEscaped, Boolean forceEvaluateWildCards, IEnumerable
1 excludeSpecsEscaped, FileMatcher fileMatcher, Object loggingMechanism, IElementLocation includeLocation, IElementLocation excludeLocation, IElementLocation importLocation, BuildEventContext buildEventContext, String buildEventFileInfoFullPath, Boolean disableExcludeDriveEnumerationWarning)於 Microsoft.Build.Internal.EngineFileUtilities.GetFileListEscaped(String directoryEscaped, String filespecEscaped, IEnumerable
1 excludeSpecsEscaped, Boolean forceEvaluate, FileMatcher fileMatcher, Object loggingMechanism, IElementLocation includeLocation, IElementLocation excludeLocation, IElementLocation importLocation, BuildEventContext buildEventContext, String buildEventFileInfoFullPath, Boolean disableExcludeDriveEnumerationWarning) 於 Microsoft.Build.Evaluation.Evaluator
4.ExpandAndLoadImportsFromUnescapedImportExpression(String directoryOfImportingFile, ProjectImportElement importElement, String unescapedExpression, Boolean throwOnFileNotExistsError, List1& imports) 於 Microsoft.Build.Evaluation.Evaluator
4.ExpandAndLoadImportsFromUnescapedImportExpressionConditioned(String directoryOfImportingFile, ProjectImportElement importElement, List1& projects, SdkResult& sdkResult, Boolean throwOnFileNotExistsError) 於 Microsoft.Build.Evaluation.Evaluator
4.ExpandAndLoadImports(String directoryOfImportingFile, ProjectImportElement importElement, SdkResult& sdkResult)於 Microsoft.Build.Evaluation.Evaluator
4.EvaluateImportElement(String directoryOfImportingFile, ProjectImportElement importElement) 於 Microsoft.Build.Evaluation.Evaluator
4.PerformDepthFirstPass(ProjectRootElement currentProjectOrImport)於 Microsoft.Build.Evaluation.Evaluator
4.EvaluateImportElement(String directoryOfImportingFile, ProjectImportElement importElement) 於 Microsoft.Build.Evaluation.Evaluator
4.PerformDepthFirstPass(ProjectRootElement currentProjectOrImport)於 Microsoft.Build.Evaluation.Evaluator
4.EvaluateImportElement(String directoryOfImportingFile, ProjectImportElement importElement) 於 Microsoft.Build.Evaluation.Evaluator
4.PerformDepthFirstPass(ProjectRootElement currentProjectOrImport)於 Microsoft.Build.Evaluation.Evaluator
4.Evaluate() 於 Microsoft.Build.Evaluation.Evaluator
4.Evaluate(IEvaluatorData4 data, Project project, ProjectRootElement root, ProjectLoadSettings loadSettings, Int32 maxNodeCount, PropertyDictionary
1 environmentProperties, ILoggingService loggingService, IItemFactory2 itemFactory, IToolsetProvider toolsetProvider, ProjectRootElementCacheBase projectRootElementCache, BuildEventContext buildEventContext, ISdkResolverService sdkResolverService, Int32 submissionId, EvaluationContext evaluationContext, Boolean interactive) 於 Microsoft.Build.Evaluation.Project.ProjectImpl.Reevaluate(ILoggingService loggingServiceForEvaluation, ProjectLoadSettings loadSettings, EvaluationContext evaluationContext) 於 Microsoft.Build.Evaluation.Project.ProjectImpl.ReevaluateIfNecessary(ILoggingService loggingServiceForEvaluation, ProjectLoadSettings loadSettings, EvaluationContext evaluationContext) 於 Microsoft.Build.Evaluation.Project.ProjectImpl.ReevaluateIfNecessary(EvaluationContext evaluationContext) 於 Microsoft.Build.Evaluation.Project.ProjectImpl.Initialize(IDictionary
2 globalProperties, String toolsVersion, String subToolsetVersion, ProjectLoadSettings loadSettings, EvaluationContext evaluationContext)於 Microsoft.Build.Evaluation.Project..ctor(String projectFile, IDictionary
2 globalProperties, String toolsVersion, String subToolsetVersion, ProjectCollection projectCollection, ProjectLoadSettings loadSettings, EvaluationContext evaluationContext, IDirectoryCacheFactory directoryCacheFactory) 於 Microsoft.Build.Evaluation.ProjectCollection.LoadProject(String fileName, IDictionary
2 globalProperties, String toolsVersion)於 OmniSharp.MSBuild.ProjectLoader.EvaluateProjectFileCore(String filePath, IReadOnlyDictionary
2 projectConfigurationsInSolution, IList
1 loggers) 於 D:\a\1\s\src\OmniSharp.MSBuild\ProjectLoader.cs: 行 160於 OmniSharp.MSBuild.ProjectLoader.BuildProject(String filePath, IReadOnlyDictionary
2 configurationsInSolution) 於 D:\a\1\s\src\OmniSharp.MSBuild\ProjectLoader.cs: 行 84 於 OmniSharp.MSBuild.ProjectFile.ProjectFileInfo.Load(String filePath, ProjectIdInfo projectIdInfo, ProjectLoader loader, Guid sessionId, DotNetInfo dotNetInfo) 於 D:\a\1\s\src\OmniSharp.MSBuild\ProjectFile\ProjectFileInfo.cs: 行 117 於 OmniSharp.MSBuild.ProjectManager.<>c__DisplayClass32_0.<LoadProject>b__0() 於 D:\a\1\s\src\OmniSharp.MSBuild\ProjectManager.cs: 行 305 於 OmniSharp.MSBuild.ProjectManager.LoadOrReloadProject(String projectFilePath, Func
1 loader) 於 D:\a\1\s\src\OmniSharp.MSBuild\ProjectManager.cs: 行 316Attempted to update project that is not loaded: d:\工作\WATCHVES\專案\VES_Web\Working\WatchsoftAms\WatchsoftAms\WatchsoftAms.csproj
OmniSharp log (IF Use Modern Net is True)
OmniSharp server started with .NET 6.0.400
.
Path: c:\Users\leon8.vscode\extensions\ms-dotnettools.csharp-1.25.0-win32-x64.omnisharp\1.39.0-net6.0\OmniSharp.dll
PID: 13860
d:\工作\WATCHVES\專案\VES_Web\Working\WatchsoftAms\WatchsoftAms\WatchsoftAms.csproj
C:\Program Files\dotnet\sdk\6.0.400\Microsoft.CSharp.CurrentVersion.targets(129,9): Error: 找不到規則集檔案 "ManagedMinimumRules.ruleset"。
Received response for /findusages but could not find request.
Received response for /v2/getcodeactions but could not find request.
Steps to reproduce
first case:
1.enable Use Modern Net
2.reload omnisharp
3. get second Part omnisharp log, is Microsoft.CSharp.CurrentVersion.targets(129,9): Error: 找不到規則集檔案 "ManagedMinimumRules.ruleset"。
4. go to controller type something will omnisharp will report Received response for /findusages but could not find request. and Received response for /v2/getcodeactions but could not find request.
Expected behavior
success load project IntelliSense and highlight is working
Actual behavior
My project is .Net framework v4.6.1, So I think I should be disable UseModernNet, But it loading the project will fail.
I tried to enable UseModernNet , It will load project success but it will not found ManagedMinimumRules.ruleset, and type something will not find request.
The text was updated successfully, but these errors were encountered: