Scaffolding Identity Deletes All Content in site.css and site.js
See original GitHub issueFrom @jkotas on October 8, 2018 4:34
From @robinwilson16 on October 7, 2018 22:5
Each time I scaffold identity in a project by right-clicking the project and go to New… > Scaffolded Item and and select Identity and add all pages I then find this deletes all content in site.css and site.js.
After scaffolding site.js contains this code only:
// Please see documentation at https://docs.microsoft.com/aspnet/core/client-side/bundling-and-minification
// for details on configuring this project to bundle and minify static web assets.
// Write your JavaScript code.
And site.css has this:
/* Please see documentation at https://docs.microsoft.com/aspnet/core/client-side/bundling-and-minification\
for details on configuring this project to bundle and minify static web assets. */
body {
padding-top: 50px;
padding-bottom: 20px;
}
/* Wrapping element */
/* Set some basic padding to keep content from hitting the edges */
.body-content {
padding-left: 15px;
padding-right: 15px;
}
/* Carousel */
.carousel-caption p {
font-size: 20px;
line-height: 1.4;
}
/* Make .svg files in the carousel display properly in older browsers */
.carousel-inner .item img[src$=".svg"] {
width: 100%;
}
/* QR code generator */
#qrCode {
margin: 15px;
}
/* Hide/rearrange for smaller screens */
@media screen and (max-width: 767px) {
/* Hide captions */
.carousel-caption {
display: none;
}
}
This has happened to me a few times now and over the last 3 VS updates (at least) and I have only just tracked down the connection. Current version is 15.8.6.
The workaround is to take backups of these files and then overwrite changes back after scaffolding. As I don’t commit constantly I have lost a few changes each time so would be good if this bug could be fixed.
Robin
Copied from original issue: dotnet/corefx#32681
Copied from original issue: aspnet/Home#3595
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (3 by maintainers)
Top GitHub Comments
This issue is fixed in the latest update.
I’ve just received this same issue. Still happening when all identity is scaffolded.
This issue is fixed in the latest update.