The type or namespace name 'ETOC' could not be found

This forum is meant for questions and discussions about the X# language and tools
Post Reply
User avatar
jcbonnett
Posts: 2
Joined: Fri Apr 08, 2022 5:55 am

The type or namespace name 'ETOC' could not be found

Post by jcbonnett »

I have a large VS solution ported from VO. All the code compiled without errors under X# 2.20. I installed the new version X# 2.21 and recompiled. I got nearly 600 errors. They were all of the type shown in the subject line, the compiler could not find a type or namespace and suggested I might be missing a reference to another project or a USING statement. The correct references are defined and I generally have not used USING statements for X# things, only for .NET Framework names.

The curious thing is that if I go to the code where the unknown item is, right-click on it and choose Go To Definition, it navigates to the correct line in the other project that defines the item. So part of the system seems to know where these things can be found but not other parts.

The solution contains some C# projects as well and they behave just fine. It is only the X# projects that have problems.

Any suggestions?

John Bonnett
User avatar
Chris
Posts: 5079
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

Re: The type or namespace name 'ETOC' could not be found

Post by Chris »

Hi John,

Please check that the option "Enable Implicit Namespace lookup" option is enabled in all your projects (project options, Language page). Also please try removing and adding again the references, maybe something is not quite right about them.

If it still fails, can you post the full contents of the .xsproj file of one of your projects that gives errors when building it so we can have a look?
Chris Pyrgas

XSharp Development Team
chris(at)xsharp.eu
User avatar
robert
Posts: 4625
Joined: Fri Aug 21, 2015 10:57 am
Location: Netherlands

Re: The type or namespace name 'ETOC' could not be found

Post by robert »

John,

Please make sure that the framework version of the project where ETOC is defined is smaller than or equal to the framework version of the project where you are using it from.

Robert
XSharp Development Team
The Netherlands
robert@xsharp.eu
boonnam
Posts: 89
Joined: Mon May 08, 2017 6:42 pm
Location: USA

Re: The type or namespace name 'ETOC' could not be found

Post by boonnam »

I have similar issue. Robert's suggestion about framework version fixed it for me. Thank you.
User avatar
jcbonnett
Posts: 2
Joined: Fri Apr 08, 2022 5:55 am

Re: The type or namespace name 'ETOC' could not be found

Post by jcbonnett »

I can report that Robert's suggestion worked for me too.

Thanks Robert and Chris.

John
Post Reply