jmbledsoe / angularjs-visualstudio-intellisense

Visual Studio extension providing statement completion for injected AngularJS components in JavaScript files.
MIT License
110 stars 22 forks source link

Release build without the js file #15

Closed renatoch closed 9 years ago

renatoch commented 9 years ago

Hello, First of all, great code! Helps a lot in the day to day stuff. Question I have: I don't want to release the js file, just use it while developing. Any easy way to do that? Cheers

jmbledsoe commented 9 years ago

I believe you can just change the "Build Action" from "Content" to "None" to prevent the file from being published along with your web application. I haven't tested this but I believe it will work. Alternately, you can just place the file in a well-known location on your machine and add a reference in Visual Studio Options => Text Editor => JavaScript => IntelliSense => References. That should work as well.

Please reply if either of these options works for you!

On Mon, Jan 26, 2015 at 10:58 AM, renatoch notifications@github.com wrote:

Hello, First of all, great code! Helps a lot in the day to day stuff. Question I have: I don't want to release the js file, just use it while developing. Any easy way to do that? Cheers

— Reply to this email directly or view it on GitHub https://github.com/jmbledsoe/angularjs-visualstudio-intellisense/issues/15 .

jmatthiesen commented 9 years ago

I think John is right re: the build action, but the suggestion to edit JavaScript references likely won't work for you in this case - The angular.intellisense.js file is auto-loaded by Visual Studio right after loading angular.js (or angular.min.js) if it is present. When you add it as an explicit reference the editor won't load it correctly. Instead, there's a location in Program Files you can use and VS will automatically load the extension for you if it's found there, with no need to include it in your project.

From the README: If you prefer to enable AngularJS intellisene for all of your web projects, simply save the angular.intellisense.js file to your %PROGRAMFILES%\Microsoft Visual Studio 12.0\JavaScript\References folder. %PROGRAMFILES% is the location of your program files folder, usually under C:\Program Files or C:\Program Files (x86).

renatoch commented 9 years ago

Thanks guys! That did the trick! (changing content type to none and do not copy).

Another question I have: The intellisense only work in .js files, right? Is there any way to make intellisense in c# .cshtml files, so that they don't show as unrecognized and red underlined?

Cheers

jmbledsoe commented 9 years ago

Jordan is the authority on this, but I am almost certain that you will only get IntelliSense for JavaScript files in Visual Studio.

On Mon, Jan 26, 2015 at 9:14 PM, renatoch notifications@github.com wrote:

Thanks guys! That did the trick! (changing content type to none and do not copy).

Another question I have: The intellisense only work in .js files, right? Is there any way to make intellisense in c# .cshtml files, so that they don't show as unrecognized and red underlined?

Cheers

— Reply to this email directly or view it on GitHub https://github.com/jmbledsoe/angularjs-visualstudio-intellisense/issues/15#issuecomment-71578544 .