samedi 23 février 2019

OmniSharp not functioning properly in one project but is in another

I have two identical projects that I am using to create a full stack Ember web-ui with .NET Core JSON API. I notice that in one project, OmniSharp is not providing the include using statement, but it does in the other project. Additionally, for the project where OmniSharp does not provide the include using statement, OmniSharp does provide an option to remove unused usings. When I select this option, it removes all but two using statements, which is incorrect because now the application will not build.

I tried uninstalling VSCode and deleting the .vscode folder in the C:\windows\users path, which contains the installed extensions, as well as deleting all temp files. However, this does not solve the problem.

Considering that OmniSharp works in one project, but not the other, then the only thing that I can think of at this point is that either OmniSharp is configured at the project level or there is a corruption in the given project. Has anyone ever experienced this problem? Any ideas on how I can address/fix this?

Note: I would hate to delete the project that OmniSharp does not work in because it would take about a week to rebuild it.

Update:

After additional research, I found the following error in the OmniSharp Log

The project system 'OmniSharp.Script.ScriptProjectSystem' threw exception during initialization. System.IO.DirectoryNotFoundException: Could not find a part of the path 'd:...\tmp\broccoli_merge_trees-input_base_path-YLNtHXfX.tmp\1-private'. at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.FileSystemEnumerableIterator1.CommonInit() at System.IO.FileSystemEnumerableIterator1..ctor(String path, String originalUserPath, String searchPattern, SearchOption searchOption, SearchResultHandler1 resultHandler, Boolean checkHost) at System.IO.DirectoryInfo.EnumerateFileSystemInfos(String searchPattern, SearchOption searchOption) at Microsoft.Extensions.FileSystemGlobbing.Abstractions.DirectoryInfoWrapper.<EnumerateFileSystemInfos>d__4.MoveNext() at System.Collections.Generic.List1.InsertRange(Int32 index, IEnumerable`1 collection) at Microsoft.Extensions.FileSystemGlobbing.Internal.MatcherContext.Match(DirectoryInfoBase directory, String parentRelativePath) at Microsoft.Extensions.FileSystemGlobbing.Internal.MatcherContext.Match(DirectoryInfoBase directory, String parentRelativePath) at Microsoft.Extensions.FileSystemGlobbing.Internal.MatcherContext.Match(DirectoryInfoBase directory, String parentRelativePath) at Microsoft.Extensions.FileSystemGlobbing.Internal.MatcherContext.Match(DirectoryInfoBase directory, String parentRelativePath) at Microsoft.Extensions.FileSystemGlobbing.Internal.MatcherContext.Match(DirectoryInfoBase directory, String parentRelativePath) at Microsoft.Extensions.FileSystemGlobbing.Internal.MatcherContext.Match(DirectoryInfoBase directory, String parentRelativePath) at Microsoft.Extensions.FileSystemGlobbing.Internal.MatcherContext.Execute() at Microsoft.Extensions.FileSystemGlobbing.MatcherExtensions.GetResultsInFullPath(Matcher matcher, String directoryPath) at OmniSharp.Script.ScriptProjectSystem.Initalize(IConfiguration configuration) at OmniSharp.WorkspaceInitializer.Initialize(IServiceProvider serviceProvider, CompositionHost compositionHost)




Aucun commentaire:

Enregistrer un commentaire