1

I have a dll containing classes to access data in SQL (a sort of ORM system) included in my .cs page with a using statement. For some reason the dll (with definition for a new field) isn't seen by the cs code, though I've uploaded the new dll in bin. It won't see my new field in the dll's helper classes (now compiled into the dll).

Is there a way to troubleshoot the dll, or the cs to tell why this won't see the class I updated and rebuilt? The class works fine locally and on another server, but on my prod server, it bombs.

This is using Sitefinity 3.7 with a Subsonic/Substage module if that sheds some light on it.

Ryan
  • 3,153
  • 2
  • 23
  • 35

8 Answers8

0

If you are using Visual Studio, verify 2 things, first: try deleting csproj.user and .suo files (visual studio will recreate them)

The second thing is the version of the framework your project is running, and the version of the framework the dll was compiled in.

If your project is using .NET 4.0 but the DLL was built using 2.0 or similar you may not be able to use it, you can add it, but it wont be loaded.

0

This sounds so familiar... have you check to see if there is another dll on the path that gets resolved? Dynamic-Link Library Search Order

diversemix
  • 569
  • 2
  • 12
0

Make sure that your dll was not registered on the production service in the GAC.

How to extract an assembly from the GAC?

Community
  • 1
  • 1
tsells
  • 2,751
  • 1
  • 18
  • 20
0

Perhaps you have a local copy of the DLL in your project and the DLL that gets updated is elsewhere.

  • Instead of copying the DLL into your project, reference the DLL directly where it is located (i.e. `Program Files` folder or other). That way, when the actual DLL gets updated, you aren't working off a stale copy in your project's folder. –  Sep 01 '11 at 14:20
0

I tend to think the dll you build is 32 bit (X86) dll. where as you are trying to consume it from project that targets "Any CPU".

Is your production server a 64 bit ? If answer is yes, goto project properties => Build tab (of your cs code's project which is not understanding the dll) and set the Platform target as X86.

humblelistener
  • 1,456
  • 12
  • 22
0

If the updated DLL has a different version number, you may need to update the Project Reference to it by deleting and re-adding a reference to the DLL in the bin folder.

If the project generating the DLL is present in the same solution, you may have an issue in creating a file reference (may not be updated) instead of a project reference (will be updated).

DOK
  • 32,337
  • 7
  • 60
  • 92
0

fuslog.exe is a great tool when troubleshooting assembly (dll) binding issues.

http://msdn.microsoft.com/en-us/library/e74a18c4.aspx

lbergnehr
  • 1,578
  • 11
  • 15
0

Another .net developer helped me figure this out. I had a rogue ToString() in there where there should have been a cast to string, allowing nulls. My dll was okay after all. Thanks everyone for your suggestions, I learned a lot.

Ryan
  • 3,153
  • 2
  • 23
  • 35