4 Replies - 628 Views - Last Post: 06 September 2012 - 09:23 AM Rate Topic: -----

#1 rex64  Icon User is offline

  • D.I.C Head

Reputation: 6
  • View blog
  • Posts: 168
  • Joined: 31-January 12

does not exist in the namespace

Posted 06 September 2012 - 07:27 AM

I am getting an error when I try and use my class. I can see other classes in my library, but not this one for some reason. I checked and made sure there are no errors in the library causing it to not load, but everything seems ok. It is a VB .NET library I am using from C#.

This code:
CoreClasses.clsNetEasy test;

Give me this error:

Quote

Error 24 The type or namespace name 'clsNetEasy' does not exist in the namespace 'CoreClasses' (are you missing an assembly reference?) C:\Users\Jeff\Documents\Visual Studio 2010\Projects\3DgameTest\3DgameTest\3DgameTest\clsNetwork.cs 14 25 3DgameTest


Here is a basic version of the class:
Imports System.Net.Sockets
Imports System.Net
Imports System.Collections.Generic
Imports System.Windows.Forms
'Implements IDisposable

Namespace CoreClasses


    Public Class clsNetEasy

     Dim checked As Integer = 0

    Shared Sub testFunction()
    End Sub
     
        End Class
    End Namespace


This post has been edited by rex64: 06 September 2012 - 07:30 AM


Is This A Good Question/Topic? 0
  • +

Replies To: does not exist in the namespace

#2 torind_2000  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: 57
  • View blog
  • Posts: 292
  • Joined: 22-August 11

Re: does not exist in the namespace

Posted 06 September 2012 - 08:18 AM

-- nevermind brainfart

This post has been edited by torind_2000: 06 September 2012 - 08:20 AM

Was This Post Helpful? 0
  • +
  • -

#3 lucky3  Icon User is offline

  • Friend lucky3 As IHelpable
  • member icon

Reputation: 231
  • View blog
  • Posts: 765
  • Joined: 19-October 11

Re: does not exist in the namespace

Posted 06 September 2012 - 08:28 AM

Might help: Microsoft.
Was This Post Helpful? 0
  • +
  • -

#4 rex64  Icon User is offline

  • D.I.C Head

Reputation: 6
  • View blog
  • Posts: 168
  • Joined: 31-January 12

Re: does not exist in the namespace

Posted 06 September 2012 - 09:15 AM

I already have the CoreClasses refrenced. I tried adding an include and using the class directly, but that did not work. I tried building the CoreClasses, and it builds successfully.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CoreClasses;

namespace _3DgameTest
{
    class clsNetwork
    {

        public static void loadNetworking()
        {
            //test line:

            CoreClasses.clsNetEasy test;
            clsNetEasy test2;

            //myNet = new CoreClasses.clsNetEasy();
            //myNet.ServerFound += Net_ServerFound;
            //myNet.DataArrival += winsock_DataArrival;

            //myNet.findServer(lstServers, "DECITY_SERVER_FINDER");
        }
    }
}



Gives me an error on both lines:

Quote

Error 24 The type or namespace name 'clsNetEasy' does not exist in the namespace 'CoreClasses' (are you missing an assembly reference?) C:\Users\Jeff\Documents\Visual Studio 2010\Projects\3DgameTest\3DgameTest\3DgameTest\clsNetwork.cs 16 25 3DgameTest
Error 25 The type or namespace name 'clsNetEasy' could not be found (are you missing a using directive or an assembly reference?) C:\Users\Jeff\Documents\Visual Studio 2010\Projects\3DgameTest\3DgameTest\3DgameTest\clsNetwork.cs 17 13 3DgameTest

This post has been edited by rex64: 06 September 2012 - 09:19 AM

Was This Post Helpful? 0
  • +
  • -

#5 rex64  Icon User is offline

  • D.I.C Head

Reputation: 6
  • View blog
  • Posts: 168
  • Joined: 31-January 12

Re: does not exist in the namespace

Posted 06 September 2012 - 09:23 AM

I found the problem. I had to remove the extra namespace, and build the library manually (by right clicking)
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1