I am getting the following error during run-time
compilation or a rebuild all of my application:
error BC30311: Value of type 'mynamespace.x' cannot be
converted to 'mynamespace.x'
This occurs in only one component/project that accesses
the 'x' object whereas several other components/projects
also use the 'x' object in several other locations in
exactly the same way without any problems. If I Rebuild
ONLY this component it compiles without error, but on the
next Run compile the error returns. It shows up briefly in
the Build Error tasks and then disappears. Odd (I think).
Any suggestions?
Thanks,
David 9 41961
Either use an alias for the namespace or using fully qualified identifiers
in your code.
Regards - OHM
David wrote: I am getting the following error during run-time compilation or a rebuild all of my application:
error BC30311: Value of type 'mynamespace.x' cannot be converted to 'mynamespace.x'
This occurs in only one component/project that accesses the 'x' object whereas several other components/projects also use the 'x' object in several other locations in exactly the same way without any problems. If I Rebuild ONLY this component it compiles without error, but on the next Run compile the error returns. It shows up briefly in the Build Error tasks and then disappears. Odd (I think).
Any suggestions?
Thanks,
David
--
Best Regards - OHM
O_H_M{at}BTInte rnet{dot}com
thank you. unfortunately I had already tried this approach
and it failed to make a difference:
I have tried:
Imports mynamespace.x
and then a direct reference to 'x'
as well as a fully qualified reference to 'x'
both failed.
Any other thoughts?
Thanks,
David -----Original Message----- Either use an alias for the namespace or using fully
qualified identifiersin your code.
Regards - OHM
David wrote: I am getting the following error during run-time compilation or a rebuild all of my application:
error BC30311: Value of type 'mynamespace.x' cannot be converted to 'mynamespace.x'
This occurs in only one component/project that accesses the 'x' object whereas several other components/projects also use the 'x' object in several other locations in exactly the same way without any problems. If I Rebuild ONLY this component it compiles without error, but on
the next Run compile the error returns. It shows up briefly
in the Build Error tasks and then disappears. Odd (I
think). Any suggestions?
Thanks,
David
-- Best Regards - OHM
O_H_M{at}BTInt ernet{dot}com
.
If this is a clash, then dont use the imports statement. In each case use
the fully qualified id
If you are fully qualifying the identifier in each instance which it is
referred, then it cannot be a clash between namespaces, something else must
be going on. The fact that you were able to compile it once suggest that
there may be some declarative dependency ( a bug ).
One suggestion may be to create a new project and re-add all the resources
and see if this clears the problem. Most odd !
Regards - OHM
David wrote: thank you. unfortunately I had already tried this approach and it failed to make a difference:
I have tried: Imports mynamespace.x and then a direct reference to 'x'
as well as a fully qualified reference to 'x'
both failed.
Any other thoughts?
Thanks,
David
-----Original Message----- Either use an alias for the namespace or using fully qualified identifiers in your code.
Regards - OHM
David wrote: I am getting the following error during run-time compilation or a rebuild all of my application:
error BC30311: Value of type 'mynamespace.x' cannot be converted to 'mynamespace.x'
This occurs in only one component/project that accesses the 'x' object whereas several other components/projects also use the 'x' object in several other locations in exactly the same way without any problems. If I Rebuild ONLY this component it compiles without error, but on the next Run compile the error returns. It shows up briefly in the Build Error tasks and then disappears. Odd (I think).
Any suggestions?
Thanks,
David
-- Best Regards - OHM
O_H_M{at}BTInte rnet{dot}com
.
--
Best Regards - OHM
O_H_M{at}BTInte rnet{dot}com
Thanks for taking the time to respond. I'll give it a try.
David -----Original Message----- If this is a clash, then dont use the imports statement.
In each case usethe fully qualified id
If you are fully qualifying the identifier in each
instance which it isreferred, then it cannot be a clash between namespaces,
something else mustbe going on. The fact that you were able to compile it
once suggest thatthere may be some declarative dependency ( a bug ).
One suggestion may be to create a new project and re-add
all the resourcesand see if this clears the problem. Most odd !
Regards - OHM David wrote: thank you. unfortunately I had already tried this
approach and it failed to make a difference:
I have tried: Imports mynamespace.x and then a direct reference to 'x'
as well as a fully qualified reference to 'x'
both failed.
Any other thoughts?
Thanks,
David
-----Original Message----- Either use an alias for the namespace or using fully
qualified identifiers in your code.
Regards - OHM
David wrote: I am getting the following error during run-time compilation or a rebuild all of my application:
error BC30311: Value of type 'mynamespace.x' cannot be converted to 'mynamespace.x'
This occurs in only one component/project that
accesses the 'x' object whereas several other
components/projects also use the 'x' object in several other locations in exactly the same way without any problems. If I
Rebuild ONLY this component it compiles without error, but on
the next Run compile the error returns. It shows up
briefly in the Build Error tasks and then disappears. Odd (I
think). Any suggestions?
Thanks,
David
-- Best Regards - OHM
O_H_M{at}BTInte rnet{dot}com
.
-- Best Regards - OHM
O_H_M{at}BTInt ernet{dot}com
.
* "David" <dr*****@no-spam.hotmail.co m> scripsit: I am getting the following error during run-time compilation or a rebuild all of my application:
error BC30311: Value of type 'mynamespace.x' cannot be converted to 'mynamespace.x'
This occurs in only one component/project that accesses the 'x' object whereas several other components/projects also use the 'x' object in several other locations in exactly the same way without any problems. If I Rebuild ONLY this component it compiles without error, but on the next Run compile the error returns. It shows up briefly in the Build Error tasks and then disappears. Odd (I think).
Are you using more than one project in the same solution? Maybe
changing the build order helps (right-click the solution and choose the
appropriate menu item). Are you sure there is no name conflict?
--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Hi David,
I agree with Herfried's suggestion.
Have you tried that?Did that work for you?
If no, you may try to create a new project and declare a new namespace to
see if the problem persists, and then add the code line from your original
namespace project step by step to see what cause the error.
If you have any concern on this issue, please post here.
Regards,
Peter Huang
Microsoft Online Partner Support
Get Secure! www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
Thank you gentlemen for taking the time to respond.
I went back and changed all of my references from these
components from the Actual DLL (rerferenced from the Bin
of that specific project) to the DLL under the projects
tab instead and it all seems to be running okay now.
Thanks for your suggestions.
David -----Original Message----- Hi David,
I agree with Herfried's suggestion. Have you tried that?Did that work for you? If no, you may try to create a new project and declare a
new namespace tosee if the problem persists, and then add the code line
from your originalnamespace project step by step to see what cause the
error. If you have any concern on this issue, please post here.
Regards, Peter Huang Microsoft Online Partner Support Get Secure! www.microsoft.com/security This posting is provided "as is" with no warranties and
confers no rights. .
* "David" <dr*****@no-spam.hotmail.co m> scripsit: I went back and changed all of my references from these components from the Actual DLL (rerferenced from the Bin of that specific project) to the DLL under the projects tab instead and it all seems to be running okay now.
Thank you for sharing this experience with us.
--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Hi,
I run into same problem. I even tried this approach to use PROJEC
REFERENCE instead of file reference. But it failed. I checked o
Microsoft sute http://tinyurl.com/5hwpp I used this hint, used fil
refernce and it worked. However in some other scenario (i have about 2
projects:some C# and some VB.Net) it failed and i had to go back t
project references.
So i think best solution is - try first project reference, if it doe
not work, try file reference. Either of them is guanranteed to work
as per my experience.
Thanks
Ravi
David wrote: *Thank you gentlemen for taking the time to respond.
I went back and changed all of my references from these components from the Actual DLL (rerferenced from the Bin of that specific project) to the DLL under the projects tab instead and it all seems to be running okay now.
Thanks for your suggestions.
David
-----Original Message----- Hi David,
I agree with Herfried's suggestion. Have you tried that?Did that work for you? If no, you may try to create a new project and declare a new namespace tosee if the problem persists, and then add the code line from your originalnamespace project step by step to see what cause the error. If you have any concern on this issue, please post here.
Regards, Peter Huang Microsoft Online Partner Support Get Secure! www.microsoft.com/security This posting is provided "as is" with no warranties and
confers no rights. .
-
raviraj_b
-----------------------------------------------------------------------
Posted via http://www.mcse.m
-----------------------------------------------------------------------
View this thread: http://www.mcse.ms/message245902.htm This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Dica |
last post by:
i'm getting an error when trying set my dataAdapter's selectCommand. the
sqlStatement is a storedProc which takes parameters, so it's constructed as:
sqlSelectCommand1.CommandText = "";
sqlSelectCommand1.CommandType = System.Data.CommandType.StoredProcedure;
sqlSelectCommand1.Connection = sqlConnection1;
sqlSelectCommand1.Parameters.Add(new
|
by: Barry |
last post by:
object type cannot be converted to target type - i am getting this error message occuring numerous times in my task list, my project compiles and runs ok but it is a nuisance, I think Ihva eheard of this before but I cannot remember the solution, anybody got any help?
|
by: eelis.net |
last post by:
Hi
I tried to convert the following C# code to vb.net.
code in C#
________________________________________________________________
using System;
using System.Reflection;
using System.Resources;
|
by: news.microsoft.com |
last post by:
I got this error "Object type cannot be converted to target type" in my VB
Winforms application. When I click on it, it goes no where, how do I
troubleshoot this? Thank you.
|
by: Mathieu Cartoixa |
last post by:
Hi,
I have been annoyed in one of my recent projects with a problem related
to the explicit implementation of an interface on a value type. I will
take an example to show the problem.
Say we have this simple interface :
interface IInitializable
{
void Init();
| |
by: andy6 via DotNetMonster.com |
last post by:
I took a c++ 6.0 project and converted it to c++ .net 2005 project. I want to
make a web service out of it. One of the new files I created was a cpp where
I have the webmethod pointing to a function in the previously 6.0 code and I
get the error noted below. What I don't understand is since I created this
cpp as a new file in .net and inherited from a .net base class then why would
I get this error? Both the class and base class to me...
|
by: =?Utf-8?B?RGFuZGFuIFpoYW5n?= |
last post by:
I have a web method and there are the following sections in web.config:
<system.web>
<webServices>
<soapExtensionTypes>
<add type="SampleClass.SampleExtension, SampleClass" priority="1"
group="1"/>
</soapExtensionTypes>
<protocols>
<remove name="HttpPost"/>
<remove name="HttpGet"/>
|
by: jianxin9 |
last post by:
Hi everyone,
I don't have a lot of experience with ASP and I was hoping someone could help me. I want to use our ASP form along with some javascript code to create a form where our patrons can select which department they will send the form to (we are trying to consolidate forms). This is what I have so far, but when I test the form, I keep getting this error message:
Mailing Failed... Error is:
FromAddress Property cannot be blank.
You...
|
by: vinayaktripathi |
last post by:
Hi all,
I need to send following data to a network device.
byte MyArray=new byte { 0x00, 0x00, 0x00, 0xAF, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x1CD };
But getting error :
"Constant value '461' cannot be converted to a 'byte'"
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |