diff --git a/docs/visual-basic/misc/bc30981.md b/docs/visual-basic/misc/bc30981.md index f94bc1015bba9..7cd4d3b317791 100644 --- a/docs/visual-basic/misc/bc30981.md +++ b/docs/visual-basic/misc/bc30981.md @@ -11,8 +11,15 @@ ms.assetid: fb68e246-c135-4e7a-a1be-12d83dbcf96f --- # \ in class \ cannot override \ in class \ because an intermediate class \ overrides \ in class \ but is not accessible. +**Error ID:** BC30981 + ## To correct this error +- Change the inheritance structure to directly inherit from the base class instead of going through the intermediate class. +- Make the intermediate class accessible by changing its access modifier to `Public` or an appropriate level. +- Override the member at the appropriate level in the inheritance hierarchy where it is accessible. +- Review the class design to ensure proper access levels throughout the inheritance chain. + ## See also - [Access levels in Visual Basic](../programming-guide/language-features/declared-elements/access-levels.md) diff --git a/docs/visual-basic/misc/bc31199.md b/docs/visual-basic/misc/bc31199.md index 0be8cd8498ecb..1fd28d4da6856 100644 --- a/docs/visual-basic/misc/bc31199.md +++ b/docs/visual-basic/misc/bc31199.md @@ -15,6 +15,10 @@ ms.assetid: c150778e-c82d-4e6e-acc0-06080eece1d1 ## To correct this error +- Update to a supported version of the .NET Framework that includes the required components for Win32 manifest embedding. +- Remove the `/win32manifest` compiler option if Win32 manifest embedding is not required for your project. +- Verify that the .NET Framework installation is complete and includes the necessary updates for manifest support. + ## See also - [-win32manifest (Visual Basic)](../reference/command-line-compiler/win32manifest.md) diff --git a/docs/visual-basic/misc/bc31536.md b/docs/visual-basic/misc/bc31536.md index baf8e55cdd4e7..58c775bc8096e 100644 --- a/docs/visual-basic/misc/bc31536.md +++ b/docs/visual-basic/misc/bc31536.md @@ -15,6 +15,22 @@ ms.assetid: ce87cc25-ab61-4d5f-b0f8-2e87cc479d62 ## To correct this error +- Add the public key information in the project settings for the friend assembly. +- Use the command-line compiler switch to specify the public key: + + ``` + vbc /keyfile:mykey.snk /reference:friendassembly.dll mycode.vb + ``` + +- Add the public key information to the `InternalsVisibleTo` attribute in the friend assembly: + + ```vb + ")> + ``` + +- Ensure both assemblies use the same strong naming key if strong naming is required. +- Check that the friend assembly declaration is correctly formatted and the assembly name matches exactly. + ## See also - diff --git a/docs/visual-basic/misc/bc31537.md b/docs/visual-basic/misc/bc31537.md index 72f882813d8d6..132da7589dce6 100644 --- a/docs/visual-basic/misc/bc31537.md +++ b/docs/visual-basic/misc/bc31537.md @@ -15,6 +15,17 @@ ms.assetid: a5b88d90-ce11-44cb-8df2-457f661a553b ## To correct this error +- Verify that the friend declaration syntax is correct and the assembly name is valid. +- Check that the referenced assembly exists and is accessible: + + ```vb + ' Ensure the assembly reference is correct + + ``` + +- Confirm that the strong name or public key token matches between assemblies if strong naming is used. +- Ensure the friend assembly has been compiled and is available to the current project. + ## See also - diff --git a/docs/visual-basic/misc/bc31538.md b/docs/visual-basic/misc/bc31538.md index 4c36418ad7c65..a43b788b2b08d 100644 --- a/docs/visual-basic/misc/bc31538.md +++ b/docs/visual-basic/misc/bc31538.md @@ -11,8 +11,18 @@ ms.assetid: a0b13f40-eee2-46fd-9e85-11c3988f7a95 --- # Member \ cannot override member \ defined in another assembly/project because… +**Error ID:** BC31538 + ## To correct this error +Review the access levels of the base member in the referenced assembly to determine the appropriate modifier. Ensure the overriding member does not expand the accessibility of the base member being overridden. For example, change the access modifier from `Protected Friend` to `Protected` for the overriding member: + +```vb +' Instead of Protected Friend (which expands access) +Protected Overrides Sub MyMethod() +' Use Protected (which matches the base member access level) +``` + ## See also - [Friend](../language-reference/modifiers/friend.md) diff --git a/docs/visual-basic/misc/bc36613.md b/docs/visual-basic/misc/bc36613.md index 0db43e5533bb7..5fb973271cd19 100644 --- a/docs/visual-basic/misc/bc36613.md +++ b/docs/visual-basic/misc/bc36613.md @@ -15,6 +15,8 @@ ms.assetid: 592d52a2-7442-472c-8b84-9dc63e24ba79 ## To correct this error +Ensure the XML identifier follows Visual Basic naming rules (starts with letter or underscore, contains only letters, digits, and underscores), or use a valid Visual Basic identifier for the property name explicitly. + ## See also - [Declared Element Names](../programming-guide/language-features/declared-elements/declared-element-names.md) diff --git a/docs/visual-basic/misc/bc36614.md b/docs/visual-basic/misc/bc36614.md index ab1c9759bc148..29cd731b64471 100644 --- a/docs/visual-basic/misc/bc36614.md +++ b/docs/visual-basic/misc/bc36614.md @@ -15,6 +15,8 @@ ms.assetid: cfa9a854-c70e-4f10-a009-2686c650ca2b ## To correct this error +Ensure the XML identifier follows Visual Basic naming rules when used as a range variable (starts with letter or underscore, contains only letters, digits, and underscores), or use a valid Visual Basic identifier for the range variable name explicitly. + ## See also - [Introduction to LINQ in Visual Basic](../programming-guide/language-features/linq/introduction-to-linq.md) diff --git a/docs/visual-basic/misc/bc42207.md b/docs/visual-basic/misc/bc42207.md index 910c78553635f..a958853cba04f 100644 --- a/docs/visual-basic/misc/bc42207.md +++ b/docs/visual-basic/misc/bc42207.md @@ -15,6 +15,18 @@ ms.assetid: c6129559-7273-4abe-b2f1-deea05d242c9 ## To correct this error +- Verify that the assembly reference path is correct and the assembly file exists: + + ```vb + ' Check the assembly reference in project settings + ' Ensure the file path is valid and accessible + ``` + +- Confirm that the referenced assembly is compiled for a compatible target framework. +- Check that the assembly is not corrupted by trying to reference it in a new test project. +- If the assembly requires dependencies, ensure they are also available and properly referenced. +- Update the assembly reference to point to the correct version or location of the assembly. + ## See also - [Visual Basic Command-Line Compiler](../reference/command-line-compiler/index.md)