Reputation: 573
Is there a way to resolve this below warning message. Project is not referring the System.Threading anywhere but still I get this below error message. Only difference is that, The Project's solution has around 50 plus projects, some are written in C# and some are in VB. few project targets 4.5 framework and few targets 3.0 framework.
Namespace or type specified in the project-level Imports 'System.Threading.Tasks' doesn't contain any public member or cannot be found. Make sure the namespace or the type is defined and contains at least one public member. Make sure the imported element name doesn't use any aliases.
Upvotes: 1
Views: 2981
Reputation: 1
How I Solved the Issue:
<ItemGroup>
, then remove the
<Import Include="ole" />
. Example: <ItemGroup>
<Import Include="System.Data" />
<Import Include="ole" />(Remove it)
<Import Include="System.Data.Common" />
<Import Include="System.Data.Odbc" />
<Import Include="System.Data.OleDb" />
<Import Include="System.Drawing" />
<Import Include="System.Windows.Forms" />
</ItemGroup>
Upvotes: 0
Reputation: 127553
One of your 3.0 VB projects is importing System.Threading.Tasks
in a project setting, The namespace System.Threading.Tasks
was not introduced till .NET 4.0.
Find the place that has it incorrectly added and remove it.
Upvotes: 1