Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

System.TypeLoadException : Could not load type 'HandlebarsDotNet.Polyfills.AsyncLocal`1' from assembly 'Handlebars, Version=2.1.2.0, Culture=neutral, PublicKeyToken=22225d0bf33cd661'. #65

Closed
caoko opened this issue Dec 19, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@caoko
Copy link
Contributor

caoko commented Dec 19, 2022

project .net framework version 4.8

Handlebars source (net46)
https://github.com/Handlebars-Net/Handlebars.Net/blob/master/source/Handlebars/Polyfills/AsyncLocal.cs

#if NET451 || NET452
using System;
using System.Runtime.CompilerServices;
using System.Runtime.Remoting.Messaging;

namespace HandlebarsDotNet.Polyfills
{
    public sealed class AsyncLocal<T>

HandlebarsHelpers source (net452)
https://github.com/Handlebars-Net/Handlebars.Net.Helpers/blob/master/src/Handlebars.Net.Helpers/HandlebarsHelpers.cs

using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Reflection;
using HandlebarsDotNet.Helpers.Attributes;
using HandlebarsDotNet.Helpers.Enums;
using HandlebarsDotNet.Helpers.Extensions;
using HandlebarsDotNet.Helpers.Helpers;
using HandlebarsDotNet.Helpers.Options;
using HandlebarsDotNet.Helpers.Parsers;
using HandlebarsDotNet.Helpers.Plugin;
using HandlebarsDotNet.Helpers.Utils;
using Stef.Validation;
using HandlebarsDotNet.Helpers.Models;
#if NETSTANDARD1_3_OR_GREATER
using System.Threading;
#else
using HandlebarsDotNet.Polyfills;
#endif

namespace HandlebarsDotNet.Helpers;

/// <summary>
/// Extension class to Register additional Helpers and BlockHelpers.
/// </summary>
public static class HandlebarsHelpers
{
    /// <summary>
    /// https://learn.microsoft.com/en-us/dotnet/api/system.threading.asynclocal-1
    /// </summary>
    internal static AsyncLocal<EvaluateResult> AsyncLocalResultFromEvaluate = new();
caoko added a commit to caoko/Handlebars.Net.Helpers that referenced this issue Dec 19, 2022
StefH pushed a commit that referenced this issue Dec 19, 2022
#66)

* System.TypeLoadException : Could not load type 'HandlebarsDotNet.Polyfills.AsyncLocal`1'

- #65

* revert the changes to the unit-tests
@StefH
Copy link
Collaborator

StefH commented Dec 19, 2022

Thank you for the PR.

@StefH StefH closed this as completed Dec 19, 2022
@StefH StefH added the bug Something isn't working label Dec 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants