dotnet / core

.NET news, announcements, release notes, and more!
https://dot.net
MIT License
21.04k stars 4.9k forks source link

the asp.net core web app dont lunch #8480

Closed Ebrahem123456 closed 1 year ago

Ebrahem123456 commented 1 year ago

❌ System.BadImageFormatException: Could not load file or assembly 'C:\Program Files (x86)\dotnet\shared\Microsoft.AspNetCore.App\7.0.5\Microsoft.Extensions.Hosting.Abstractions.dll'. Format of the executable (.exe) or library (.dll) is invalid. File name: 'C:\Program Files (x86)\dotnet\shared\Microsoft.AspNetCore.App\7.0.5\Microsoft.Extensions.Hosting.Abstractions.dll' at Microsoft.DotNet.Watcher.Tools.BrowserRefreshServer.DisposeAsync() at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine) at Microsoft.DotNet.Watcher.Tools.BrowserRefreshServer.DisposeAsync() at Microsoft.DotNet.Watcher.Tools.BrowserRefreshFilter.DisposeAsync() at Microsoft.DotNet.Watcher.HotReloadDotNetWatcher.DisposeAsync() at Microsoft.DotNet.Watcher.Program.MainInternalAsync(CommandLineOptions options, CancellationToken cancellationToken) at Microsoft.DotNet.Watcher.Program.HandleWatch(CommandLineOptions options) dotnet watch ❌ An unexpected error occurred

eiriktsarpalis commented 1 year ago

Could please provide more information, e.g. a project file demonstrating the issue?

Ebrahem123456 commented 1 year ago

in visual studio 2022 there a error code : Severity Code Description Project File Line Suppression State Warning CS8034 Unable to load Analyzer assembly C:\Program Files (x86)\dotnet\sdk\7.0.302\Sdks\Microsoft.NET.Sdk.Razor\source-generators\Microsoft.NET.Sdk.Razor.SourceGenerators.dll : Unable to load Microsoft.NET.Sdk.Razor.SourceGenerators WebApplication4 C:\Users\Ebrah\source\repos\WebApplication4\CSC 1 Active

Ebrahem123456 commented 1 year ago

and when i do a dubug the page show's : This localhost page could not be found. No web page found for web address: http://localhost:5217/ HTTP ERROR 404

Ebrahem123456 commented 1 year ago

i have a final project after 10 in asp.net days and tomorow the teacher want to see the half of the projet withe 20% of final grade.

Ebrahem123456 commented 1 year ago

We have to do according to what we have learned. no nodjs You need asp.net core with one of the databases: SQL Server, SQL Server File (MDF), Access File It is possible to combine with react in the fronthand, which is actually working with javascript in a different way . i want to do about Employee management site. List of employees in a table, list of employee attendance by date and time. Each employee can see his profile on the website on a separate page. By clicking on an employee in the table, we reach his profile page. An employee can log in and enter attendance. An administrator can log in and add/update/delete employees and attendance. Every user who is registered in the system, his picture will be displayed on the website. if some one can help me in the project or similar project

mairaw commented 1 year ago

What version of .NET is your project referencing? How did you create your project?

/cc @pranavkm

Ebrahem123456 commented 1 year ago

I tried .net 6 and .net7 none of them worked and I made the project in the visual studio 2022 application. Inside the application, it gives the following error code:

Severity Code Description Project File Line Suppression State Warning CS8034 Unable to load Analyzer assembly C:\Program Files (x86)\dotnet\sdk\7.0.302\Sdks\Microsoft.NET.Sdk.Razor\source-generators\Microsoft.NET.Sdk.Razor.SourceGenerators.dll : Unable to load Microsoft.NET.Sdk.Razor.SourceGenerators WebApplication5 C:\Users\Ebrah\source\repos\WebApplication5\CSC 1 Active

mairaw commented 1 year ago

Do you get the same error if you create a brand new project and just run it?

Ebrahem123456 commented 1 year ago

Yea i tried 6 times and the same problem .

steveharter commented 1 year ago

could not load file or assembly 'C:\Program Files (x86)\dotnet\shared\Microsoft.AspNetCore.App\7.0.5\Microsoft.Extensions.Hosting.Abstractions.dll'. Format of the executable (.exe) or library (.dll) is invalid.

Note that this is using x86 version of .NET. Are you sure you want to use that? You may need the x64 version and may need to uninstall the x86 version.

github-actions[bot] commented 1 year ago

This issue is stale because there has been no response to a request for more information for 7 days.

github-actions[bot] commented 1 year ago

This issue was closed because there was no response to a request for more information for 10 days.