Random assembly references fail (“Are you missing a using directive or an assembly reference?”)

后端 未结 7 855
时光说笑
时光说笑 2020-12-15 16:52

My application has a mixture of 3.5 and 4.0-targeted assemblies. I\'m working on a new Windows service targeting 4.0 and the project suddenly seems unable to see some of th

7条回答
  •  醉梦人生
    2020-12-15 17:33

    I had a similar issue, an assembly reference fail (“Are you missing a using directive or an assembly reference?”) and the VS intellisense gave me the opportunity to add the using but in the solution the reference had the yellow icon and the build was failing.

    I solved this looking at the project property Target Framework and changing the .net version to the reference solution version and this solved all problems.

    Note: The .net versions should be compatible between projects.

提交回复
热议问题