xsharp.eu • The type or namespace name 'ETOC' could not be found
Page 1 of 1

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

Posted: Tue Feb 04, 2025 10:20 am
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

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

Posted: Tue Feb 04, 2025 10:51 am
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?

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

Posted: Tue Feb 04, 2025 1:11 pm
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

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

Posted: Tue Feb 04, 2025 6:11 pm
by boonnam
I have similar issue. Robert's suggestion about framework version fixed it for me. Thank you.

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

Posted: Wed Feb 05, 2025 9:23 am
by jcbonnett
I can report that Robert's suggestion worked for me too.

Thanks Robert and Chris.

John