The file or directory is corrupted and unreadable

0

i've added a simple Cshtml there's nothing in it but when i run the project i get this error and i know there's sth wrong with this file bin\roslyn\csc.exe"

Server Error in '/' Application.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.ComponentModel.Win32Exception: The file or directory is corrupted and unreadable

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[Win32Exception (0x80004005): The file or directory is corrupted and unreadable]

[ExternalException (0x80004005): Cannot execute a program. The command being executed was "c:\users\mostafa\documents\visual studio 2017\Projects\InstagramAutomationPosts\Instagram_Automation_Posts\bin\roslyn\csc.exe" /shared /keepalive:"900" /noconfig /fullpaths @"C:\Users\Mostafa\AppData\Local\Temp\Temporary ASP.NET Files\vs\a17df867\580bcfa2\mauhk4p3.cmdline".]

My view

@{
ViewBag.Title = "Index";
}

<h2>Index</h2>

how can i solve this issue?

c#
asp.net
visual-studio
compiler-errors
asked on Stack Overflow Mar 11, 2018 by user9306199 • edited Jun 20, 2020 by Community

2 Answers

0

i know it's not correct way to answer but what i did was (and might help someone in future),i made another project and copied everything there and it got fixed

answered on Stack Overflow Mar 11, 2018 by user9306199
0

Rebuilding the project solved the issue for me

answered on Stack Overflow Apr 4, 2021 by Muizz Mahdy

User contributions licensed under CC BY-SA 3.0