rubicon-oss / LicenseHeaderManager

Manage license headers for your source code files in Visual Studio

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Problem when start Visual Studio 2022

franklupo opened this issue · comments

Hi,
when i start visual studio 2022 this error appears

image

Content file ActivityLog.xml

  <entry>
    <record>422</record>
    <time>2022/11/18 07:33:29.970</time>
    <type>Error</type>
    <source>VisualStudio</source>
    <description>SetSite failed for package [LicenseHeadersPackage]Source: &apos;LicenseHeaderManager.Core&apos; Description: The file content is not in a valid format&#x000D;&#x000A;System.Runtime.Serialization.SerializationException: The file content is not in a valid format ---&gt; System.Text.Json.JsonException: &apos;0x00&apos; is an invalid start of a value. Path: $ | LineNumber: 0 | BytePositionInLine: 0. ---&gt; System.Text.Json.JsonReaderException: &apos;0x00&apos; is an invalid start of a value. LineNumber: 0 | BytePositionInLine: 0.&#x000D;&#x000A;   in System.Text.Json.ThrowHelper.ThrowJsonReaderException(Utf8JsonReader&amp; json, ExceptionResource resource, Byte nextByte, ReadOnlySpan`1 bytes)&#x000D;&#x000A;   in System.Text.Json.Utf8JsonReader.ConsumeValue(Byte marker)&#x000D;&#x000A;   in System.Text.Json.Utf8JsonReader.ReadFirstToken(Byte first)&#x000D;&#x000A;   in System.Text.Json.Utf8JsonReader.ReadSingleSegment()&#x000D;&#x000A;   in System.Text.Json.Utf8JsonReader.Read()&#x000D;&#x000A;   in System.Text.Json.Serialization.JsonConverter`1.ReadCore(Utf8JsonReader&amp; reader, JsonSerializerOptions options, ReadStack&amp; state)&#x000D;&#x000A;   --- Fine della traccia dello stack dell&apos;eccezione interna ---&#x000D;&#x000A;   in System.Text.Json.ThrowHelper.ReThrowWithPath(ReadStack&amp; state, JsonReaderException ex)&#x000D;&#x000A;   in System.Text.Json.Serialization.JsonConverter`1.ReadCore(Utf8JsonReader&amp; reader, JsonSerializerOptions options, ReadStack&amp; state)&#x000D;&#x000A;   in System.Text.Json.JsonSerializer.ReadCore[TValue](JsonReaderState&amp; readerState, Boolean isFinalBlock, ReadOnlySpan`1 buffer, JsonSerializerOptions options, ReadStack&amp; state, JsonConverter converterBase)&#x000D;&#x000A;   in System.Text.Json.JsonSerializer.ContinueDeserialize[TValue](ReadBufferState&amp; bufferState, JsonReaderState&amp; jsonReaderState, ReadStack&amp; readStack, JsonConverter converter, JsonSerializerOptions options)&#x000D;&#x000A;   in System.Text.Json.JsonSerializer.&lt;ReadAllAsync&gt;d__65`1.MoveNext()&#x000D;&#x000A;--- Fine traccia dello stack da posizione precedente dove &#x00E8; stata generata l&apos;eccezione ---&#x000D;&#x000A;   in System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()&#x000D;&#x000A;   in System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&#x000D;&#x000A;   in System.Threading.Tasks.ValueTask`1.get_Result()&#x000D;&#x000A;   in LicenseHeaderManager.Core.Options.JsonOptionsManager.&lt;DeserializeAsync&gt;d__7`1.MoveNext()&#x000D;&#x000A;   --- Fine della traccia dello stack dell&apos;eccezione interna ---&#x000D;&#x000A;   in LicenseHeaderManager.Core.Options.JsonOptionsManager.&lt;DeserializeAsync&gt;d__7`1.MoveNext()&#x000D;&#x000A;--- Fine traccia dello stack da posizione precedente dove &#x00E8; stata generata l&apos;eccezione ---&#x000D;&#x000A;   in System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()&#x000D;&#x000A;   in System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&#x000D;&#x000A;   in LicenseHeaderManager.Core.Options.CoreOptionsRepository.&lt;LoadAsync&gt;d__1.MoveNext()&#x000D;&#x000A;--- Fine traccia dello stack da posizione precedente dove &#x00E8; stata generata l&apos;eccezione ---&#x000D;&#x000A;   in System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()&#x000D;&#x000A;   in System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&#x000D;&#x000A;   in LicenseHeaderManager.Options.OptionsFacade.&lt;LoadAsync&gt;d__37.MoveNext() in C:\Build\1776828f99d31c99\LicenseHeaderManager.Shared\Options\OptionsFacade.cs:riga 189&#x000D;&#x000A;--- Fine traccia dello stack da posizione precedente dove &#x00E8; stata generata l&apos;eccezione ---&#x000D;&#x000A;   in System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()&#x000D;&#x000A;   in System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&#x000D;&#x000A;   in LicenseHeaderManager.LicenseHeadersPackage.&lt;MigrateOptionsAsync&gt;d__66.MoveNext() in C:\Build\1776828f99d31c99\LicenseHeaderManager.Shared\LicenseHeadersPackage.cs:riga 472&#x000D;&#x000A;--- Fine traccia dello stack da posizione precedente dove &#x00E8; stata generata l&apos;eccezione ---&#x000D;&#x000A;   in System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()&#x000D;&#x000A;   in System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&#x000D;&#x000A;   in LicenseHeaderManager.LicenseHeadersPackage.&lt;InitializeAsync&gt;d__53.MoveNext() in C:\Build\1776828f99d31c99\LicenseHeaderManager.Shared\LicenseHeadersPackage.cs:riga 266&#x000D;&#x000A;--- Fine traccia dello stack da posizione precedente dove &#x00E8; stata generata l&apos;eccezione ---&#x000D;&#x000A;   in System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()&#x000D;&#x000A;   in System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&#x000D;&#x000A;   in Microsoft.VisualStudio.Shell.AsyncPackage.&lt;&gt;c__DisplayClass21_0.&lt;&lt;Microsoft-VisualStudio-Shell-Interop-IAsyncLoadablePackageInitialize-Initialize&gt;b__1&gt;d.MoveNext()&#x000D;&#x000A;--- Fine traccia dello stack da posizione precedente dove &#x00E8; stata generata l&apos;eccezione ---&#x000D;&#x000A;   in System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()&#x000D;&#x000A;   in Microsoft.VisualStudio.Services.VsTask.RethrowException(AggregateException e)&#x000D;&#x000A;   in Microsoft.VisualStudio.Services.VsTask.InternalGetResult(Boolean ignoreUIThreadCheck)System.Text.Json.JsonException: &apos;0x00&apos; is an invalid start of a value. Path: $ | LineNumber: 0 | BytePositionInLine: 0. ---&gt; System.Text.Json.JsonReaderException: &apos;0x00&apos; is an invalid start of a value. LineNumber: 0 | BytePositionInLine: 0.&#x000D;&#x000A;   in System.Text.Json.ThrowHelper.ThrowJsonReaderException(Utf8JsonReader&amp; json, ExceptionResource resource, Byte nextByte, ReadOnlySpan`1 bytes)&#x000D;&#x000A;   in System.Text.Json.Utf8JsonReader.ConsumeValue(Byte marker)&#x000D;&#x000A;   in System.Text.Json.Utf8JsonReader.ReadFirstToken(Byte first)&#x000D;&#x000A;   in System.Text.Json.Utf8JsonReader.ReadSingleSegment()&#x000D;&#x000A;   in System.Text.Json.Utf8JsonReader.Read()&#x000D;&#x000A;   in System.Text.Json.Serialization.JsonConverter`1.ReadCore(Utf8JsonReader&amp; reader, JsonSerializerOptions options, ReadStack&amp; state)&#x000D;&#x000A;   --- Fine della traccia dello stack dell&apos;eccezione interna ---&#x000D;&#x000A;   in System.Text.Json.ThrowHelper.ReThrowWithPath(ReadStack&amp; state, JsonReaderException ex)&#x000D;&#x000A;   in System.Text.Json.Serialization.JsonConverter`1.ReadCore(Utf8JsonReader&amp; reader, JsonSerializerOptions options, ReadStack&amp; state)&#x000D;&#x000A;   in System.Text.Json.JsonSerializer.ReadCore[TValue](JsonReaderState&amp; readerState, Boolean isFinalBlock, ReadOnlySpan`1 buffer, JsonSerializerOptions options, ReadStack&amp; state, JsonConverter converterBase)&#x000D;&#x000A;   in System.Text.Json.JsonSerializer.ContinueDeserialize[TValue](ReadBufferState&amp; bufferState, JsonReaderState&amp; jsonReaderState, ReadStack&amp; readStack, JsonConverter converter, JsonSerializerOptions options)&#x000D;&#x000A;   in System.Text.Json.JsonSerializer.&lt;ReadAllAsync&gt;d__65`1.MoveNext()&#x000D;&#x000A;--- Fine traccia dello stack da posizione precedente dove &#x00E8; stata generata l&apos;eccezione ---&#x000D;&#x000A;   in System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()&#x000D;&#x000A;   in System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&#x000D;&#x000A;   in System.Threading.Tasks.ValueTask`1.get_Result()&#x000D;&#x000A;   in LicenseHeaderManager.Core.Options.JsonOptionsManager.&lt;DeserializeAsync&gt;d__7`1.MoveNext()System.Text.Json.JsonReaderException: &apos;0x00&apos; is an invalid start of a value. LineNumber: 0 | BytePositionInLine: 0.&#x000D;&#x000A;   in System.Text.Json.ThrowHelper.ThrowJsonReaderException(Utf8JsonReader&amp; json, ExceptionResource resource, Byte nextByte, ReadOnlySpan`1 bytes)&#x000D;&#x000A;   in System.Text.Json.Utf8JsonReader.ConsumeValue(Byte marker)&#x000D;&#x000A;   in System.Text.Json.Utf8JsonReader.ReadFirstToken(Byte first)&#x000D;&#x000A;   in System.Text.Json.Utf8JsonReader.ReadSingleSegment()&#x000D;&#x000A;   in System.Text.Json.Utf8JsonReader.Read()&#x000D;&#x000A;   in System.Text.Json.Serialization.JsonConverter`1.ReadCore(Utf8JsonReader&amp; reader, JsonSerializerOptions options, ReadStack&amp; state)</description>
    <guid>{4C570677-8476-4D33-BD0C-DA36C89287C8}</guid>
    <hr>0x8013150c</hr>
    <errorinfo></errorinfo>
  </entry>

best regards

Hi,
the erorr is a malformed file in C:\Users<user>\AppData\Roaming\rubicon\LicenseHeaderManager\17.0\CoreOptions.json.
I solved by deleting the file

Best regards

@franklupo Thank you for posting the update. I can't say why it's happening so I'll keep this ticket around until the next time someone does some spring cleaning.

Hi,
We should increase the details of the errors because it was difficult to find the name of the configuration file.
You might ask whether to recreate the file 'CoreOptions.json'.

Best regards

Add in the wiki where the configuration files are located so that you can act manually.

Eg 'C:\Users<user>\AppData\Roaming\rubicon\LicenseHeaderManager'