Click here to Skip to main content
15,897,704 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello,

This is my first project in VS 2017.

I have a lot of errors like these:
Error   CS7069  Reference to type 'ICloneable' claims it is defined in 
'mscorlib', but it could not be found
Error   CS7069  Reference to type 'Component' claims it is defined in 
'System', but it could not be found ClassLibrary3
Error   CS7069  Reference to type 'MarshalByRefObject' claims it is defined 
in 'mscorlib', but it could not be found
Error   CS7069  Reference to type 'MarshalByRefObject' claims it is defined 
in 'mscorlib', but it could not be found
Error   CS7069  Reference to type 'MarshalByRefObject' claims it is defined 
in 'mscorlib', but it could not be found


I'm trying to create sql connection like this:
C#
using (SqlConnection conn = new SqlConnection(connstr)) {..}


What I have tried:

Tried to add references to mscorlib of the targeted .Net version.
Tried to use this solution NuGet Gallery | Microsoft.NETCore.Portable.Compatibility 1.0.1[^]
Posted
Updated 24-Jun-17 20:55pm
v3

1 solution

See this answer: Reference to type 'MarshalByRefObject' claims it is defined in 'mscorlib', but it could not be found.[^]
Also cleaning up your bin folders and rebuilding the solution could help.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900