use*_*080 3 c# asp.net dll visual-web-developer-2010
我们有一个使用System.Transactions命名空间的C#ASP.NET Web应用程序.
using System.Transactions;
Run Code Online (Sandbox Code Playgroud)
这在本地开发时工作正常 - 我们只需要首先通过网站添加引用 - >添加引用...
问题是在部署到Web主机(通过FTP复制)后,主机不知道此引用.
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?)
Run Code Online (Sandbox Code Playgroud)
在Visual Web Developer Express 2010中工作,我们没有内置的References文件夹.我看到了这个解决方案:https://stackoverflow.com/a/13035466/2178080建议(但不建议)将dll复制到应用程序文件夹.
我有点新的部署ASP,不知道如何包含System.Transactions库,以便主机可以找到引用.有没有人遇到过这个问题?
编辑:我们采用了将dll与应用程序一起复制到站点的路径.执行此操作的步骤:
由于此解决方案被列为不推荐,我仍然对其他解决方案持开放态度.
Edit2: Grant和Chris帮助我理解我正在使用Web站点而不是Web应用程序.Grant帮助解决了网站问题的具体细节.
您的问题是由于发布的网站没有带System.Transactions.dll,这指向"复制本地"设置为False,因此DLL不会复制到bin文件夹.
转到References -> System.Transactions并确保此引用的属性"Copy Local"设置为True.
| 归档时间: |
|
| 查看次数: |
8952 次 |
| 最近记录: |