Click here to Skip to main content
15,881,172 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I'm learning asp.net and so I'm trying to build up the project named "Wingtip Toys" from MSDN. The project is developed on VS 2013 and I have VS 2012. When I try to add the bootstrap as per instruction from here I get the error on running time in browser.

Server Error in '/' Application.

    'bootstrap' is not a valid script name. The name must end in '.js'.

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.InvalidOperationException: 'bootstrap' is not a valid script name. The name must end in '.js'.


when I add the .js on the master page it carry me to another error, I also add the css file to Bundle.config but still the same result. I have already Nuget package availble as for the Jquery.js error but I'm unable to sort this out yet.
Posted
Updated 1-Nov-14 17:29pm
v3

That tutorial target Microsoft .NET Framework 4.5.2.[^] You need to installed it and target the same framework when you create this project and also note that there are many nuget packages you need to install.
XML
<packages> 
  <package id="Antlr" version="3.4.1.9004" targetframework="net452" /> 
  <package id="AspNet.ScriptManager.bootstrap" version="3.0.0" targetframework="net452" /> 
  <package id="AspNet.ScriptManager.jQuery" version="1.10.2" targetframework="net452" /> 
  <package id="bootstrap" version="3.0.0" targetframework="net452" /> 
  <package id="elmah" version="1.2.2" targetframework="net452" /> 
  <package id="elmah.corelibrary" version="1.2.2" targetframework="net452" /> 
  <package id="EntityFramework" version="6.1.1" targetframework="net452" /> 
  <package id="jQuery" version="1.10.2" targetframework="net452" /> 
  <package id="Microsoft.AspNet.FriendlyUrls" version="1.0.2" targetframework="net452" /> 
  <package id="Microsoft.AspNet.FriendlyUrls.Core" version="1.0.2" targetframework="net452" /> 
  <package id="Microsoft.AspNet.Identity.Core" version="2.1.0" targetframework="net452" /> 
  <package id="Microsoft.AspNet.Identity.EntityFramework" version="2.1.0" targetframework="net452" /> 
  <package id="Microsoft.AspNet.Identity.Owin" version="2.1.0" targetframework="net452" /> 
  <package id="Microsoft.AspNet.Providers.Core" version="2.0.0" targetframework="net452" /> 
  <package id="Microsoft.AspNet.ScriptManager.MSAjax" version="5.0.0" targetframework="net452" /> 
  <package id="Microsoft.AspNet.ScriptManager.WebForms" version="5.0.0" targetframework="net452" /> 
  <package id="Microsoft.AspNet.Web.Optimization" version="1.1.3" targetframework="net452" /> 
  <package id="Microsoft.AspNet.Web.Optimization.WebForms" version="1.1.3" targetframework="net452" /> 
  <package id="Microsoft.Owin" version="2.1.0" targetframework="net452" /> 
  <package id="Microsoft.Owin.Host.SystemWeb" version="2.1.0" targetframework="net452" /> 
  <package id="Microsoft.Owin.Security" version="2.1.0" targetframework="net452" /> 
  <package id="Microsoft.Owin.Security.Cookies" version="2.1.0" targetframework="net452" /> 
  <package id="Microsoft.Owin.Security.Facebook" version="2.1.0" targetframework="net452" /> 
  <package id="Microsoft.Owin.Security.Google" version="2.1.0" targetframework="net452" /> 
  <package id="Microsoft.Owin.Security.MicrosoftAccount" version="2.1.0" targetframework="net452" /> 
  <package id="Microsoft.Owin.Security.OAuth" version="2.1.0" targetframework="net452" /> 
  <package id="Microsoft.Owin.Security.Twitter" version="2.1.0" targetframework="net452" /> 
  <package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetframework="net452" /> 
  <package id="Modernizr" version="2.6.2" targetframework="net452" /> 
  <package id="Newtonsoft.Json" version="6.0.3" targetframework="net452" /> 
  <package id="Owin" version="1.0" targetframework="net452" /> 
  <package id="Respond" version="1.2.0" targetframework="net452" /> 
  <package id="WebGrease" version="1.5.2" targetframework="net452" /> 
</packages>
 
Share this answer
 
v2
Comments
Ajvirk 1-Nov-14 23:01pm    
Thanks for your answer @DamithSL,I've all those packages downloaded with the sample code, so if I include them in solution just I need to drag and drop that folder or have to include using some other process? Can you make light one it for me. Also is it necessary to include the 4.5.2 framework for these packages? Is there not any workaround to work with 4.5?
DamithSL 1-Nov-14 23:09pm    
problem will be the features added on 4.5.2 framework and 4.5.2 framework dependant nuget packages may not work with 4.5 framework. in VS 2013 most of above nuget packages automatically added when you create new project but here with 2012 you may need to manually install those nuget packages and may need to configure them as well.
Ajvirk 1-Nov-14 23:33pm    
In that case can you recommend me vs2012 based similar project from MSDN as I can't install latest .net framework without vs2013, I've very poor bandwidth. I'm a beginner to asp.net so want to work with something like that to learn quickly. Thanks in advance for all your help.
Ajvirk 2-Nov-14 0:01am    
Thanks for your help, one last thing can you link me or add in answer how can I use Bootstrap in VS 2012?
I had the same problem, I just reinstalled bootstrap package with the package manger console:

PM> uPDATE-Package AspNet.ScriptManager.bootstrap -reinstall
 
Share this answer
 
<appsettings>
<add key="ValidationSettings:UnobtrusiveValidationMode" value="None" />
</appsettings>

add this to u r web.config
 
Share this answer
 
Comments
CHill60 8-May-15 7:47am    
Question was answered (accurately) 6 months ago.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900