[英]Cannot comment dnxcore in project.json (Illegal character error)
I have a strange problem when I comment out the dnxcore in the asp.net 5 (or a library) project. 当我注释掉asp.net 5(或库)项目中的dnxcore时,我遇到一个奇怪的问题。 If I want to run only on .net framework (dnx), then I can delete the dnxcore from the project.json which works fine, but when I just comment it out there is an error that it's an illegal symbol:
如果我只想在.net Framework(dnx)上运行,则可以从project.json删除dnxcore,它可以正常工作,但是当我将其注释掉时,出现一个错误,它是一个非法符号:
Seems like a bug in VS or framework to me, is there any way to fix it? 对我来说,好像是VS或框架中的错误,有什么办法可以解决?
PS I want to turn dnxcore off because the Azure Storage 6.0.0 does not support it, though I guess this is irrelevant to the question PS我想关闭dnxcore,因为Azure Storage 6.0.0不支持它,尽管我想这与问题无关
The DNX json parser doesn't support comments. DNX json解析器不支持注释。 More details here: https://github.com/aspnet/Announcements/issues/24
此处有更多详细信息: https : //github.com/aspnet/Announcements/issues/24
Instead of commenting out the data, can you instead give it a different name? 除了注释掉数据之外,您还可以给它改一个名称吗?
...
"frameworks": {
"dnx451": {}
"//dnxcore50": {
"dependencies": {
...
The idea here being that since JSON doesn't support comments, you can change the name of the property and it will be ignored. 这里的想法是,由于JSON不支持注释,因此您可以更改属性的名称,它将被忽略。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.