JsonConfEditor attribute not being honored in the MFAdmin configuration editor | VAF 2.3

I created a new VaultApplication with the new 2.3 Visual Studio extension and I see the JsonConfEditor attribute not being honored in the MFAdmin configuration editor.

This is my configuration class:

[DataContract]
public class Configuration
{
  [DataMember]
  [Security(ChangeBy = SecurityAttribute.UserLevel.VaultAdmin)]
  [JsonConfEditor(
    TypeEditor = "options",
    IsRequired = true,
    Options = "{selectOptions:[\"OFF\", \"INFO\", \"WARNING\", \"ERROR\"]}",
    DefaultValue = "OFF",
    Label = "Log level"
  )]
public string LogLevel { get; set; } = "OFF";
}

The Configuration class is being used in the VaultApplication class:

public class VaultApplication : ConfigurableVaultApplicationBase<Configuration>

This is what I see in the MFAdmin configuration editor for the vault application:

Initially the option value is empty (not "OFF", as indicated in the Configuration class), the label should be "Log Level" and there should be an options dropdown with OFF, INFO, WARNING or ERROR.

What am I missing here?

Parents
  • Ok, here is the cause: a bug in the updated NuGet packages for Interop.MFilesAPIMFiles.Crypto and MFiles.VAF.Configuration.

    After creating the solution, I updated the new NuGET packages for to the latest versions, and the MFAdmin configuration editor started to fail.

     <PackageReference Include="Interop.MFilesAPI">
    <Version>21.10.7</Version>
    </PackageReference>
    <PackageReference Include="MFiles.Crypto">
    <Version>21.10.7</Version>
    </PackageReference>
    <PackageReference Include="MFiles.VAF">
    <Version>2.3.623.2</Version>
    </PackageReference>
    <PackageReference Include="MFiles.VAF.Configuration">
    <Version>21.10.7</Version>

    To cross reference, I downgraded the package references in the csproj file to the numbers below, and the configuration options editor started to work again in MFAdmin.

     <PackageReference Include="Interop.MFilesAPI">
    <Version>21.8.1</Version>
    </PackageReference>
    <PackageReference Include="MFiles.Crypto">
    <Version>21.8.1</Version>
    </PackageReference>
    <PackageReference Include="MFiles.VAF">
    <Version>2.3.623.2</Version>
    </PackageReference>
    <PackageReference Include="MFiles.VAF.Configuration">
    <Version>21.8.1</Version>
    </PackageReference>

    So, don't update the new NuGet packages for now, otherwise you'll lose configuration editors.

Reply
  • Ok, here is the cause: a bug in the updated NuGet packages for Interop.MFilesAPIMFiles.Crypto and MFiles.VAF.Configuration.

    After creating the solution, I updated the new NuGET packages for to the latest versions, and the MFAdmin configuration editor started to fail.

     <PackageReference Include="Interop.MFilesAPI">
    <Version>21.10.7</Version>
    </PackageReference>
    <PackageReference Include="MFiles.Crypto">
    <Version>21.10.7</Version>
    </PackageReference>
    <PackageReference Include="MFiles.VAF">
    <Version>2.3.623.2</Version>
    </PackageReference>
    <PackageReference Include="MFiles.VAF.Configuration">
    <Version>21.10.7</Version>

    To cross reference, I downgraded the package references in the csproj file to the numbers below, and the configuration options editor started to work again in MFAdmin.

     <PackageReference Include="Interop.MFilesAPI">
    <Version>21.8.1</Version>
    </PackageReference>
    <PackageReference Include="MFiles.Crypto">
    <Version>21.8.1</Version>
    </PackageReference>
    <PackageReference Include="MFiles.VAF">
    <Version>2.3.623.2</Version>
    </PackageReference>
    <PackageReference Include="MFiles.VAF.Configuration">
    <Version>21.8.1</Version>
    </PackageReference>

    So, don't update the new NuGet packages for now, otherwise you'll lose configuration editors.

Children