Add a reference to System.Core when it's already referenced by the build system

前端 未结 5 1775
挽巷
挽巷 2021-02-02 06:02

Visual Studio Intellisense is not recognizing the dynamic keyword, even though the project builds. I tried to add a reference to System.Core to solve the problem. I

5条回答
  •  孤街浪徒
    2021-02-02 06:32

    Building on @Arthur's answer, I have found two things resolved it for me:

    Add to .csproj file, the missing line:

    
    

    Then, according to a forums.asp.net answer, add the System.Core assembly reference in main web.config (not the one under Views):

      
        
          
            
            
            
          
        
        
        
      
    

    Then:

    1) Ensure the version of the .NET framework for the compilation property in web.config is the same as that specified in the project properties.

    2) Ensure the version of the MVC assembly in the views folder web.config is the same as the MVC assembly you are using in your project.

    3) Restart Visual Studio (2017 here).

    Hope this helps.

提交回复
热议问题