'<name>' is not a member of '<classname>'

The member you have provided is not a member of the class.

Error ID: BC30456

To correct this error

  1. Check the name of the member to ensure it is accurate.

  2. Use an actual member of the class.

  3. If you are attempting to compile an SDK-style project (a project with a *.vbproj file that begins with the line <Project Sdk="Microsoft.NET.Sdk">), and the error message refers to a type or member in the Microsoft.VisualBasic.dll assembly, configure your application to compile with a reference to the Visual Basic Runtime Library. By default, a subset of the library is embedded in your assembly in an SDK-style project.

    For example, the following example fails to compile because the Microsoft.VisualBasic.Devices.ComputerInfo.InstalledUICulture property cannot be found. It is not embedded in the subset of the Visual Basic Runtime included with your application.

    Module Program
        Sub Main()
            Console.WriteLine($"Installed UI Culture: {My.Computer.Info.InstalledUICulture}")
        End Sub
    End Module
    ' Compilation produces the following output:
    '    c:\Projects\ComputerInfo\Program.vb(3,52): error BC30456: 'Computer' is not a member of 'bc30456.My'.
    '   [c:\Projects\ComputerInfo\bc30456.vbproj]
    

    To address this error, add the <VBRuntime>Default</VBRuntime> element to the projects <PropertyGroup> section, as the following Visual Basic project file shows.

    <Project Sdk="Microsoft.NET.Sdk">
      <ItemGroup>
        <Reference Include="Microsoft.VisualBasic" />
      </ItemGroup>
      <PropertyGroup>
        <VBRuntime>Default</VBRuntime>
        <OutputType>Exe</OutputType>
        <RootNamespace>bc30456</RootNamespace>
        <TargetFramework>net472</TargetFramework>
      </PropertyGroup>
    </Project>