delegateas/XrmDefinitelyTyped

Cannot find namespace VS 2022

Marvinnnne opened this issue · 3 comments

I've worked on VS 2019 and all works fine. When I upgrade to 2022, i'm facing this issue

Cannot find namespace 'Form' or 'Xrm' either all namespace in typings folder

This is my tsconfig.json :
image

I have deleted folder Xrm in order to regenerate it but it doesn't work.

Do you have any idea what is difference between VS 2019 and 2022 ?

Best regards,

In which folder does your XrmDefinitelyTyped typings live? Under src ? If not, add another include path that would include xrmdefinitelytyped .d.ts files. See #117 (comment)

Hello,

i've updated my tsconfig file because typing folder is not under src but i've still this error.

I don't understand why there is a difference between VS 2019 and VS 2022.
tsconfig
arborescence
error
directory

Huh, weird. You could try restarting VS. Otherwise maybe some MSBuild typescript properties get into the way. Anyways VS should pickup tsconfig.json as source of truth: https://www.typescriptlang.org/docs/handbook/compiler-options-in-msbuild.html

Another thing you could try adding a reference to file where form is declared and see how it goes:
/// <reference path="path.to.d.ts" />