requirejs-intellisense icon indicating copy to clipboard operation
requirejs-intellisense copied to clipboard

What about VS2013 ?

Open dotnetwise opened this issue 10 years ago • 9 comments

The readme.md says only 2012 works. Can you upgrade it to 2013 as well, please?

dotnetwise avatar Jul 22 '14 08:07 dotnetwise

Hi, @dotnetwise - FYI, we have official support for RequireJS in Visual Studio 2013 now. You can learn more about it at: https://msdn.microsoft.com/en-us/library/dn904583.aspx

jmatthiesen avatar Mar 20 '15 20:03 jmatthiesen

@jmatthiesen I've been directed to this page many times, but it only covers ASP.NET and .jsproj project types. What if I have a blank solution with simply a set of .js files? Standard intellisense works fine in VS2015, but requirejs does not. Seems like this requirejs-intellisense would still be needed in that case. Do you have any idea what part of it broke with the VS update?

marknuzz avatar Dec 17 '16 06:12 marknuzz

@Mnuzz - Are you just using solution files in a blank solution?

jmatthiesen avatar Dec 17 '16 07:12 jmatthiesen

Yes

marknuzz avatar Dec 17 '16 07:12 marknuzz

If you can get it to work in an ASP.NET project, then you could try putting your files into a blank ASP.NET project. However, does it even work for you in an ASP.NET project? I'm not sure if this can work outside of a project file.

jmatthiesen avatar Dec 17 '16 07:12 jmatthiesen

Using calls to intellisense.logMessage('foo') within the require.intellisense.js at various points, I confirmed that the file is executing...

marknuzz avatar Dec 17 '16 08:12 marknuzz

Unfortunately, there are some tricks built into VS to get the configuration file settings to work just right, as if running in a web browser. I haven't had to look at it for a long time, but I expect that we had to assume a project system.

jmatthiesen avatar Dec 17 '16 08:12 jmatthiesen

I'll see if I can get it to work

marknuzz avatar Dec 17 '16 08:12 marknuzz

@jmatthiesen I think the issue was a matter of confusion on my part and possibly some others that may happen across this. The AMD syntax works fine, so this works without the plugin and shows intellisense:

define('module', ['dependency'], function(dependency) {
    dependency.foo // shows intellisense on members of dependency
});

What did not work, however was this:

var dependency = require('dependency');
dependency.foo // does not show intellisense in any situation

A way to show intellisense for this second syntax would be great, but for my own purposes I am fine doing it this way. But it seems like it should be consistent from a design perspective.

marknuzz avatar Dec 19 '16 05:12 marknuzz