I am getting “defined in an assembly that is not referenced” errors when building my c# project, how to solve it?

后端 未结 2 1738
挽巷
挽巷 2021-01-29 09:48

I have already have references to System and System.Data.

1.The type \'System.ComponentModel.IListSource\' is defined in an assembly that is not referenc

2条回答
  •  感情败类
    2021-01-29 10:17

    In my case I was getting error as

    You must add a reference to assembly netstandard, Version=2.0.0.0

    It was resolved by following steps

    1. In Visual studio - Solution explorer right click on the project and choose unload so that you are able to edit the .proj file.
    2. Locate the last tag of tags in side the t tag.
    3. After add an new tag as below:

       
        
      

    1. Save the file.
    2. Again right click on project and choose Reload project.

提交回复
热议问题