Visitar URL original
Change version logic for packages so its like version service from view components and set and get it from the assembly - see code in ticket · Issue #59 · TechnologyEnhancedLearning/TELBlazor · GitHub
Skip to content

Change version logic for packages so its like version service from view components and set and get it from the assembly - see code in ticket #59

Open

Description

@Phil-NHS
No description provided.

Activity

  1. changed the title [-]Change version logic for packages so its like version service from view components and set and get it from the assembly[/-] [+]Change version logic for packages so its like version service from view components and set and get it from the assembly - see code in ticket[/+] on Jun 5, 2025
  2. Phil-NHS commented on Jun 5, 2025

    @Phil-NHS
    CollaboratorAuthor

    using TELFrontEnd.SomeNamespace; // pick any type in the TELFrontEnd assembly

    namespace TELBlazor.Components.Services
    {
    public class VersionProvider
    {
    public string TELBlazorVersion { get; }
    public string TELFrontEndVersion { get; }

        public VersionProvider()
        {
            TELBlazorVersion = typeof(Program).Assembly.GetName().Version?.ToString() ?? "Unknown";
    
            // Get the version from TELFrontEnd assembly by referencing a known type
            var frontendAssembly = typeof(SomeViewComponentOrOtherTypeInTELFrontEnd).Assembly;
            TELFrontEndVersion = frontendAssembly.GetName().Version?.ToString() ?? "Unknown";
        }
    }
    

    }

    There is logic for viewcomponents in there so i think it will have a way of getting its own package number, or we get it from its assembly as it does. we just need something to grab like _imports to get an assembly from

  3. Phil-NHS commented on Jun 5, 2025

    @Phil-NHS
    CollaboratorAuthor

    TELBlazorBaseComponent maybe it shouldnt be its own singleton and should go into TELBlazorBaseComponent and have it added to logging data

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions