Missing @using at Layout file
See original GitHub issueSteps to reproduce:
Please see https://stackoverflow.com/a/58204848/3728901
Severity: Error
Error Code: CS0246
Description: The type or namespace name 'IWebHostEnvironment' could not be found (are you missing a using directive or an assembly reference?)
Project: foo
File: C:\Users\donhuvy\Desktop\acc133b3\foo\obj\Debug\netcoreapp3.0\Razor\Pages\Shared\_Layout.cshtml.g.cs
Line: 455
Suppression State: Active
Expected behavior:
Has @using
at the top of file.
Actual behavior:
Compile project error.
Additional information about the project being scaffolded, such as:
Target framework(s):
.NET Core 3.0.100 , Visual Studio 2019
Package version of Microsoft.AspNetCore.App or Microsoft.AspNetCore.All (if applicable):
Package version of Microsoft.VisualStudio.Web.CodeGeneration.Design - this may be added to your project by scaffolding:
Issue Analytics
- State:
- Created 4 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
LayOut's lost file references
LayOut's lost file references · Add an image to LayOut using file->Insert. · Delete the temp folder. · Save the LayOut file. ·...
Read more >Layout XML folder is missing in Android Studio
Right-click on the layout folder; Select New -> Layout Resource File from the menu that opens; Enter your new file name; Click ok....
Read more >Missing Layout files - General Q & A - ChiefTalk Forum
Open the layout, go up to Tools>Layout>Referenced Plan Files.....this should open the plan reference files, you select the plan file you were ...
Read more >500 error for missing layout file that I don't use
My project is working great locally, no issues. I deployed to Forge, and the login and landing page work. But when I visit...
Read more >Layouts show <Field Missing> on opening file
The <Field Missing> sometimes occurs for fields that are in the table that the layout is based on and sometimes in the related...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
In .Net Core 3.1 I see same error.
Severity Code Description Project File Line Suppression State Error CS0246 The type or namespace name ‘IWebHostEnvironment’ could not be found (are you missing a using directive or an assembly reference?) LogicServices D:\GitHub\tyrchik\src\Tyrchik.Site\LogicLayer\LogicServices\UploadFileService.cs 15 Active
Fixed by https://github.com/aspnet/Scaffolding/pull/1043