Invalid Path while processing Font with MGCB - c#

I'm playing around with Monogame and can't add a font.
When adding a font with the MonoGame Pipeline tool i can't build my project anymore.
Visual studio stopps with the following error:
Der Befehl
""C:\Program Files (x86)\MSBuild\MonoGame\v3.0\Tools\MGCB.exe"
/#:"C:\dev\Mini\Mini\Content\Content.mgcb" /platform:Windows
/outputDir:"C:\dev\Mini\Mini\Content\bin\Windows"
/intermediateDir:"C:\dev\Mini\Mini\Content\obj\Windows" /quiet" wurde
mit dem Code 1 beendet.
'FontDescriptionProcessor' had unexpected
(sorry, its German, but i think you can understand the problem ; ) )
When i execute the error throwing command i get a more helping error:
C:\dev\Mini\Mini\Content>"C:\Program Files
(x86)\MSBuild\MonoGame\v3.0\Tools\MGCB.exe"
/#:"C:\dev\Mini\Mini\Content\Content.mgcb" /platform:Windows
/outputDir:"C:\dev\Mini\Mini\Content\bin\Windows"
/intermediateDir:"C:\dev\Mini\Mini\Content\obj\Windows" Build started
07.08.2015 23:15:43
Skipping C:/dev/Mini/Mini/Content/Game/Character.PNG Skipping
C:/dev/Mini/Mini/Content/SplashScreen/splashScreenGame.png Skipping
C:/dev/Mini/Mini/Content/Game/Background.PNG
C:/dev/Mini/Mini/Content/fonts/default.spritefont
C:/dev/Mini/Mini/Content/fonts/default.spritefont: error: Processor
'FontDescriptionProcessor' had unexpected failure!
System.ArgumentException: Illegales Zeichen im Pfad. bei
System.IO.Path.CheckInvalidPathChars(String path, Boolean
checkAdditional) bei System.IO.Path.IsPathRooted(String path)
bei
Microsoft.Xna.Framework.Content.Pipeline.Processors.FontDescriptionProcessor.FindFontFileFromFontName(String
fontName, String fontDirectory) bei
Microsoft.Xna.Framework.Content.Pipeline.Processors.FontDescriptionProcessor.Process(FontDescription
input, ContentProcessorContext context) bei
Microsoft.Xna.Framework.Content.Pipeline.ContentProcessor`2.Microsoft.Xna.Framework.Content.Pipeline.IContentProcessor.Process(Object
input, ContentProcessorContext context) bei
MonoGame.Framework.Content.Pipeline.Builder.PipelineManager.ProcessContent(PipelineBuildEvent
pipelineEvent)Skipping
C:/dev/Mini/Mini/Content/SplashScreen/SplashScreen.xml Skipping
C:/dev/Mini/Mini/Content/Game/Game.xml
Build 3 succeeded, 1 failed.
Time elapsed 00:00:00.19.
I understand, that the path C:/dev/Mini/Mini/Content/fonts/default.spritefont
is invalid, but i don't see any invalid characters. The .spritefont file is generated with the MonoGame tool and not imported. Did i miss something?
I am on a Windows 10, the MonoGame Pipeline Tool is on version 3.5.0.465 and MGCB.exe has the version 3.5.0.465, too.
Edit: When checking the path myself, everything looks ok and moving the whole project to an other harddrive doesn't help at all.
Edit2: Okey. it looks like it is not my font path. It is the path loaded from the registry. The line registryKey.GetValue(current).ToString(); inside the FindFontFileFromFontName method returns ARIAL.TTF\00\0\0\0\0\0. I will look into it and update this question or make an answer.

After testing around i came to an solution (or i found the problem...):
Some font paths in my registry are corrupted. Fonts with an uppercase Date value are throwing errors. When you encounter a similar problem take a look in your registry under "SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Fonts"l, check your chosen font or change it to a different one. I hope this solution will help you, too. (And when somebody know, why my registry data got corrupted, please let me know.)

I had this error and because the spritefont file is just a font meta-data definition file and not the actual font I still had manually install the TTF font files in Windows, then the build succeeded since the font could then be found to compress into the binary.

Related

Unreal Engine build crashes at C# trying to open Recycle Bin file

This boggles my mind, to the point that I wonder if isn't an SDK problem.
I share an Unreal Engine (4.26) game with a (non-technical) colleague through Git. Today he received his first code files from me, and to compile it, I had him install the SDKs(windows, .Net, C++ gaming, Visual Studio) and call Generate Visual Studio Project Files. It all generated just fine.
EDIT:
Emptying the recycle bin somehow fixed it, but now the problem repeats itself:
ERROR: Unhandled exception: System.UnauthorizedAccessException: Access to the path 'D:\System Volume Information' is denied.
So this entirely seems like a permission level problem to me, but I asked him to enable developer mode, to uncheck every read-only on Epic Games and Unreal Engine, and to run it in administrator mode. Nothing works. I don't see how we can get any more permissions than this.
Former message:
ERROR: Unhandled exception: System.UnauthorizedAccessException: Access to the path 'D:$RECYCLE.BIN\S-1-5-18' is denied.
Full logfile(minus some cleanup on my part):
Log file open, 04/17/21 12:00:08
LogInit: LLM is enabled
LogInit: LLM CsvWriter: off TraceWriter: off
LogInit: Display: Running engine for game: Naptin
LogPlatformFile: Not using cached read wrapper
LogTaskGraph: Started task graph with 5 named threads and 35 total threads with 3 sets of task threads.
LogStats: Stats thread started at 5.907298
LogD3D11RHI: Loaded GFSDK_Aftermath_Lib.x64.dll
LogICUInternationalization: ICU TimeZone Detection - Raw Offset: -5:00, Platform Override: ''
LogPluginManager: Mounting plugin MeshPainting
.....lots of LogPluginManager......
LogPluginManager: Mounting plugin SteamVR
LogXGEController: Cleaning working directory: C:/Users/adpar/AppData/Local/Temp/UnrealXGEWorkingDir/
LogXGEController: Cannot use XGE Controller as Incredibuild is not installed on this machine.
LogInit: Warning: Incompatible or missing module: Naptin
Running D:/.........UNREALENGINEFOLDER/UE_4.26/Engine/Binaries/DotNET/UnrealBuildTool.exe Development Win64 -Project="D:/....UNREAL/Naptin/Naptin/Naptin.uproject" -TargetType=Editor -Progress -NoEngineChanges -NoHotReloadFromIDE
Using 'git status' to determine working set for adaptive non-unity build (D:\....UNREAL\Naptin\Naptin).
Creating makefile for NaptinEditor(no existing makefile)
#progress push 5%
Parsing headers for NaptinEditor
Running UnrealHeaderTool "D:\....UNREAL\Naptin\Naptin\Naptin.uproject" "D:\....UNREAL\Naptin\Naptin\Intermediate\Build\Win64\NaptinEditor\Development\NaptinEditor.uhtmanifest" -LogCmds="loginit warning, logexit warning, logdatabase error" -Unattended -WarningsAsErrors -abslog="C:\Users\adpar\AppData\Local\UnrealBuildTool\Log_UHT.txt" -installed
Reflection code generated for NaptinEditor in 23.9260389 seconds
#progress pop
ERROR: Unhandled exception: System.UnauthorizedAccessException: Access to the path 'D:\$RECYCLE.BIN\S-1-5-18' is denied.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileSystemEnumerableIterator`1.CommonInit()
at System.IO.FileSystemEnumerableIterator`1..ctor(String path, String originalUserPath, String searchPattern, SearchOption searchOption, SearchResultHandler`1 resultHandler, Boolean checkHost)
at System.IO.DirectoryInfo.EnumerateFiles()
at Tools.DotNETCommon.FileFilter.FindMatchesFromDirectory(DirectoryInfo CurrentDirectory, String NamePrefix, Boolean bIgnoreSymlinks, List`1 MatchingFileNames) in D:\Build\++UE4\Sync\Engine\Saved\CsTools\Engine\Source\Programs\DotNETCommon\DotNETUtilities\FileFilter.cs:line 487
at Tools.DotNETCommon.FileFilter.FindMatchesFromDirectory(DirectoryInfo CurrentDirectory, String NamePrefix, Boolean bIgnoreSymlinks, List`1 MatchingFileNames) in D:\Build\++UE4\Sync\Engine\Saved\CsTools\Engine\Source\Programs\DotNETCommon\DotNETUtilities\FileFilter.cs:line 495
at Tools.DotNETCommon.FileFilter.FindMatchesFromDirectory(DirectoryInfo CurrentDirectory, String NamePrefix, Boolean bIgnoreSymlinks, List`1 MatchingFileNames) in D:\Build\++UE4\Sync\Engine\Saved\CsTools\Engine\Source\Programs\DotNETCommon\DotNETUtilities\FileFilter.cs:line 495
at Tools.DotNETCommon.FileFilter.ApplyToDirectory(DirectoryReference DirectoryName, Boolean bIgnoreSymlinks) in D:\Build\++UE4\Sync\Engine\Saved\CsTools\Engine\Source\Programs\DotNETCommon\DotNETUtilities\FileFilter.cs:line 408
at Tools.DotNETCommon.FilePattern.CreateMapping(HashSet`1 Files, FilePattern& SourcePattern, FilePattern& TargetPattern) in D:\Build\++UE4\Sync\Engine\Saved\CsTools\Engine\Source\Programs\DotNETCommon\DotNETUtilities\FilePattern.cs:line 340
at UnrealBuildTool.UEBuildBinary.PrepareRuntimeDependencies(List`1 RuntimeDependencies, Dictionary`2 TargetFileToSourceFile, DirectoryReference ExeDir) in D:\Build\++UE4\Sync\Engine\Source\Programs\UnrealBuildTool\Configuration\UEBuildBinary.cs:line 294
at UnrealBuildTool.UEBuildTarget.Build(BuildConfiguration BuildConfiguration, ISourceFileWorkingSet WorkingSet, Boolean bIsAssemblingBuild, List`1 SpecificFilesToCompile) in D:\Build\++UE4\Sync\Engine\Source\Programs\UnrealBuildTool\Configuration\UEBuildTarget.cs:line 1786
at UnrealBuildTool.BuildMode.CreateMakefile(BuildConfiguration BuildConfiguration, TargetDescriptor TargetDescriptor, ISourceFileWorkingSet WorkingSet) in D:\Build\++UE4\Sync\Engine\Source\Programs\UnrealBuildTool\Modes\BuildMode.cs:line 615
at UnrealBuildTool.BuildMode.Build(List`1 TargetDescriptors, BuildConfiguration BuildConfiguration, ISourceFileWorkingSet WorkingSet, BuildOptions Options, FileReference WriteOutdatedActionsFile, Boolean bSkipPreBuildTargets) in D:\Build\++UE4\Sync\Engine\Source\Programs\UnrealBuildTool\Modes\BuildMode.cs:line 257
at UnrealBuildTool.BuildMode.Execute(CommandLineArguments Arguments) in D:\Build\++UE4\Sync\Engine\Source\Programs\UnrealBuildTool\Modes\BuildMode.cs:line 226
at UnrealBuildTool.UnrealBuildTool.Main(String[] ArgumentsArray) in D:\Build\++UE4\Sync\Engine\Source\Programs\UnrealBuildTool\UnrealBuildTool.cs:line 550
LogInit: Warning: Still incompatible or missing module: Naptin
LogCore: Engine exit requested (reason: EngineExit() was called)
LogExit: Preparing to exit.
LogExit: Exiting.
Log file closed, 04/17/21 12:02:43
We have tried a few things, like generating again, or copypasting all of our assets to a new project: if we copy the assets, all good, if we copy the code, the same crash.
This happens only on his machine, so I'm kind of at a loss for words. He did not delete any files, the only difference between his machine and mine is that his SDK is more up-to-date by a few weeks.
I'd really appreciate any clue regarding why this file comes up in the build or how to stop it from crashing. The C++ code doesn't seem to be the issue at all, and he can't start Unreal Engine anymore.

Android build error "failed to create JavaTypeInfo for class" :Xamarin

Following this tutorial https://github.com/Vidyo/vidyo.io-connector-xamarin I downloaded the app without making any changes.
When I build the app, I get the following error:
Severity Code Description Project File Line Suppression State
Error Failed to create JavaTypeInfo for class: Android.Support.V4.View.Accessibility.AccessibilityManagerCompat/ITouchExplorationStateChangeListenerImplementor due to MAX_PATH: System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Users\User\Desktop\vidyo.io-connector-xamarin-master\vidyo.io-connector-xamarin-master\VidyoConnector.Android\obj\Debug\90\android\src\mono\android\support\v4\view\accessibility\AccessibilityManagerCompat_TouchExplorationStateChangeListenerImplementor.java'.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.File.InternalDelete(String path, Boolean checkHost)
at System.IO.File.Delete(String path)
at Xamarin.Android.Tools.Files.CopyIfStreamChanged(Stream stream, String destination)
at Xamarin.Android.Tasks.Generator.CreateJavaSources(TaskLoggingHelper log, IEnumerable`1 javaTypes, String outputPath, String applicationJavaClass, String androidSdkPlatform, Boolean useSharedRuntime, Boolean generateOnCreateOverrides, Boolean hasExportReference) VidyoConnector.Android
What is the possible fix for this?
That seems a problem with long path in windows. Put the project folder on the root, say C://yourproject. Then, clean your solution and build.
#LawrenceWlt is correct but I would like to add some more information.
Is is due to Maximum Path Length Limitation
In the Windows API (with some exceptions discussed in the following
paragraphs), the maximum length for a path is MAX_PATH, which is
defined as 260 characters.
https://learn.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation
https://learn.microsoft.com/en-us/windows/win32/fileio/naming-a-file#maximum-path-length-limitation
If you are on Windows 10, Version 1607 or later you can Enable Long Paths:
The registry key Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem\LongPathsEnabled (Type: REG_DWORD) must exist and be set to 1.
The application manifest must also include the longPathAware element.
<application xmlns="urn:schemas-microsoft-com:asm.v3">
<windowsSettings xmlns:ws2="http://schemas.microsoft.com/SMI/2016/WindowsSettings">
<ws2:longPathAware>true</ws2:longPathAware>
</windowsSettings>
</application>
https://learn.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation#enable-long-paths-in-windows-10-version-1607-and-later
I got a similar error from Experimental Mobile Blazor Bindings:
https://github.com/xamarin/MobileBlazorBindings
Failed to generate Java type for class:
Android.Support.V4.View.Accessibility.AccessibilityManagerCompat/IAccessibilityStateChangeListenerImplementor
due to MAX_PATH: System.IO.DirectoryNotFoundException: Could not find
a part of the path
'C:\Users\User\Desktop\MobileBlazorBindings-master\samples\MobileBlazorBindingsXaminals\MobileBlazorBindingsXaminals.Android\obj\Debug\90\android\src\mono\android\support\v4\view\accessibility\AccessibilityManagerCompat_AccessibilityStateChangeListenerImplementor.java'.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.File.InternalDelete(String path, Boolean checkHost) at
System.IO.File.Delete(String path) at
Xamarin.Android.Tools.Files.CopyIfStreamChanged(Stream stream, String
destination) at
Xamarin.Android.Tasks.GenerateJavaStubs.CreateJavaSources(IEnumerable`1
javaTypes, TypeDefinitionCache
cache) MobileBlazorBindingsXaminals.Android
Adding this to the Android projects's .csproj file fixed the issue for me:
<PropertyGroup>
<IntermediateOutputPath>C:\E</IntermediateOutputPath>
</PropertyGroup>
It writes the intermediate Android files to a folder of your choice - obviously choose a really short one to avoid long paths!
There is another solution that hasn't been mentioned yet: Create a Directory Junction and point it to your solution directory. Place the junction at the root-level, then run the solution from there.
This approach will enable you to workaround the MAX_PATH issue without having to move your project or upgrade to Windows 10.
For example, let's say you store all your code in C:\dev, all your repos in C:\dev\repos, all your Git repos in C:\dev\repos\git, all your Xamarin Git repos in C:\dev\repos\git\xamarin, and all the mobile apps you've built for your largest client in C:\dev\repos\git\xamarin\isis (hey it's not my place to judge). Your latest project can be found in C:\dev\repos\git\xamarin\isis\satellite-tracker\src, but you can't get it to build because the path is too long.
So we create a new directory, C:\J, which will hold this and any other junctions we create for this workaround on other projects. Then open a command prompt as Administrator and navigate to C:\J. Then enter the following command:
mklink /J SatTrack C:\dev\repos\git\xamarin\isis\satellite-tracker\src
Now you can access your solution file from C:\J\SatTrack. If you open it from there, Visual Studio will use that path instead of the longer one and you should be fine after a clean/rebuild.
A simple solution that works great is changing the build output folder in Android Project -> Properties -> Build -> Output path

Teamcity, MSBUILD ExtensionPack.Framework.AssemblyInfo task fails

It seems like everything has broken overnight at the same time... sigh.
In a desperate attempt to fix other random problems I need to make a build of our large project only to find that our teamcity build agents can no longer do their job. The error message is below:
[CallTarget] Version (1s)
[Version] MSBuild.ExtensionPack.Framework.AssemblyInfo (1s)
[MSBuild.ExtensionPack.Framework.AssemblyInfo] I:\BuildAgent-DEVTC1\work\e7d35660eba50bd6\build.proj(150, 3): error MSB4018: The "MSBuild.ExtensionPack.Framework.AssemblyInfo" task failed unexpectedly.
System.ArgumentNullException: Value cannot be null.
Parameter name: input
at System.Text.RegularExpressions.Regex.Matches(String input)
at MSBuild.ExtensionPack.Framework.Version.ParseVersion(String version) in D:\Projects\MSBuildExtensionPack\Releases\4.0.3.0\Main\Framework\Framework\AssemblyInfo\Version.cs:line 51
at MSBuild.ExtensionPack.Framework.AssemblyInfo.Execute() in D:\Projects\MSBuildExtensionPack\Releases\4.0.3.0\Main\Framework\Framework\AssemblyInfo\AssemblyInfo.cs:line 1011
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext()
The proj definition for the Version target is the following where #VersionDefinition is an "inlcude" for all AssemblyInfo.cs files:
<Target Name="Version">
<MSBuild.ExtensionPack.Framework.AssemblyInfo
AssemblyInfoFiles="#(VersionDefinition)"
AssemblyVersion="$(BUILD_NUMBER)"
AssemblyCopyright="Copywrite info here"
AssemblyCompany="Company info here"
AssemblyFileVersion="$(BUILD_NUMBER)"/>
</Target>
I can see that teamcity is correctly passing in BUILD_NUMBER with a valid value too.
Any ideas?
I'm open to suggestions that don't rely on the extension pack to set AssemblyInfo.cs numbers. I have looked into the TeamCity Assembly Info Patcher but I wasn't sure what "standard locations" was referring to in its description.
On a side note, have there been any updates recently to windows or .NET that could have broken everything...everywhere? I have recently had numerous third party libraries start to fail, almost simultaneously.
Thanks
UPDATE
The logs for recent successful build do not even show the Version target being called... which is odd given that that's the only place the correct build number is set and the build created files with the correct number applied.
So I installed a newer version of the ExtensionPack (4.0.13.0) on to the build clients and got a slightly clearer error message that told me which file was at fault.
Examining the AssemblyInfo.cs file mentioned the AssemblyVersion and AssemblyFileVersion values were missing. Adding these solved the issue.
The interesting part here is that the suspect project has not been touched for years so the values had never have been set. A quick scan through our git logs confirms this. Ultimately I'm not sure what triggered this to become a problem but it is no longer.

Xamarin Studio Error MSB4018: The "ConvertResourcesCases" task failed unexpectedly

I am getting the following error while trying to build my solution. I am trying to update an existing project that I haven't touched for a few months. Its location in my PC has not changed.
C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2,2): Error MSB4018: The "ConvertResourcesCases" task failed unexpectedly.
System.IO.FileNotFoundException: Could not find file 'obj\Debug\res\anim\slide_out_left.xml'.
File name: 'obj\Debug\res\anim\slide_out_left.xml'
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.File.InternalCopy(String sourceFileName, String destFileName, Boolean overwrite, Boolean checkHost)
at System.IO.File.Copy(String sourceFileName, String destFileName, Boolean overwrite)
at Xamarin.Android.Tools.Files.CopyIfChanged(String source, String destination)
at Xamarin.Android.Tasks.ConvertResourcesCases.FixupResources(ITaskItem item, Dictionary2 acwMap)
at Xamarin.Android.Tasks.ConvertResourcesCases.FixupResources(Dictionary2 acwMap)
at Xamarin.Android.Tasks.ConvertResourcesCases.Execute()
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__20.MoveNext() (MSB4018) (TekaTekiMalaysia.Droid)
I've read from the other thread that I've to 'Unblock' the file via File Explorer but such option is not available for me under properties.
I've also tried moving the solution to a different folder up the folder tree.
I've also tried changing the folder properties by giving it Full Control permission.
I am using Xamarin Studio to build the project. Any ideas what is causing the issue?
Deleting bin and debug folder/Changing the solution directory name nothing worked, I solved it by moving the solution from "C:\Users\Dell PC\Desktop\studies\SampleProjects\Xamarin\XamarinFCM" to "C:\XamarinSamples\XamarinFCM"
What I feel is xamarin solution expect a shorter directory path. not sure why Microsoft leave this kind of bug.
OK I finally figured it out. For the benefit of those encountering the same problem here's how I fix it. It's caused by any non English character in the root solution folder.
For example my original solution location is
D:\Users\OneDrive\Dev\Xamarin\TekaTeki3\TekaTeki3\
I created a new folder and rename the folder from TekaTeki3 to TekaTekiTiga. Now it compiles properly!
D:\Users\OneDrive\Dev\Xamarin\TekaTekiTiga\TekaTeki3\
I fixed this by cleaning my solution, deleting the obj and bin directories in my .Droid project and rebuilding.
I imagine there's a bug but here's a workaround:
The error is telling us it can't find a directory.
Create the directories manually, then rebuild.
There will be 3 new missing directory complaints - just manually create those directories as well.
Rebuild-All should work now.
For me this Solution works, I have only shorten the Path of solution like,
previously it was
D:\Projects\Xamarin_Projects\Git_Test\WCP_Solution
I shifted my project location to shorter path like
D:\Projects\WCP_Solution
because there is character limit Android solution
I just had the same problem. The fix was add "READ & WRITE" on root folder and **rebuild **the project.

Visual Studio 2015 (Update 1) crashes when triggering IntelliSense in cshtml editor

Whenever I open a View file and type something that trigger IntelliSense (<, . or Ctrl + Space), VS immediately crashes without any message and suggest to restart itself.
I opened Event Viewer and see two Error records:
Application: devenv.exe Framework Version: v4.0.30319 Description: The
application requested process termination through
System.Environment.FailFast(string message). Message:
System.AggregateException: One or more errors occurred. --->
System.ArgumentOutOfRangeException: Specified argument was out of the
range of valid values. Parameter name: position at
Microsoft.CodeAnalysis.CSharp.CSharpSyntaxNode.FindToken(Int32
position, Boolean findInsideTrivia) at
Microsoft.CodeAnalysis.CSharp.CSharpSyntaxNode.FindToken(Int32
position, Func`2 findInsideTrivia) at
Microsoft.CodeAnalysis.CSharp.CSharpSyntaxNode.FindToken(Int32
position, Boolean findInsideTrivia) at
Microsoft.CodeAnalysis.CSharp.CSharpSyntaxNode.FindTokenCore(Int32
position, Boolean findInsideTrivia) at
Microsoft.CodeAnalysis.CSharp.Extensions.SyntaxTreeExtensions.IsEntirelyWithinStringLiteral(SyntaxTree
syntaxTree, Int32 position, CancellationToken cancellationToken) at
Microsoft.CodeAnalysis.CSharp.Extensions.SyntaxTreeExtensions.IsInNonUserCode(SyntaxTree
syntaxTree, Int32 position, CancellationToken cancellationToken) at
Microsoft.CodeAnalysis.CSharp.Completion.Providers.SpeculativeTCompletionProvider.d__3.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
The full log file is very long, if you need more, please see it here.
I ahve tried resetting user data and delete .vs folder in my project but it does not work. Can anyone suggest a fix? Thank you very much.
I ran into same issue after installing language pack for spanish.
Switching back to international settings to English allowed me to continue working on the cshtml. Must mention that if i switch back to spanish, condition reappears:
So go to:
1. Tools > Options > Environment > International Settings.
2. Select English at Language dropdown.
BTW my Visual Studio versiĆ³n is the Community one, and haven't tried reinstalling the language pack.
Remember seeing a report a while on MS site (cant't find it lately), hope this helps to shed some light on this.

Categories