简体   繁体   中英

Adding a new version of Jquery via Nuget and issues with t4mvc

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?

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM