Quantcast
Channel: ASP.NET Core
Viewing all articles
Browse latest Browse all 9386

Visual Studio 2015 - Bower always uses force-latest version.

$
0
0

Bower seems to be pulling down the wrong version.  I believe this is due to the integration always adding--force-latest to Bower.cmd.  Below are the Steps to Reproduce as well as the console output from Bower/npm.

I do not see where I can alter this behavior in Tools - Options.

Does anyone know of a resolution for this or have I missed something?

Steps to Reproduce

  • Using Microsoft Visual Studio Community 2015, Version 14.0.25421.03 Update 3.
  • Create a New Project.
  • Select Visual C# - .NET Code - ASP.NET Core Web Application
  • Select Web Application
  • Open Solution Explorer and note that the jQuery version is 2.2.0.  Manually opening the file and inspecting the header shows this version as well.
  • Select Dependencies - Bower - right click and select Manager Bower Packages.
  • On the Installed tab, select jquery.  In the right pane, select version 2.2.3 and click Update.Notice that in Dependencies - Bower, jquery now shows 3.1.0 instead of 2.2.3.  Manually open the jquery.js file also shows it is indeed the wrong version - Query JavaScript Library v3.1.0.
     

Console Output

"C:\Program Files (x86)\Microsoft Visual Studio 14.0\Web\External\Bower.cmd" install jquery#2.2.3 --force-latest --save
bower jquery#2.2.3              cached https://github.com/jquery/jquery-dist.git#2.2.3
bower jquery#2.2.3            validate 2.2.3 against https://github.com/jquery/jquery-dist.git#2.2.3
bower jquery#>=1.8              cached https://github.com/jquery/jquery-dist.git#3.1.0
bower jquery#>=1.8            validate 3.1.0 against https://github.com/jquery/jquery-dist.git#>=1.8
bower jquery#1.9.1 - 2          cached https://github.com/jquery/jquery-dist.git#2.2.4
bower jquery#1.9.1 - 2        validate 2.2.4 against https://github.com/jquery/jquery-dist.git#1.9.1 - 2
bower jquery#>= 1.7.2           cached https://github.com/jquery/jquery-dist.git#3.1.0
bower jquery#>= 1.7.2         validate 3.1.0 against https://github.com/jquery/jquery-dist.git#>= 1.7.2
Please note that,
    asp.net depends on jquery#2.2.0 which resolved to jquery#2.2.0
    none depends on jquery#2.2.3 which resolved to jquery#2.2.3
    bootstrap#3.3.6 depends on jquery#1.9.1 - 2 which resolved to jquery#2.2.4
    jquery-validation-unobtrusive#3.2.6 depends on jquery#>=1.8 which resolved to jquery#3.1.0
    jquery-validation#1.14.0 depends on jquery#>= 1.7.2 which resolved to jquery#3.1.0
Resort to using jquery# which resolved to jquery#3.1.0
Code incompatibilities may occur.
bower jquery                resolution Saved jquery#>= 1.7.2 as resolution
bower jquery#>= 1.7.2          install jquery#3.1.0
jquery#3.1.0 wwwroot\lib\jquery


Viewing all articles
Browse latest Browse all 9386

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>