How to fix Invalid value ''' for RazorLangVersion. Valid values include 'Latest' or a valid version in range 1.0 to 8.0.

Anonymous
2024-04-10T07:37:04.29+00:00

Im getting below CSC error while building a solution. I recently installed a new VS latest 2022 version. Same solution was working previously as expected.
Error message - Severity Code Description Project File Line Suppression State

Error RZ3600 Invalid value ''' for RazorLangVersion. Valid values include 'Latest' or a valid version in range 1.0 to 8.0.User's image

Has anyone faced this issue? Please help me if possible on this. Thanks !

Developer technologies | Visual Studio | Other
{count} votes

2 answers

Sort by: Most helpful
  1. Anna Xiu-MSFT 31,056 Reputation points Microsoft External Staff
    2024-04-11T06:08:03.84+00:00

    Hi @Rohan Patil, 

    Welcome to Microsoft Q&A! 

    Please check the <RazorLangVersion> property in the project file:

      <RazorLangVersion>{VERSION}</RazorLangVersion>

    For more information, you can see: Razor language version

    Sincerely,

    Anna


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".  Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

     


  2. dorofino 0 Reputation points
    2024-12-01T19:21:50.4266667+00:00

    any update on this issue?

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.