skip to Main Content

I am running a 32-bit ASP.NET application using .NET Framework 4.8. I am getting the following error when starting the application:

error CS1504: Source file 'c:WindowsMicrosoft.NETFrameworkv4.0.30319Temporary ASP.NET Files...xxx.cs' could not be opened ('Unspecified error ')

What I have tried

  • Running the application in IISExpress and Local IIS both in 32-bit mode.
  • Updating Visual Studio
  • Rebooting
  • Reinstalling Visual Studio 2022 and .NET Framework 4.8
  • Move the location of the temporary files folder to a different location using configuration
  • Remove the Temp folder/files / clean / rebuild

2

Answers


  1. Chosen as BEST ANSWER

    I found out what the issue was. There were language features that needed to be installed through Visual Studio 2022.

    Go to Build => ASP.NET Compilation => Enable latest C# and VB language features

    enter image description here


  2. Try –
    Delete the ‘Temporary ASP.NET Files’ folder. Restart your computer, clean the solution and rebuild the solution

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search