I just updated Visual Studio 2017 from RC to final.
I didn't get the following error but recently I get this error
In building the project, I get the following error and it prevents web project to start:
我刚刚从RC更新了Visual Studio 2017到final。我没有得到以下错误但最近我得到此错误在构建项目时,我收到以下错误,它阻止Web项目启动:
Severity Code Description Project File Line Suppression State
Error eqeqeq (ESLint) Expected '===' and instead saw '=='. VistaBest.Shop.Web C:\***\Request.js 21
How can I disable JavaScript building error in Visual Studio 2017?
如何在Visual Studio 2017中禁用JavaScript构建错误?
5 个解决方案
#1
#2
11
I tried Mohammad`s solution but it didn't work. I managed to work doing the following:
我试过了*的解决方案,但它没有用。我设法做了以下工作:
- Righ click on your web .csproj file
- 右击你的网站.csproj文件
- On the first
<PropertyGroup>
add the following entry:<TypeScriptCompileBlocked>true</TypeScriptCompileBlocked>
-
在第一个
上添加以下条目: true
#3
7
Add /*eslint eqeqeq: ["error", "smart"]*/
to the first line of your Javascript code to remove the errors. https://eslint.org/docs/rules/eqeqeq
添加/ * eslint eqeqeq:[“error”,“smart”] * /到您的Javascript代码的第一行以删除错误。 https://eslint.org/docs/rules/eqeqeq
Following Mohammad's solution will turn off ESLint for syntax checking. This works in VS2015 and should work in later versions.
遵循Mohammad的解决方案将关闭ESLint以进行语法检查。这适用于VS2015,应该可以在以后的版本中使用。
#4
0
I tried Mohammad's solution but with no luck, I followed Rafeel answer and instead of adding his suggested code sample I removed below code from web .csproj
and finally I was able to build and run my project. There were two places where you should remove that in the same file. Still, I don't have any clue how the removed code will affect my solution.
我尝试了Mohammad的解决方案,但没有运气,我跟着Rafeel回答,而不是添加他建议的代码示例我从web .csproj下面删除了代码,最后我能够构建并运行我的项目。有两个地方你应该在同一个文件中删除它。不过,我不知道删除的代码将如何影响我的解决方案。
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\TypeScript\Microsoft.TypeScript.Default.props" Condition="Exists('$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\TypeScript\Microsoft.TypeScript.Default.props')" />
Hope this will also help someone to save the day..!!!
希望这也可以帮助别人节省一天.. !!!
#1
74
I think, find the solution:
我想,找到解决方案:
- Open
Tools > Options
- 打开工具>选项
- Navigate to
Text Editor > JavaScript/TypeScript > EsLint
- 导航到文本编辑器> JavaScript / TypeScript> EsLint
- Set
Enable ESLint
toFalse
- 将Enable ESLint设置为False
#2
11
I tried Mohammad`s solution but it didn't work. I managed to work doing the following:
我试过了*的解决方案,但它没有用。我设法做了以下工作:
- Righ click on your web .csproj file
- 右击你的网站.csproj文件
- On the first
<PropertyGroup>
add the following entry:<TypeScriptCompileBlocked>true</TypeScriptCompileBlocked>
-
在第一个
上添加以下条目: true
#3
7
Add /*eslint eqeqeq: ["error", "smart"]*/
to the first line of your Javascript code to remove the errors. https://eslint.org/docs/rules/eqeqeq
添加/ * eslint eqeqeq:[“error”,“smart”] * /到您的Javascript代码的第一行以删除错误。 https://eslint.org/docs/rules/eqeqeq
Following Mohammad's solution will turn off ESLint for syntax checking. This works in VS2015 and should work in later versions.
遵循Mohammad的解决方案将关闭ESLint以进行语法检查。这适用于VS2015,应该可以在以后的版本中使用。
#4
0
I tried Mohammad's solution but with no luck, I followed Rafeel answer and instead of adding his suggested code sample I removed below code from web .csproj
and finally I was able to build and run my project. There were two places where you should remove that in the same file. Still, I don't have any clue how the removed code will affect my solution.
我尝试了Mohammad的解决方案,但没有运气,我跟着Rafeel回答,而不是添加他建议的代码示例我从web .csproj下面删除了代码,最后我能够构建并运行我的项目。有两个地方你应该在同一个文件中删除它。不过,我不知道删除的代码将如何影响我的解决方案。
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\TypeScript\Microsoft.TypeScript.Default.props" Condition="Exists('$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\TypeScript\Microsoft.TypeScript.Default.props')" />
Hope this will also help someone to save the day..!!!
希望这也可以帮助别人节省一天.. !!!