We have a C# ASP.NET Web Application that uses the System.Transactions namespace.
using System.Transactions;
This works fine when developing locally - we just had to add the reference first by going to Website --> Add Reference...
The problem is that after deploying to the web host (copying over FTP), the host doesn't know this reference.
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: CS0234: The type or namespace name 'Transactions' does not exist in the namespace 'System' (are you missing an assembly reference?)
Working in Visual Web Developer Express 2010, we don't have the References folder built in. I saw this solution: https://stackoverflow.com/a/13035466/2178080 that suggests (but doesn't recommend) copying a dll to the application folder.
I'm a bit new to deploying with ASP and not sure how to include the System.Transactions library so the host can find the reference. Has anyone run into this issue?
Edit: We went with the route of copying the dll to the site along with the application. The steps to do this:
As this solution is listed as not recommended, I am still open to other solutions.
Edit2: Grant and Chris helped me understand that I was working with a Web Site and not a Web Application. Grant helped with the specifics of the Web Site problem.
Your problem is due to the published site is not bringing the System.Transactions.dll along with it, this points to "Copy Local" being set to False and thus the DLL not copying to the bin folder.
Go to References -> System.Transactions
and make sure on the properties for this reference that "Copy Local" is set to True.