0

I have an ASP.NET project that was working fine until today. I added a new webform (.aspx) to the project and it started giving a parse error. I spent hours fixing this issue but had no luck. I deleted all the files and cloned the repo to start from scratch but now the cloned project started giving the same error for a default aspx page that was working before. I thought this could my local system-related issue so I tried publishing the website using Visual Studio publish profile onto the IIS website on a different server. The site got published without any errors and the website is loading without any errors. Please help to identify why the same project is giving "Parser Error Message: Could not load type 'sometype'" error? I tried many solutions given in this post-https://stackoverflow.com/questions/15071220/parser-error-message-could-not-load-type-sometype but nothing works.

missingsemicolon
  • 480
  • 1
  • 10
  • 23

1 Answers1

0

I thought I would update how I resolved the issue in case someone is facing the same issue. There are number of things I did:

  1. Updated package.config as some of the packages were not using 4.6.1. I'm not sure how it worked until a certain point in time.
  2. Deleted local repo. Cloned the code from the repository, built the solution, and tested if the local instance is working. At this point, it was not.
  3. I noticed that the solution was compiling and producing libraries but the libraries were not copied into the \bin\Debug folder even though the output path was set to bin\Debug folder. So I updated the properties to change the output path to \bin, rebuilt the solution, and then changed the path back to bin\Debug and rebuilt it again. The local instance launched without any issues this time.
  4. Added the new webform (.aspx) file again and rebuilt the solution. This time the local instance launched without any issues.
missingsemicolon
  • 480
  • 1
  • 10
  • 23