Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions docs/visual-basic/misc/bc30981.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,15 @@ ms.assetid: fb68e246-c135-4e7a-a1be-12d83dbcf96f
---
# \<member> in class \<class> cannot override \<baseMember> in class \<baseClass> because an intermediate class \<intermediateClass> overrides \<member> in class \<baseClass> 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)
Expand Down
4 changes: 4 additions & 0 deletions docs/visual-basic/misc/bc31199.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
16 changes: 16 additions & 0 deletions docs/visual-basic/misc/bc31536.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
<Assembly: InternalsVisibleTo("YourAssembly, PublicKey=<public_key_token>")>
```

- 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

- <xref:System.Reflection.AssemblyName>
Expand Down
11 changes: 11 additions & 0 deletions docs/visual-basic/misc/bc31537.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
<Assembly: InternalsVisibleTo("ValidAssemblyName")>
```

- 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

- <xref:System.Reflection.AssemblyName>
10 changes: 10 additions & 0 deletions docs/visual-basic/misc/bc31538.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,18 @@ ms.assetid: a0b13f40-eee2-46fd-9e85-11c3988f7a95
---
# Member \<member> cannot override member \<baseMember> 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)
Expand Down
2 changes: 2 additions & 0 deletions docs/visual-basic/misc/bc36613.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 2 additions & 0 deletions docs/visual-basic/misc/bc36614.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
12 changes: 12 additions & 0 deletions docs/visual-basic/misc/bc42207.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down