theron-wang/VS2022-Editor-Support-for-Tailwind-CSS

Set up Tailwind Css Crashing

caio-delgado opened this issue · 4 comments

I've been using the extension for a while and it was working really well until I tried cloning my repo to a fresh local folder. Now when I try to setup tailwind through the context menu it produces the following:

System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Bcl.AsyncInterfaces, Version=7.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. O sistema não pode encontrar o arquivo especificado.
File name: 'Microsoft.Bcl.AsyncInterfaces, Version=7.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'
at System.Text.Json.Serialization.Metadata.DefaultJsonTypeInfoResolver.GetDefaultSimpleConverters()
at System.Text.Json.Serialization.Metadata.DefaultJsonTypeInfoResolver..ctor(Boolean mutable)
at System.Text.Json.Serialization.Metadata.DefaultJsonTypeInfoResolver.RootDefaultInstance()
at System.Text.Json.JsonSerializerOptions.GetOrCreateDefaultOptionsInstance()
at System.Text.Json.JsonSerializerOptions.get_Default()
at System.Text.Json.JsonSerializer.GetTypeInfo(JsonSerializerOptions options, Type inputType)
at System.Text.Json.JsonSerializer.SerializeAsync[TValue](Stream utf8Json, TValue value, JsonSerializerOptions options, CancellationToken cancellationToken)
at TailwindCSSIntellisense.Settings.SettingsProvider.d__11.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at TailwindCSSIntellisense.SetUpTailwind.d__14.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Community.VisualStudio.Toolkit.BaseCommand.<>c__DisplayClass8_0.<b__0>d.MoveNext()

Can you help me get it working again? I have tried uninstalling the extension and installling it again but no luck.

Sorry about that! It looks like I forgot to update one of the related NuGet packages; it should now be working in the latest extension update.

Hello, and thanks for replying. Sorry for taking so long to respond. I tried uninstalling and reinstalling the extension again but it didn't work.

This is ther stack trace:

System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Bcl.AsyncInterfaces, Version=7.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. O sistema não pode encontrar o arquivo especificado.
File name: 'Microsoft.Bcl.AsyncInterfaces, Version=7.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'
at System.Text.Json.Serialization.Metadata.DefaultJsonTypeInfoResolver.GetDefaultSimpleConverters()
at System.Text.Json.Serialization.Metadata.DefaultJsonTypeInfoResolver..ctor(Boolean mutable)
at System.Text.Json.Serialization.Metadata.DefaultJsonTypeInfoResolver.RootDefaultInstance()
at System.Text.Json.JsonSerializerOptions.GetOrCreateDefaultOptionsInstance()
at System.Text.Json.JsonSerializerOptions.get_Default()
at System.Text.Json.JsonSerializer.GetTypeInfo(JsonSerializerOptions options, Type inputType)
at System.Text.Json.JsonSerializer.DeserializeAsync[TValue](Stream utf8Json, JsonSerializerOptions options, CancellationToken cancellationToken)
at TailwindCSSIntellisense.Completions.CompletionUtilities.d__82.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at TailwindCSSIntellisense.Completions.CompletionUtilities.d__80.MoveNext()

AVI: o log de associações de assembly está desativado.
Para ativar o log de falhas de assembly, defina o valor do Registro [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) como 1.
Observação: há alguma penalidade para o desempenho associada ao log de falha de associação de assembly.
Para desativar esse recurso, remova o valor do Registro [HKLM\Software\Microsoft\Fusion!EnableLog].

System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Bcl.AsyncInterfaces, Version=7.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. O sistema não pode encontrar o arquivo especificado.
File name: 'Microsoft.Bcl.AsyncInterfaces, Version=7.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'
at System.Text.Json.Serialization.Metadata.DefaultJsonTypeInfoResolver.GetDefaultSimpleConverters()
at System.Text.Json.Serialization.Metadata.DefaultJsonTypeInfoResolver..ctor(Boolean mutable)
at System.Text.Json.Serialization.Metadata.DefaultJsonTypeInfoResolver.RootDefaultInstance()
at System.Text.Json.JsonSerializerOptions.GetOrCreateDefaultOptionsInstance()
at System.Text.Json.JsonSerializerOptions.get_Default()
at System.Text.Json.JsonSerializer.GetTypeInfo(JsonSerializerOptions options, Type inputType)
at System.Text.Json.JsonSerializer.DeserializeAsync[TValue](Stream utf8Json, JsonSerializerOptions options, CancellationToken cancellationToken)
at TailwindCSSIntellisense.Completions.CompletionUtilities.d__82.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at TailwindCSSIntellisense.Completions.CompletionUtilities.d__80.MoveNext()

AVI: o log de associações de assembly está desativado.
Para ativar o log de falhas de assembly, defina o valor do Registro [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) como 1.
Observação: há alguma penalidade para o desempenho associada ao log de falha de associação de assembly.
Para desativar esse recurso, remova o valor do Registro [HKLM\Software\Microsoft\Fusion!EnableLog].

System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Bcl.AsyncInterfaces, Version=7.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. O sistema não pode encontrar o arquivo especificado.
File name: 'Microsoft.Bcl.AsyncInterfaces, Version=7.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'
at System.Text.Json.Serialization.Metadata.DefaultJsonTypeInfoResolver.GetDefaultSimpleConverters()
at System.Text.Json.Serialization.Metadata.DefaultJsonTypeInfoResolver..ctor(Boolean mutable)
at System.Text.Json.Serialization.Metadata.DefaultJsonTypeInfoResolver.RootDefaultInstance()
at System.Text.Json.JsonSerializerOptions.GetOrCreateDefaultOptionsInstance()
at System.Text.Json.JsonSerializerOptions.get_Default()
at System.Text.Json.JsonSerializer.GetTypeInfo(JsonSerializerOptions options, Type inputType)
at System.Text.Json.JsonSerializer.DeserializeAsync[TValue](Stream utf8Json, JsonSerializerOptions options, CancellationToken cancellationToken)
at TailwindCSSIntellisense.Completions.CompletionUtilities.d__82.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at TailwindCSSIntellisense.Completions.CompletionUtilities.d__80.MoveNext()

AVI: o log de associações de assembly está desativado.
Para ativar o log de falhas de assembly, defina o valor do Registro [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) como 1.
Observação: há alguma penalidade para o desempenho associada ao log de falha de associação de assembly.
Para desativar esse recurso, remova o valor do Registro [HKLM\Software\Microsoft\Fusion!EnableLog].

System.IO.FileNotFoundException: Could not load file or assembly 'System.Memory, Version=4.0.1.2, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. O sistema não pode encontrar o arquivo especificado.
File name: 'System.Memory, Version=4.0.1.2, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'
at System.Text.Json.JsonSerializer.Deserialize[TValue](String json, JsonSerializerOptions options)
at TailwindCSSIntellisense.Configuration.ConfigFileParser.d__4.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at TailwindCSSIntellisense.Configuration.ConfigFileParser.d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at TailwindCSSIntellisense.Configuration.CompletionConfiguration.d__44.MoveNext()

AVI: o log de associações de assembly está desativado.
Para ativar o log de falhas de assembly, defina o valor do Registro [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) como 1.
Observação: há alguma penalidade para o desempenho associada ao log de falha de associação de assembly.
Para desativar esse recurso, remova o valor do Registro [HKLM\Software\Microsoft\Fusion!EnableLog].

System.IO.FileNotFoundException: Could not load file or assembly 'System.Memory, Version=4.0.1.2, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. O sistema não pode encontrar o arquivo especificado.
File name: 'System.Memory, Version=4.0.1.2, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'
at System.Text.Json.JsonSerializer.Deserialize[TValue](String json, JsonSerializerOptions options)
at TailwindCSSIntellisense.Configuration.ConfigFileParser.d__4.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at TailwindCSSIntellisense.Configuration.ConfigFileParser.d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at TailwindCSSIntellisense.Configuration.CompletionConfiguration.d__44.MoveNext()

AVI: o log de associações de assembly está desativado.
Para ativar o log de falhas de assembly, defina o valor do Registro [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) como 1.
Observação: há alguma penalidade para o desempenho associada ao log de falha de associação de assembly.
Para desativar esse recurso, remova o valor do Registro [HKLM\Software\Microsoft\Fusion!EnableLog].

System.IO.FileNotFoundException: Could not load file or assembly 'System.Memory, Version=4.0.1.2, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. O sistema não pode encontrar o arquivo especificado.
File name: 'System.Memory, Version=4.0.1.2, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'
at System.Text.Json.JsonSerializer.Deserialize[TValue](String json, JsonSerializerOptions options)
at TailwindCSSIntellisense.Configuration.ConfigFileParser.d__4.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at TailwindCSSIntellisense.Configuration.ConfigFileParser.d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at TailwindCSSIntellisense.Configuration.CompletionConfiguration.d__44.MoveNext()

AVI: o log de associações de assembly está desativado.
Para ativar o log de falhas de assembly, defina o valor do Registro [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) como 1.
Observação: há alguma penalidade para o desempenho associada ao log de falha de associação de assembly.
Para desativar esse recurso, remova o valor do Registro [HKLM\Software\Microsoft\Fusion!EnableLog].

FYI I did move the projects folders around and after that the extension broke, maybe there is absolute pathing somewhere.

No problem! It does look like I still referenced an incorrect version of System.Text.Json in the current version (VS ships with Microsoft.Bcl.AsyncInterfaces 6.0.0 and 7.0.0 is not shipped in the extension) which is why you still got the error. I have downgraded System.Text.Json to 6.0.9 in the latest version so there shouldn't be anymore errors regarding missing dependencies.

If you run into any issues, please let me know!

Sorry for the inconvenience, and thanks for letting me know!

Just reinstalled and it worked! Thanks for your quick response! This extension is awesome.