I have a Common DLL which have some internal methods for internal usage. Beside I also have 3 other projects WebServices, UnitTests and PATs
In AssemblyInfo.cs of Common project, I added these lines:
[assembly: InternalsVisibleTo("WebServices, PublicKey=00240...b59a0")]
[assembly: InternalsVisibleTo("UnitTests, PublicKey=00240...dcf98")]
[assembly: InternalsVisibleTo("PATs, PublicKey=00240...e65cf")]
These internal methods work perfect with UnitTests and PATs but WebService. It's weird that I can see these internal methods in the IntelliSense box when I write code in WebService project. There is no error alert when I write code but when I build the project, I got this error message
'Common' does not contain a definition for 'internal method name'
At that time, I thought the assembly name is wrong in some way. And I try to make it's really wrong for sure:
[assembly: InternalsVisibleTo("WebSer, PublicKey=00240...b59a0")]
Then in the WebService project, it turns red immediately at the line I use Common internal methods without compiling with this message:
Cannot access internal method 'internal method name' here
So I think my assembly name is correct but I still don't know why I cannot use internal methods in my WebServices project.