Microsoft.CSharp help component not found

I found this problem in my C # project, which I started in Visual Studio 2010, when I switch to another computer that I use in 2008, I open project.csprog:

Get or install the accessory expected

and warning:

The specified Microsoft.CSharp component could not be found.

I am thinking of the .NET Framework or Microsoft.CSharp is not located because it says that:

Failed to resolve this link. Could not find assembly "Microsoft.CSharp". Make sure the assembly exists on disk. If this link is required for your code, you may get compilation errors`

but I don’t know the problem, can you guys give me a solution?

+4
source share
1 answer

It looks like you are targeting .NET 4.0 to a project and then trying to load it into VS2008, which is only for .NET 3.5.

If you need to use the project in VS2008, you should redirect the project to .NET 3.5:

enter image description here

and then remove any invalid links (they will probably have yellow warning triangles on them).

A get or set accessor expected also assumes that you are using new C # syntax like dynamic . If you need to configure older C # compilers, you don’t have to do this. If you are using several versions of the IDE, and this is a problem, then to ensure that you do not do this, you can set the language version for the project through Project Properties β†’ Build β†’ Advanced:

enter image description here

+7
source

Source: https://habr.com/ru/post/1444360/


All Articles