.Net Framework 4.6.1 omnicharp intellisense abd highlight broken.
See original GitHub issue.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.ReadOnlySpan1<Char> Microsoft.IO.Path.GetFileName(System.ReadOnlySpan
1<Char>)’。
於 Microsoft.Build.Shared.FileMatcher.IsFileNameMatch(String path, String pattern)
於 System.Linq.Enumerable.WhereArrayIterator1.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(ConcurrentStack1 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.<GetFiles>b__1(String _)
於 System.Collections.Concurrent.ConcurrentDictionary2.GetOrAdd(TKey key, Func
2 valueFactory)
於 Microsoft.Build.Shared.FileMatcher.GetFiles(String projectDirectoryUnescaped, String filespecUnescaped, List1 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, IEnumerable1 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.Evaluator4.EvaluateImportElement(String directoryOfImportingFile, ProjectImportElement importElement) 於 Microsoft.Build.Evaluation.Evaluator
4.PerformDepthFirstPass(ProjectRootElement currentProjectOrImport)
於 Microsoft.Build.Evaluation.Evaluator4.EvaluateImportElement(String directoryOfImportingFile, ProjectImportElement importElement) 於 Microsoft.Build.Evaluation.Evaluator
4.PerformDepthFirstPass(ProjectRootElement currentProjectOrImport)
於 Microsoft.Build.Evaluation.Evaluator4.EvaluateImportElement(String directoryOfImportingFile, ProjectImportElement importElement) 於 Microsoft.Build.Evaluation.Evaluator
4.PerformDepthFirstPass(ProjectRootElement currentProjectOrImport)
於 Microsoft.Build.Evaluation.Evaluator4.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, IDictionary2 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, IReadOnlyDictionary2 projectConfigurationsInSolution, IList
1 loggers) 於 D:\a\1\s\src\OmniSharp.MSBuild\ProjectLoader.cs: 行 160
於 OmniSharp.MSBuild.ProjectLoader.BuildProject(String filePath, IReadOnlyDictionary2 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: 行 316
d:\工作\WATCHVES\專案\VES_Web\Working\WatchsoftAms\WatchsoftAms\WatchsoftAms.csproj(0,0)
System.MissingMethodException: 找不到方法: ‘System.ReadOnlySpan1<Char> Microsoft.IO.Path.GetFileName(System.ReadOnlySpan
1<Char>)’。
於 Microsoft.Build.Shared.FileMatcher.IsFileNameMatch(String path, String pattern)
於 System.Linq.Enumerable.WhereArrayIterator1.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(ConcurrentStack1 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.<GetFiles>b__1(String _)
於 System.Collections.Concurrent.ConcurrentDictionary2.GetOrAdd(TKey key, Func
2 valueFactory)
於 Microsoft.Build.Shared.FileMatcher.GetFiles(String projectDirectoryUnescaped, String filespecUnescaped, List1 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, IEnumerable1 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.Evaluator4.EvaluateImportElement(String directoryOfImportingFile, ProjectImportElement importElement) 於 Microsoft.Build.Evaluation.Evaluator
4.PerformDepthFirstPass(ProjectRootElement currentProjectOrImport)
於 Microsoft.Build.Evaluation.Evaluator4.EvaluateImportElement(String directoryOfImportingFile, ProjectImportElement importElement) 於 Microsoft.Build.Evaluation.Evaluator
4.PerformDepthFirstPass(ProjectRootElement currentProjectOrImport)
於 Microsoft.Build.Evaluation.Evaluator4.EvaluateImportElement(String directoryOfImportingFile, ProjectImportElement importElement) 於 Microsoft.Build.Evaluation.Evaluator
4.PerformDepthFirstPass(ProjectRootElement currentProjectOrImport)
於 Microsoft.Build.Evaluation.Evaluator4.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, IDictionary2 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, IReadOnlyDictionary2 projectConfigurationsInSolution, IList
1 loggers) 於 D:\a\1\s\src\OmniSharp.MSBuild\ProjectLoader.cs: 行 160
於 OmniSharp.MSBuild.ProjectLoader.BuildProject(String filePath, IReadOnlyDictionary2 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: 行 316
Attempted to update project that is not loaded: d:\工作\WATCHVES\專案\VES_Web\Working\WatchsoftAms\WatchsoftAms\WatchsoftAms.csproj
OmniSharp log (IF Use Modern Net is True)
Target: d:\工作\WATCHVES\專案\VES_Web\Working\WatchsoftAms\WatchsoftAms
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:
- disable Use Modern Net
- reload omnisharp
- get first Part omnisharp log, is OmniSharp.MSBuild.ProjectManager Attempted to update project that is not loadedr.
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.
Issue Analytics
- State:
- Created a year ago
- Reactions:1
- Comments:10 (6 by maintainers)
Top GitHub Comments
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
omnisharp.path
tolatest
to pull in the rolling developer builds. I will comment back when a new build is available.This will have to wait until next week. Will try to tackle it first thing.