command line compiler question

  • Thread starter Thread starter Brian Hman
  • Start date Start date
B

Brian Hman

I'm am building a C# assembly using csc.exe, and I'm getting the following
error:

XmlResponder.cs(5,23): error CS0234: The type or namespace name 'VB' does not
exist in the namespace 'Regulatory.Data' (are you missing an assembly
reference?)

Now this appears to indicate that I need to add a reference to the command
line arguments. The confusing part here is that I have two assemblies with
almost the same name: Regulatory.Data.dll and Regulatory.Data.VB.dll, and I
call the both with the /reference argument to the compiler like this:

/reference:d:\builds\output\Regulatory.Data.dll
/reference:d:\builds\output\Regulatory.Data.VB.dll

Since I reference both here, why do I get the error? Do I need to add an
argument to tell the compiler about the similar but seperate names? Does the
have to do with the order?

Any direction is appreciated!

Thanks,
Brian Hman
 
I'm am building a C# assembly using csc.exe, and I'm getting the following
error:

XmlResponder.cs(5,23): error CS0234: The type or namespace name 'VB' doesnot
        exist in the namespace 'Regulatory.Data' (are you missingan assembly
        reference?)

How does the line of code look?
Now this appears to indicate that I need to add a reference to the command
line arguments. The confusing part here is that I have two assemblies with
almost the same name: Regulatory.Data.dll and Regulatory.Data.VB.dll, andI
call the both with the /reference argument to the compiler like this:

/reference:d:\builds\output\Regulatory.Data.dll
/reference:d:\builds\output\Regulatory.Data.VB.dll

Since I reference both here, why do I get the error?  Do I need to add an
argument to tell the compiler about the similar but seperate names? Does the
have to do with the order?  

For starters, you should remember that namespaces and assemby names
are completely orthogonal. There's no requirement that they match
(though it's a well-established convention).

When you write "Regulatory.Data.VB.<something>" in your code, the
prefix is namespace name, not assembly name. It may well be that
assembly Regulatory.Data.VB does not introduce a new namespace, but
instead contains types within some other namespace (maybe even the
same "Regulatory.Data" namespace as the other assembly).
 
Hi Brian,

Pavel is right about the relationship between the namespaces and
assemblies. So I think you need to read the document (or talk to the
author) of the assemblies you're referencing, to find out in which assembly
the type you're using stays.

If you have any further questions regarding this issue, please feel free to
post here.

Regards,

Jie Wang ([email protected], remove 'online.')

Microsoft Online Community Support

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
(e-mail address removed).

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subscriptions/aa948868.aspx#notifications.

Note: MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 2 business days is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions. Issues of this
nature are best handled working with a dedicated Microsoft Support Engineer
by contacting Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/en-us/subscriptions/aa948874.aspx
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
 
Hi Brian,

Is the problem solved?

Do you have any further question on this issue?

If you need assistance, please don't hesitate to let me know. I'll be happy
to help.

Thanks,

Jie Wang ([email protected], remove 'online.')

Microsoft Online Community Support

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
(e-mail address removed).

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subscriptions/aa948868.aspx#notifications.

Note: MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 2 business days is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions. Issues of this
nature are best handled working with a dedicated Microsoft Support Engineer
by contacting Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/en-us/subscriptions/aa948874.aspx
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
 
Back
Top