英文:
Visual Studio 2022: Experimental support for decorators is a feature that is subject to change in a future release
问题
我无法在Visual Studio 2022中构建Angular应用程序。
我收到了下一个错误:
TS1219 Build:对装饰器的实验性支持是一个可能在将来的版本中更改的功能。请在您的'tsconfig'或'jsconfig'中设置'experimentalDecorators'选项以移除此警告。
有人知道如何解决这个问题吗? experimentalDecorators 已设置为false,但没有帮助。
英文:
I am unable to build an angular application in Visual Studio 2022
I receive the next error:
TS1219 Build:Experimental support for decorators is a feature that is subject to change in a future release. Set the 'experimentalDecorators' option in your 'tsconfig' or 'jsconfig' to remove this warning.
Does anybody know how to fix this issue? experimentalDecorators set to false, but it didn't help.
答案1
得分: 1
错误已通过将以下行添加到csproj文件中来修复:
<PropertyGroup Condition="'$(Configuration)' == 'Debug'">
<TypeScriptModuleKind>commonjs</TypeScriptModuleKind>
<TypeScriptExperimentalDecorators>true</TypeScriptExperimentalDecorators>
</PropertyGroup>
英文:
The errors were fixed by adding the next lines into the csproj:
<PropertyGroup Condition="'$(Configuration)' == 'Debug'">
<TypeScriptModuleKind>commonjs</TypeScriptModuleKind>
<TypeScriptExperimentalDecorators>true</TypeScriptExperimentalDecorators>
</PropertyGroup>
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论