Click here to Skip to main content
15,898,987 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I need your help. I transfer my project from VS2013 to VS2015. But I notice the last 3 imports (System.Math,System.Data,System.IO) was in color gray and says "Import statement is unnecessary. What happen? I think this one is the reason that will cause an error.

I am using Vs2015 now - VB.net and MS access

What I have tried:

VB
Imports System.Data.OleDb
Imports System.Math
Imports System.Data
Imports System.IO
Posted
Updated 12-Apr-18 22:13pm
Comments
Richard MacCutchan 13-Apr-18 3:59am    
If the code builds and runs then what are you worried about? If the statements are grayed out then it means that there is no reference to those namespaces in your code.

1 solution

It's a Resharper message, saying that the namespaces aren't directly in use in your code.
In theory, that means that you can just remove the Import directives and nothing will go wrong.
In practice I'd comment them out just in case. I've seen occasions in the past when this message comes up for the System namespace, but removing that can cause Extension methods to stop working!

You can disable resharper rules: Ignoring Errors/Warnings in solution - Help | ReSharper[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900