c# - The type is defined in an assembly that is not referenced, how to find the cause? -


i know error message common , there plenty of questions on error, no solutions have helped me far, decided ask question. difference of similar questions me using app_code directory.

error message:

cs0012: type 'project.rights.operationsprovider' defined in assembly not referenced. must add reference assembly 'project.rights, version=1.0.0.0, culture=neutral, publickeytoken=null'. 

source file:

c:\inetpub\wwwroot\test\website\app_code\company\project\businesslogic\manager.cs 

following suggestions here , here, have deleted instances of project.rights.dll inside c:\windows\microsoft.net/*.* according this, checked if .cs files in question have build action set "compile". do. have double checked .cs file containing "project.rights.operationsprovider" type deployed app_code directory.

for reason, application not looking type in app_code directory. since i've deleted instances of project.rights.dll (that know of), don't know assembly error message mentioning.

when error isn't obvious going on, error says - missing reference. take following line of code example:

myobjecttype = new myobjecttype("parameter"); 

it looks simple enough , have referenced "myobjecttype" correctly. lets 1 of overloads "myobjecttype" constructor takes type don't have referenced. example there overload defined as:

public myobjecttype(typefromotherassembly parameter) {     // ... normal constructor code ... } 

that @ least 1 case error. so, type of pattern have referenced type not types of properties or method parameters possible functions being called on type.

hopefully @ least gets going in right direction!


Popular posts from this blog

c# - ODP.NET Oracle.ManagedDataAccess causes ORA-12537 network session end of file -

matlab - Compression and Decompression of ECG Signal using HUFFMAN ALGORITHM -

utf 8 - split utf-8 string into bytes in python -