Hi Simon,
This error seems to be specifically about a project-level import trying to import 'app.config' as a namespace, which is incorrect.
You should try the following:
1. Check Project-Level Imports
In Visual Studio:
- Right-click your project → Properties
- Go to "References" tab
- Look in the "Imported namespaces" section
- You'll likely see a line with
app.config
or justapp
- Uncheck it or remove it
2. Check .vbproj File Directly
Edit the project file:
- Right-click project → "Unload Project"
- Right-click → "Edit [YourProject].vbproj"
- Look for something like:
<ItemGroup>
<Import Include="app.config" />
</ItemGroup>
or
<Import Include="app" />
- Delete these lines
- Save and reload the project
3. Auto-Generated Import Issue
Sometimes Visual Studio auto-generates this import incorrectly. Check:
- Solution Explorer → Show All Files
- Look for any hidden .vb files that might have this import
- Check if there's a namespace called 'app' somewhere in your code
4. IntelliSense/Auto-Complete Accident
This often happens when:
- You typed "app" and IntelliSense suggested "app.config"
- You accidentally accepted it as an import instead of a file reference
- It got added to project-level imports
You might also consider creating a blank project with the same configuration to help isolate the issue. This can help determine whether the problem lies within that specific project or if it's a broader issue with Visual Studio itself.
If the issue appears to be system-wide, I’d recommend doing a clean reinstall of Visual Studio to rule out any corrupted settings or components.
If these steps didn't help you, please give me your full error message and a brief look of your project structure.