473,473 Members | 2,178 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

type or namespace name does not exists, but it does.

Hi all,

I've got a project I've been assigned to do maintenance work on. When I
originally took it out of Source Safe it compiled just fine. I even made
changes and it compiled fine.

The project is structured as a solution containing several (7) other
solutions. One sub-solution is a utility module exporting the namespace
LotUtility, which exports a bunch of functionality through a couple of static
classes called Util and User. This sub-solution generates a file called
LotUtility1.dll and compiles just fine.

In another project called LotPresentation I have a 'using LotUtility;'
entry, and a reference to the correct .dll in the assembly. I've checked the
..dll version carefully and it is correct.

However, after compiling the LotUtility project, I can no longer compile the
LotPresentation project. All references to the Util class are not found in
the LotUtility namespace. This is so bizzare because it finds the User class
just fine.

It finds the class correctly if I fully qualify it:
LotUtility.Util.Methodname, but not with just Util.Methodname. I've removed
and re-added the reference several times.

I'm also getting the warning: Warning: The dependency 'LotUtility1,
Version=2006.55.2369.14779, Culture=neutral' in project 'LotPresentation'
cannot be copied to the run directory because it would overwrite the
reference 'LotUtility1, Version=2006.55.2369.21916, Culture=neutral'.

I have no idea what's going on here. I've also checked the text of the
..cdproj files and .sol files, and nothing seems amiss there. Of course I'm
not accustomed to reading them, so I may not know if it was.

Any ideas appreciated.

Brian

Jun 28 '06 #1
3 2084
"Brian Myers" <Brian My***@discussions.microsoft.com> wrote in message
news:EF**********************************@microsof t.com...
Hi all,

I've got a project I've been assigned to do maintenance work on. When I
originally took it out of Source Safe it compiled just fine. I even made
changes and it compiled fine.

The project is structured as a solution containing several (7) other
solutions. One sub-solution is a utility module exporting the namespace
LotUtility, which exports a bunch of functionality through a couple of
static
classes called Util and User. This sub-solution generates a file called
LotUtility1.dll and compiles just fine.

In another project called LotPresentation I have a 'using LotUtility;'
entry, and a reference to the correct .dll in the assembly. I've checked
the
.dll version carefully and it is correct.

However, after compiling the LotUtility project, I can no longer compile
the
LotPresentation project. All references to the Util class are not found in
the LotUtility namespace. This is so bizzare because it finds the User
class
just fine.

It finds the class correctly if I fully qualify it:
LotUtility.Util.Methodname, but not with just Util.Methodname. I've
removed
and re-added the reference several times.

I'm also getting the warning: Warning: The dependency 'LotUtility1,
Version=2006.55.2369.14779, Culture=neutral' in project 'LotPresentation'
cannot be copied to the run directory because it would overwrite the
reference 'LotUtility1, Version=2006.55.2369.21916, Culture=neutral'.

I have no idea what's going on here. I've also checked the text of the
.cdproj files and .sol files, and nothing seems amiss there. Of course I'm
not accustomed to reading them, so I may not know if it was.


My guess would be that some other compiled and referenced dll uses
LotUtility also. The other dll is trying to use the older version while your
main project is trying to use the newer version. Compile the other dll also
and it should fix the problem.

Michael
Jun 28 '06 #2
Brian Myers wrote:
I'm also getting the warning: Warning: The dependency 'LotUtility1,
Version=2006.55.2369.14779, Culture=neutral' in project 'LotPresentation'
cannot be copied to the run directory because it would overwrite the
reference 'LotUtility1, Version=2006.55.2369.21916, Culture=neutral'.


In addition to the other response, you should not directly reference
the .dll if you can avoid it. Use a project reference instead. That
way, all the dependencies can be handled better by VS. See this link:

http://msdn.microsoft.com/library/de...ml/tdlg_rm.asp
Especially Chapter 4, "Managing Dependencies"

Jun 28 '06 #3
Ok, I looked for anything that might reference LotUtility. There are three
projects that reference it. LotDomain, LotPresentation, and LotEntryPoint. I
changed the reference in LotDomain to a project reference per Chris'
suggestion.

LotDomain compiles just fine. LotPresentation still fails the same way, and
LotEntryPoint depends on both of these, so it can't be compiled yet.

So far as I know there's nothing else that uses the LotUtility dll.

Thanx for the attempt though. Any other ideas out there?

Brian

"Chris Dunaway" wrote:
Brian Myers wrote:
I'm also getting the warning: Warning: The dependency 'LotUtility1,
Version=2006.55.2369.14779, Culture=neutral' in project 'LotPresentation'
cannot be copied to the run directory because it would overwrite the
reference 'LotUtility1, Version=2006.55.2369.21916, Culture=neutral'.


In addition to the other response, you should not directly reference
the .dll if you can avoid it. Use a project reference instead. That
way, all the dependencies can be handled better by VS. See this link:

http://msdn.microsoft.com/library/de...ml/tdlg_rm.asp
Especially Chapter 4, "Managing Dependencies"

Jun 28 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

88
by: Tim Tyler | last post by:
PHP puts most of its functions into a big flat global namespace. That leads to short function names - but creates a namespace minefield for programmers. Lots of the functions are legacies from...
1
by: Ray | last post by:
<%@ Import Namespace="System.Windows.Forms"% I got this error message. I searched System.windows.Forms, I found the dll file in the c:\programfiles\visual studio.. It is only 1 137kb size....
8
by: Petter Reinholdtsen | last post by:
I ran into a problem on HP-UX 11.00 the other day, where it refused to compile a program using 'using namespace std;' at the top. The reason seem to be that the compiler refuses to accept 'using...
7
by: Kevin Newman | last post by:
I've been toying with a namespace manager, and wanted to get some input. So what do you think? if (typeof com == 'undefined') var com = {}; if (!com.unFocus) com.unFocus = {}; ...
1
by: Anton Pervukhin | last post by:
Hi everybody! While trying to implement a generic sorting function which takes a member function(on which base the actual sort happens) as a parameter, I have met the problem that I need to use...
12
by: Michael Maes | last post by:
Hello, I have a BaseClass and many Classes which all inherit (directly) from the BaseClass. One of the functions in the BaseClass is to (de)serialize the (inherited) Class to/from disk. ...
14
by: Geoff Jones | last post by:
Hi I'm trying to use a class that I've written in a form. Unfortunately, when I write something like: Public x As New myClass I get the compile time error: "Type Expected". Indeed, the...
3
by: ripster | last post by:
Hi, I am working on a project which has a wsdl file which contains two elements (lets call then the Name element) with same name but under different targetNamespaces. When I generate the client...
0
by: Jigar.Patel | last post by:
I have simple remoting server exposing following simple method. When I try to add webreference to this server in another project, it gives me following error: Custom tool error: Unable to import...
2
by: Andrus | last post by:
I'm trying to compile myGeneration PropertyCollectionAll.cs file with VCS Express 2005 bot got error Error 1 The type or namespace name 'Collection' could not be found (are you missing a using...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.