3

I've added the latest release of Jquery(1.5.2) via Nuget, but t4mvc refuses to see it.

It doesn't appear in intellisense, and when i type it in manually i get:

CS0117: 'Links.Scripts' does not contain a definition for 'jquery_1_5_2_min_js'

This is the code i'm using to reference it.

<script src="@Url.Content(Links.Scripts.jquery_1_5_2_min_js)" type="text/javascript"></script>

As a side issue, how does one go about install older versions of jquery via NuGet? is it possible?

2 Answers 2

3

After adding new files, you just need to rerun T4MVC to generate updated files. You can do this by Right Clicking it and choosing 'Run Custom Tool'.

There is also a VS AddIn called Chirpy that can run T4MVC automatically.

Sign up to request clarification or add additional context in comments.

2 Comments

Thanks, i've got chirpy, and i've got the setting 'Run on Build' checked, but it didn't seem to do the trick. As soon as i added the vsdoc file through nuget it worked straightaway, though i concede that might not be the proper answer. Since you made the thing I'll take your word for it! Fantastic tool btw.
To be honest, I don't know exactly how Chirpy works and when it triggers the generation. Maybe it only regenerates where there are changes that affect the build (i.e. .cs files), and not static files. But when all else fails, manually running the Custom Tool should always work! :)
0

Ignore this question i've just solved it.

To get t4MVC to recognise new versions of Jquery it appears you also have to install the jQuery.vsdoc package too.

1 Comment

It's not likely to be related to the vsdoc file. See my answer.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.