3

I have also just installed Bootstrap via Nuget package manager, and although Bootstrap seems to be within the Dependencies area, no additional files have been added to my project. See attached screenshot. Using Visual Studio 2017 Pro

enter image description here

problem seems to be related to :

Manually Install Bootstrap in Visual Studio

Any ideas? Thanks

Metzer
  • 211
  • 1
  • 6
  • 20
  • There should be logs in the Package Manager Output window, you may be able to figure out the issues by reading the logs. – hendryanw Mar 20 '18 at 09:53
  • The logs have disappeared as I tried to reboot VS. I didnt get any errors when installing though. Perhaps I should uninstall and then reinstall, then check logs? – Metzer Mar 20 '18 at 09:56
  • try to use `dotnet add package bootstrap --version 4.0.0` and then use `dotnet restore`. – Rudresha Parameshappa Mar 20 '18 at 10:04
  • 1
    Hi, I uninstalled my current Bootstrap then tried what you suggested. It seems as though package manager installed the files- Restore completed in 651.82 ms for C:\Users\\Documents\Coding Stuff\BethanysPieShopV2\BethanysPieShopV2\BethanysPieShopV2.csproj. Successfully installed 'bootstrap 4.0.0' to BethanysPieShopV2 Successfully installed 'jQuery 3.0.0' to BethanysPieShopV2 Successfully installed 'popper.js 1.12.9' to BethanysPieShopV2 however no files are added to WWWROOT – Metzer Mar 20 '18 at 10:19

1 Answers1

0

You could try to use npm configurating file

and inside this file write this code:

{
  "version": "1.0.0",
  "name": "asp.net",
  "private": true,
  "devDependencies": {
    "bootstrap": "4.1.1"
  }
}

To use bootstrap write this code:

<link rel="stylesheet" href="~/node_modules/bootstrap/dist/css/bootstrap.min.css" />
AleXelton
  • 767
  • 5
  • 27