No System.Runtime.Caching available?

前端 未结 3 957
死守一世寂寞
死守一世寂寞 2021-01-17 07:13

output type of \'Class Library\', and a target framework of \'.NET Framework 4\'.

According to everything I\'ve read, I should have it available, but all I\'m seeing

3条回答
  •  -上瘾入骨i
    2021-01-17 08:01

    To complement Jon Skeets answer, (for those who run into this problem), if you still get red squiggly lines under Caching after having added reference to System.Runtime.Caching assembly, just restart the Visual Studio, after having saved the solution, and you should be good to go.

    Having added the reference, saved the solution and ( if need may be ) restarted Visual Studio, you should be able to use the types within this namespace. In order to get my solution to work, I had to do this very way.

    Edit:

    While trying to recreate the problem, and solving this way, it seems that we need to set Copy Local to True in System.Runtime.Caching > Properties and then restart Visual Studio for getting it to work. At least, for my case, the problem didn't seem to solve without this. ;)

提交回复
热议问题