Update bootstrap in an asp.net core web application + Angular project - asp.net

I have created a sample project using Visual Studio 2017. The project is ASP.NET Core Web Application with Angular (the Angular template comes with the latest VS2017). The project was created and is working great.
I would like to update the bootstrap to the latest - what would be the best way to do that? I have tried copying over, importing in _Layout.cshtml and Index.cshtml but fails...
I am pretty new in this area, so any help would be greatly appreciate.
Thanks

Working with an empty solution here, but should be the same.
In your solution explorer, under Dependencies, there is a "npm" folder.
Right click on the folder and click "Open package.json"
Find "bootstrap" under devDependencies, and change the version to the one you want.
Pressing Ctrl+Space should show you the latest stable version if you just want the latest
If it doesn't automatically update the package for you then:
Go back to, and open the "npm" folder in the solution explorer.
Find bootstrap, and right click and select "Update Package"
Let me know if I missed anything.

Related

Xamarin.Forms: Using open source code instead of the nuget package to debug

I am using this nuget package
https://github.com/jamesmontemagno/MediaPlugin
It is available for both ios and android in pcl.
I am using it to make videos in my app.
Unfortunately, it has issues on iOS that are inside the project, not inside my code.
I am therefore trying to debug the project, not just implement the nuget library.
It does work fine on Android, so all I want to change is the iOS part.
Unfortunately, I dont know how to insert the same library when it isnt a nuget package but just the solution and also how to then adress it from pcl code.
I havent found a solution on google, but probably I dont know how to describe the problem well enought.
How can I debug an open source nuget package?
Thank you
Download or clone the src code,
Go to your project in VS,
Right click on your solution, choose Add -> Existing project,
Navigate to MediaPlugin-master\src\Media.Plugin and choose Media.Plugin.csproj file,
Right click on your iOS project (or whatever project where you use the plugin), choose Add -> Reference,
Check Media.Plugin and click OK,
Now you should be able to use the plugin in your project code after adding using Plugin.Media; (and the code of the plugin will be available to you).

ASP.Net MVC - can't change bootstrap version

I am new to Asp.Net MVC, trying to create my first website.
I was using bootstrap v4.1.1 in my project until I noticed that a library I wanted to use doesn't support it.
So I uninstalled the package (in Package Manager Console) - and installed the new targeted version v3.3.0.
Made sure that my "\scripts\bootstrap.js" is v3.3.0.
Ran the application, view source, and... surprisingly it was still using v4.1.1!
Double checked the physical files in my solution folder and there is no other "bootstrap.js" flying around!
I then renamed the file to "bootstrap3.js" (and updated the "BundleConfig.cs" accordingly), and it worked!
But as soon as I revert the file name to the original "bootstrap.js", my website starts using v4.1.1 and I have no idea where the system is getting this file from!!!
This is too weird... Hoping someone here has an idea of what's happening.

Solution explorer menu in Visual Studio 2015 is missing jspm packages and config.js

I'm following an aurelia tutorial with Visual Studio 2015 and ASP.NET core where I installed NPM and run JSPM init, but after successfully creating all the files I can't find the jspm packages or config.js file in my Solution explorer.
UPDATE 1 The hidden folders and files are now showing up, but I have to right click on the main directory and chose the option to add to existing item. As you can see from the image I have a lot of files and folders, how can I speed up the process? Is there a way to just add all files to the project at the same time instead of manually?
Note: The config.js and jspm packages are on my physical directory so I know they exist, but how can I make them show up on my solution explorer menu?
STEPS:
I opened cmd prompt and entered: jspm init + npm install jspm --save-dev and selected yes on everything except on the configuration file part I entered: wwwroot and enter yes on everything, then selected babel.
Please let me know what I should do to make the files show up on the solution explorer or at least point me in the right direction. Thank you.
Originally VS projects did not automatically include new files that were added to the Project directory manually outside of Visual Studio.
However, I find that with VS2015 Update 3 and a new AspNet Core project they do "automagically" show up.
Not sure if maybe you're on a slightly older build, etc. but you could try the older approach as follows:
Select the Project in the Project Explorer (you currently have a solution-level item selected in that screenshot) and then you will see a new icon appear in the row of icons across the top of the Solution Explorer. This is the "Show All Files" icon/button.
Clicking it will show items that are in the physical directory but are not part of the VS Project. You should be able to right-click the file an choose include in project (or at least you used to be able to do this in older projects, etc. as stated).

Visual Studio 2015 CSS Intellisense Broken

Editing cshtml files, I'm used to getting Bootstrap intellisense, regardless of what classes I've already used in said file, like so:
Originally, I thought it was just Bootstrap intellisense, but it appears that this is affecting all CSS for my new project. I can link to the CSS files, directly reference the layout file, it doesn't matter. The Bootstrap and other CSS classes do not show, unless I've already used them in the same file:
I've tried to minimize the differences between the two projects, but to no avail. They are on different machines, in different solutions, but everything else is virtually exactly the same. Here's what I've checked/tried so far.
Delete the project, re-add it.
Remove the Bootstrap Nuget package re-add it
Remove the Bootstrap Snippet Pack, Glyphfriend, Web Essentials 2015.2 extensions, re-add them.
Delete the bin and obj folders, build, clean, rebuild, close/reopen VS, restart Windows.
Deleted this folder to allow for recreation: C:\Users\MyUserName\AppData\Local\Microsoft\VisualStudio\14.0\ComponentModelCache
Both machines are running VS 2015 Update 2.
Both projects are MVC 5.
Installed all updates possible in Nuget Package Manager
Known differences
- The machine it works on is running Windows 7, the machine it doesn't is running Windows 10.
I've run into this problem again and found a solution! I'm not sure if it's the same as the original problem I had, but here's the fix anyway.
If the solution has a SQL project (.dbproj), unload it (right click > unload project). There's some weird bug in VS2015 with Bootstrap and SQL database projects that make intellisense for Bootstrap stop working.
In order to get "Class" IntelliSense in VS 2015, try this method. It works for me as follows:
Ex: Right click on any .aspx file in "Solution Explorer" of VS then select "Open With" option then from the list select "HTML Editor" option. Now try to check.
Thanks
Ali

JavaFX Projects gone?

I have been trying to find a place to download the plugin, allowing the creation of JavaFX projects, but without success.
I have installed the newest Java SDK8u65-windows-x64 but it doesn't support JavaFX Projects, or at least I couldn't figure how to create one!
Does anyone know if they have temporally taken the url's where we used to be able to download JavaFX plugins from, or is it only me, who can't find them on the Oracle website?
Thank you !
EDIT: The problem was, that I was using Eclipse Mars, which for some reason doesn't allow to auto import JavaFx, as it has some odd access restrictions on the JRE system library. How I solved it was I installed the e(fx)clipse plugin and I was able to import javafx components successfully after that!
You can develop JavaFx straight away if you are using intellij Idea and perhaps some other ides
But if you are using eclipse, you should install the e(fx)clipse for your version.
Try this link
Also if you have more than one JDKs on your system, try to use jdk 8 an the default
Right click your project > properties
Then elect “Java Build Path” on left, then “JRE System Library”, click Edit…
Select "Workspace Default JRE"
Click "Installed JREs"
Check out the list and select jdk 8....
If you don't see it, click Search…, navigate to your jdk8 path, then click OK
Now you should see all installed JREs, select the one you want
Click OK

Resources