Tuesday, May 23, 2017

How to disable VS intellisense when devenv is invoked to build on a command line?

Leave a Comment

We use devenv to build our source code on the command line, like this:

devenv xyz.sln /build 

I noticed that even though no GUI is open, intellisense is still loaded. Messages like this make me believe this is the case:

[Failure] Could not find file 'C:\xyz\Services\Platform\DataProcessor\WebServiceClient.g.cs'. 

This is a generated file, so, of course, it does not exist at the beginning. Anyway, messages like this indicate that intellisense is running and hence resources are wasted.

Can I disable it when devenv builds the code on the command line, but have it enabled otherwise?

2 Answers

Answers 1

I do not think this is related to indexing (IntelliSense).

This error is caused because solution or project files have a reference to that specific file. If the file is missing from the filesystem at build time you will obtain this error.

I would recommend to review the build order in your project. This article describes how to ensure your project is built in the expected order.

Specifically, try to have the project that generates those source files first, then the rest of the projects that require them.

Answers 2

not sure if this can help

found this reference on microsoft: https://forums.asp.net/t/2092522.aspx?Disable+intellisense+in+Visual+Studio+2015

If You Enjoyed This, Take 5 Seconds To Share It

0 comments:

Post a Comment