question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

InplaceStringBuilder no longer exists in Microsoft.Extensions.Primitives

See original GitHub issue

Template compilation now fails because the obsoleted InplaceStringBuilder was removed from the .NET Runtime in commit https://github.com/dotnet/runtime/commit/ef4bc4d503b71f9de1a8988da6db38bcfcfb0cc4.

This causes an error on the line:

https://github.com/toddams/RazorLight/blob/8e043e10423ecc0b88b49787dd597adddd4caa31/src/RazorLight/Compilation/RazorTemplateCompiler.cs#L263

System.TypeLoadException: Could not load type ‘Microsoft.Extensions.Primitives.InplaceStringBuilder’ from assembly ‘Microsoft.Extensions.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60’. at RazorLight.Compilation.RazorTemplateCompiler.NormalizeKey(String templateKey) at RazorLight.Compilation.RazorTemplateCompiler.GetNormalizedKey(String templateKey) at RazorLight.Compilation.RazorTemplateCompiler.CompileAsync(String templateKey) at RazorLight.EngineHandler.CompileTemplateAsync(String key) at RazorLight.EngineHandler.CompileRenderAsync[T](String key, T model, ExpandoObject viewBag)

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:5
  • Comments:12 (4 by maintainers)

github_iconTop GitHub Comments

3reactions
HamiltonManalocommented, Oct 15, 2020

@kkkmail A fix hasn’t been implemented for this yet. I’m going to begin working on it tonight (better late than never) and it should make it into the Beta11 release.

3reactions
HamiltonManalocommented, Aug 31, 2020

@jzabroski Yeah, I will start work on this as soon as I can.

Read more comments on GitHub >

github_iconTop Results From Across the Web

c# - 'Could not load type 'Microsoft.Extensions.Primitives. ...
I have read that InplaceStringBuilder does not exist in Microsoft.Extensions.Primitives anymore so I am assuming this is causing the problem ...
Read more >
InplaceStringBuilder Struct (Microsoft.Extensions.Primitives)
This type is obsolete and will be removed in a future version. Caution. This type is retained only for compatibility. The recommended alternative...
Read more >
Method not found: 'Microsoft.Extensions.Primitives. ...
Hello, I am using Visual Studio 2019 to develop Azure Functions on .net Core 3.1. I have a particular Azure function which uses...
Read more >
Error with AppSelfHostBase with .NET 5
I have an existing project, still referencing ServiceStack. ... Extensions.Primitives.InplaceStringBuilder' from assembly 'Microsoft.
Read more >
InplaceStringBuilder.ToString Method
Learn more about the Microsoft.Extensions.Primitives.InplaceStringBuilder.ToString in the Microsoft.Extensions.Primitives namespace.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found