GVKun编程网logo

如何在 Linux 容器上引用 DLL 文件?(linux dll库能用吗)

1

本文将带您了解关于如何在Linux容器上引用DLL文件?的新内容,同时我们还将为您解释linuxdll库能用吗的相关知识,另外,我们还将为您提供关于AgilentE3634AIVI-Com驱动程序错误

本文将带您了解关于如何在 Linux 容器上引用 DLL 文件?的新内容,同时我们还将为您解释linux dll库能用吗的相关知识,另外,我们还将为您提供关于Agilent E3634A IVI-Com 驱动程序错误:ompobj.dll 对于初始化的 ole2.dll 来说太旧了、ASP.Net错误:“类型”foo“存在于”temp1.dll“和”temp2.dll“(pt 2)中、C# socke 异步通信 SanNiuSignal.dll 使用文档(SanNiuSignal.dll 百度云下载:https://pan.baidu.com/s/1skZpSex)、c# – vcruntime140.dll vs vcruntime140d.dll的实用信息。

本文目录一览:

如何在 Linux 容器上引用 DLL 文件?(linux dll库能用吗)

如何在 Linux 容器上引用 DLL 文件?(linux dll库能用吗)

如何解决如何在 Linux 容器上引用 DLL 文件?

我有一个正在开发的 App,它使用一个外部 SDK,其中有许多需要从我的应用程序代码中引用的 DLLs。由于这个原因,我必须探索在 windows 中的 EKS 容器上部署此应用程序的方法,但我想有更好的方法来引用这些 DLL外部化的方式或仅与我的 linux 容器分离,因此我不需要为此目的创建 Windows 容器。我试图通过一些链接以及下面的链接来弄清楚这一点,但无法获得清晰的图片。

Docker Windows container running DLL''s

Using Windows DLL from Linux

Using Precompiled .NET Assembly DLL in Mono?

这是否有可能以任何方式实现,还是仅因为我的代码在执行后端操作时引用了某些 DLL 就必须使用 Windows 容器?

Agilent E3634A IVI-Com 驱动程序错误:ompobj.dll 对于初始化的 ole2.dll 来说太旧了

Agilent E3634A IVI-Com 驱动程序错误:ompobj.dll 对于初始化的 ole2.dll 来说太旧了

如何解决Agilent E3634A IVI-Com 驱动程序错误:ompobj.dll 对于初始化的 ole2.dll 来说太旧了

我正在使用带有 RS232 接口的安捷伦 E3634A 的 IVI-Com 驱动程序,使用 USB 到串行适配器。它有时会给出错误,有时不会。 但是使用自己的系统COM端口没有错误。

ASP.Net错误:“类型”foo“存在于”temp1.dll“和”temp2.dll“(pt 2)中

ASP.Net错误:“类型”foo“存在于”temp1.dll“和”temp2.dll“(pt 2)中

解:

我也在同一时间移动了ashx和asmx文件. WebService / WebHandler指令的Class属性指向错误的命名空间.故事的道德是确保您查看所有作为* x文件的标记,通过右键单击并选择“查看标记”来更改命名空间.

我遇到与this question和this link相同的问题,但没有一个答案解决了我的问题. (编辑:设置web.config批处理属性有效,但这是一个掩护,而不是一个解决方案)

我遇到的问题是使用一个用户控件,我从根目录移动到同一个Web应用程序项目中的一个子目录.在我移动之前,它曾经很好地工作.当我移动它开始给我错误信息.

这就是说,这个类名存在于临时ASP.NET文件中的两个dll文件中.果然,当我打开Reflector,它是在两个dll.

如果我重命名类和ascx文件,一切都正常.在我的整个应用程序的任何文件中不存在原始名称的用法.当我重命名文件时,我使用Reflector打开临时ASP.NET文件中的所有dll文件,并且不存在对原始类名的引用.

那么这个幻影参考在哪里可以解决这个问题?

更新:我字面上grepped我的工作目录中的每个文件的解决方案和我的临时目录为旧类名,并删除每个包含它的文件.然后我重新命名为原来的名字,我仍然收到错误.

Server Error in ‘/’ Application.
Compilation Error 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 ssage: CS0433: The type
‘ASP.dashboard_badusercontrol_ascx’
exists in both ‘c:\Docunts and
Settings\me\Local
Settings\Temp\Temporary ASP.NET
Files\root\3c2b7e1f\2e8a7620\App_Web_badusercontrol.ascx.a57ad085.iljdmp1p.dll’
and ‘c:\Docunts and Settings\me\Local
Settings\Temp\Temporary ASP.NET
Files\root\3c2b7e1f\2e8a7620\App_Web_bhdqaimy.dll’

Source Error:

Line 1098: Line 1099:
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
Line 1100: private
global::ASP.dashboard_badusercontrol_ascx
@__BuildControlMyBadUserControl() {
Line 1101:
global::ASP.dashboard_badusercontrol_ascx
@__ctrl; Line 1102:

Source File: c:\Docunts and
Settings\me\Local
Settings\Temp\Temporary ASP.NET
Files\root\3c2b7e1f\2e8a7620\App_Web_foo.aspx.a57ad085.1nw6dais.0.cs
Line: 1100

编辑:
好的,所以我做了一些更多的测试工作,不起作用.
假设命名空间“MyNamespace”中的原始文件名为“BadUserControl.ascx”.

我将文件移动到名为“NewDirectory”的目录,并将命名空间更改为“MyNamespace.NewDirectory”.在我的硬盘上别的地方没有“BadUserControl.ascx”的副本.我仔细检查了我的TFS历史,以确保唯一的区别是添加“.NewDirectory”到标记和代码隐藏文件中的命名空间.

在这个命名空间里面还有另外两个名为“OtherUserControl”和“AnotherUserControl”的用户控件.

这种情况失败:
我有2个注册指令:

<%@ Register src="BadUserControl.ascx" tagname="BadUserControl" tagprefix="uc1" %> 
<%@ Register src="OtherUserControl.ascx" tagname="OtherUserControl" tagprefix="uc2" %>

这些情况有效:

>我保留“BadUserControl.ascx”命名为.
我在同一个命名空间的页面上有1个Register指令:

<%@ Register src="BadUserControl.ascx" tagname="BadUserControl" tagprefix="uc1" %>

>我将“BadUserControl.ascx”更改为“GoodUserControl.ascx”
我有2个注册指令:

<%@ Register src="GoodUserControl.ascx" tagname="GoodUserControl" tagprefix="uc1" %>
<%@ Register src="OtherUserControl.ascx" tagname="OtherUserControl" tagprefix="uc2" %>

> 2没有BadUserControl.ascx注册指令:

<%@ Register src="AnotherUserControl.ascx" tagname="AnotherUserControl" tagprefix="uc1" %>
<%@ Register src="OtherUserControl.ascx" tagname="OtherUserControl" tagprefix="uc2" %>

解决方法

更新:好的,你发现,循环引用是错误的猜测,因为还有其他情况可能会导致类似的行为.

描述问题的更一般的方法是在运行时批处理以一种非常宽容的方式工作,可以掩盖问题.基本上,我们尝试在一个文件夹中批处理所有内容,但如果在编译该批次时收到编译错误,那么我们将返回到单个文件编译.在许多情况下工作正常,但有时,这可能会导致一个给定的页面被编译两次(类似于下面描述,但是由于不同的原因).

另一方面,aspnet_compiler以严格的方式工作,如果批处理失败,它完全失败并且不会退回.这就是为什么运行这个工具是找到在运行时可能远远不明显的各种类型的问题(或潜在问题)的好办法.我想我们没有做好这个工具的传福音这个目的:)

至于为什么重命名文件修复它,这可能是由于它改变了处理文件的顺序,这是有点任意的.可能是,如果你将它重命名为别的东西,你会再次看到它.

坦率地说,回想起来,我希望我们在运行时使这个批处理行为严格,以便早日捕捉这些情况.我们选择当前秋季设计的原因是为了尽可能避免失败,但是这带来了一个代价:当有什么不对,这是一个很痛苦的抓住它:)

原始答案:
简而言之,问题是当批量打开(默认情况下)时,应避免具有目录级循环依赖性.让我解释一下我的意思.

这是一个例子.说你有:

>在folder1:page.aspx和uc2.ascx中
> forder2:uc1.ascx

并且说page.aspx引用uc1.ascx(通过@register指令),uc1.ascx引用uc2.ascx.在文件级别,这是非常好的,但在目录级别,有一个循环依赖:folder1引用了folder2中的某些东西,它引用了folder1中的某些东西.

为什么这是有问题的与批处理如何工作:当您请求页面时,它首先尝试将folder1中的所有内容一起编译.但是,由于folder1 / page.aspx引用了folder2 / uc1.ascx,因此需要在folder1之前编译folder2,但是uc1使用uc2,这意味着它必须先做文件夹1!在这一点上,ASP.NET检测到这种情况,并尝试通过自己编译uc2.asc来充分利用它.虽然这允许一些场景工作,但它也可能导致奇怪的事情,因为一些项目最终编译在两个程序集中.这里,uc2.ascx将自己和folder1批次一起编译.

实际上有一种方法来轻松检测您的站点是否具有这样的文件夹级循环依赖关系.从VS控制台窗口,转到您的站点的根目录并运行:

aspnet_compiler -v foo -p .

如果您有文件夹级别的循环依赖项,则会出现以下错误:

/foo/Sub/UC1.ascx(2): error ASPPARSE: Circular file references are not allowed.

避免这个问题的便宜方法是你已经知道的:禁用批处理.现在至少你知道为什么这样做:)

但是,如果可以避免文件夹级的循环依赖性,那么最好的办法.如果您开始将每个文件夹视为生成程序集的“组件”,这实际上是有意义的,并且可以帮助您的站点更加模块化.

是的,在编译系统中称这是一个“错误”,或至少是一个限制也是公平的.但是一旦你知道它,这是很容易避免的.

C# socke 异步通信 SanNiuSignal.dll 使用文档(SanNiuSignal.dll 百度云下载:https://pan.baidu.com/s/1skZpSex)

C# socke 异步通信 SanNiuSignal.dll 使用文档(SanNiuSignal.dll 百度云下载:https://pan.baidu.com/s/1skZpSex)

 

SanNiuSignal 使用文档:

/*
* using SanNiuSignal;
* using SanNiuSignal.FileCenter;
* using SanNiuSignal.FileCenter.FileBase;
* SanNiuSignal 学习笔记
* 1:ITxServer TCP 服务器接口
* 2:ITxClient TCP 客户端接口
* 3:IUdpTxUDP 接口
* 4:IFileSend 文件发送方接口
* 5:IFileReceive 文件接收方接口 前面三个接口是通过 TxStart 启动;后面二个文件接口是通过 FileStart 启动
* 前面三个接口是通过 TxStart 启动;
* 后面二个文件接口 是通过 FileStart 启动
*/
class Socket_yb : IFileSendMust
{
public void socket()
{
#region 服务端
ITxServer txServer = null;// 服务器的所有方法和时间
#region ITxServer TCP 服务端接口属性
txServer = TxStart.startServer (12000); // 注册一个端口为 12000 的服务器,返回 ITxServer 类,再从 ITxServer 中的 startServer 一个方法启动服务器

txServer.ClientMax = 1000; // 设置客户端最大连接数
txServer.BufferSize = 1024 * 10; // 设置缓冲区大小
List<IPEndPoint> list = txServer.ClientAll; // 得到所有客户端
int count = txServer.ClientNumber; // 得到当前客户端数量
txServer.Ip = "192.168.1.192"; // 启动 IP 地址
txServer.Port = 3306; // 启动端口地址
txServer.FileLog = "C:\\test.txt"; // 释放记录引擎历史记录,为空记录
txServer.StartEngine (); // 启动引擎
#endregion

#region ITxServer TCP 服务端接口事件
txServer.AcceptString += TxServer_AcceptString; // 接受字符串时触发
txServer.AcceptByte += TxServer_AcceptByte; // 接受图片时触发
txServer.Connect += TxServer_Connect; // 当有新客户端连接时触发
txServer.dateSuccess += TxServer_dateSuccess; // 当数据发送成功且对方已接收时触发
txServer.Disconnection += TxServer_Disconnection; // 当有客户端突然断开时触发
txServer.EngineClose += TxServer_EngineClose; // 当引擎完全关闭释放资源是触发
txServer.EngineLost += TxServer_EngineLost; // 当引擎非正常原因自动断开连接时触发事件
#endregion

#region 方法
txServer.clientAllClose (); // 关闭所有客户端连接
txServer.clientCheck (list [0]); // 检查某个客户端是否在线
txServer.clientClose (list [0]); // 强制关闭一个客户端
txServer.CloseEngine (); // 关闭引擎
txServer.ContinueFile (list [0], 100); // 对文件进行续传,如果有不正确会抛出异常
txServer.sendMessage (list [0], Encoding.UTF8.GetBytes ("")); // 向客户端发送文本信息
txServer.StartEngine (); // 启动引擎
txServer.SendFile (list [0], "path"); // 发送文件;如果地址不正确会抛出异常
#endregion
#endregion

#region 文件
IFileReceive FileReceive = null; // 文件接收接口
IFileSend FileSend = null; // 文件发送接口,继承文件基础接口 IFilebas

FileSend = FileStart.StartFileSend(this);
#region 文件接收
// 属性
FileReceive.BufferSize = 1024 * 20; // 设置文件缓冲区大小,默认 = 8192 字节,UDP<=65507,发送和接收缓冲区大小需相同,缓冲区越大发送越快,内存消耗越大
int [] i = FileReceive.FileAllOn; // 得到正在处理的文件总数

// 方法
FileReceive.FileStop (1); // 暂停发送文件
FileReceive.GetFileLenth (1); // 得到文件总长度 (单位:字节)
FileReceive.GetFileName (1); // 得到文件名
FileReceive.GetFileOk (1); // 得到文件已处理的进度,单位:字节
FileReceive.GetFileState (1); // 得到文件状态:0:等待,1:传输,2:暂停
#endregion

#region 文件发送
// 属性
FileSend.BufferSize = 1024 * 20; // 设置文件缓冲区大小,默认 = 8192 字节,UDP<=65507,发送和接收缓冲区大小需相同,缓冲区越大发送越快,内存消耗越大
int [] z = FileSend.FileAllOn; // 得到正在处理的文件总数
// 方法
FileReceive.FileStop (1); // 暂停发送文件
FileReceive.GetFileLenth (1); // 得到文件总长度 (单位:字节)
FileReceive.GetFileName (1); // 得到文件名
FileReceive.GetFileOk (1); // 得到文件已处理的进度,单位:字节
FileReceive.GetFileState (1); // 得到文件状态:0:等待,1:传输,2:暂停

#endregion
#endregion

#region 客户端
ITxClient TxClient = null; // 创建客户端接口

TxClient = TxStart.startClient ("ip", 8080);// 注册一个客户端,返回一个 ITxServer 类,在从高 ITxClient 中的 startClient 一个方法启动客户端
TxClient.AcceptString += TxClient_AcceptString;// 当收到文本数据的时候
TxClient.dateSuccess += TxClient_dateSuccess;// 当对方已经成功收到我数据的时候
TxClient.EngineClose += TxClient_EngineClose;// 当客户端引擎完全关闭释放资源的时候
TxClient.EngineLost += TxClient_EngineLost;// 当客户端非正常原因断开的时候
TxClient.ReconnectionStart += TxClient_ReconnectionStart;// 当自动重连开始的时候
TxClient.StartResult += TxClient_StartResult;// 当登录完成的时候


#region 属性
TxClient.BufferSize = 1; // 这里大小自己设置,默认为 1KB,也就是 1024 个字节
bool b = TxClient.EngineStart; // 引擎是否启动
TxClient.FileLog = "path"; // 是否记录引擎历史日志,path 保存路径,为空不记录
TxClient.Ip = "ip"; // 启动 ip 地址
TxClient.OutTime = 20; // 登录超时时间,单位:s
TxClient.Port = 8080; // 启动端口
TxClient.ReconnectMax = 10; // 设置断线时重连次数,默认为 3 次,为 0 不进行重连
#endregion

#region 方法
TxClient.CloseEngine (); // 关闭引擎
TxClient.ContinueFile (1); // 对文件进行续传,不正确跑出异常
TxClient.SendFile ("fileName"); // 发送文件,如果地址不正确抛出异常,首先要调用 FIleStart 启动文件系统
TxClient.sendMessage ("byte [] buffer"); // 客户端向服务端发送文本信息
TxClient.StartEngine (); // 启动引擎
#endregion

#endregion

}
#region 客户端事件
private void TxClient_StartResult(bool object1, string object2)
{
throw new NotImplementedException();
}

private void TxClient_ReconnectionStart()
{
throw new NotImplementedException();
}

private void TxClient_EngineLost(string object1)
{
throw new NotImplementedException();
}

private void TxClient_EngineClose()
{
throw new NotImplementedException();
}

private void TxClient_dateSuccess(IPEndPoint object1)
{
throw new NotImplementedException();
}

private void TxClient_AcceptString(IPEndPoint object1, string object2)
{
throw new NotImplementedException();
}

#endregion

#region 服务端事件
private void TxServer_EngineLost(string object1)
{
throw new NotImplementedException();
}

private void TxServer_EngineClose()
{
throw new NotImplementedException();
}

private void TxServer_Disconnection(IPEndPoint object1, string object2)
{
throw new NotImplementedException();
}

private void TxServer_dateSuccess(IPEndPoint object1)
{
throw new NotImplementedException();
}

private void TxServer_Connect(IPEndPoint object1)
{
throw new NotImplementedException();
}

private void TxServer_AcceptByte(IPEndPoint object1, byte[] object2)
{
throw new NotImplementedException();
}

private void TxServer_AcceptString(IPEndPoint object1, string object2)
{
throw new NotImplementedException();
}
#endregion

#region 实现接口 IFileSendMust 方法
#region IFileSendMust 成员
/// <summary>
/// 发送完成
/// </summary>
/// <param name="FileLabel"> 文件标签 </param>
void IFileSendMust.SendSuccess(int FileLabel)
{
throw new NotImplementedException();
}

/// <summary>
/// 开始传输
/// </summary>
/// <param name="FileLabel"> 文件标签 </param>
void IFileSendMust.FileStartOn(int FileLabel)
{
throw new NotImplementedException();
}

/// <summary>
/// 接收方拒绝接收文件
/// </summary>
/// <param name="FileLabel"> 文件标签 </param>
void IFileSendMust.FileRefuse(int FileLabel)
{
throw new NotImplementedException();
}
#endregion
#region IFileMustBase 成员
/// <summary>
/// 对方已经取消这个文件的传输,我方已经关闭这个传输
/// </summary>
/// <param name="FileLabel"> 文件标签 </param>
void IFileMustBase.FileCancel(int FileLabel)
{
throw new NotImplementedException();
}

/// <summary>
/// 对方暂停;我方也已经暂停;等待着对方的再一次请求传输;会在 FileOrNotContingue 这里触发
/// </summary>
/// <param name="FileLabel"> 文件标签 </param>
void IFileMustBase.FileStop(int FileLabel)
{
throw new NotImplementedException();
}

/// <summary>
/// 文件已中断;状态已自动改为暂停状态;等待对方上线的时候;进行续传;
/// </summary>
/// <param name="FileLabel"> 文件标签 </param>
/// <param name="Reason"> 中断原因 </param>
void IFileMustBase.FileBreak(int FileLabel, string Reason)
{
throw new NotImplementedException();
}

/// <summary>
/// 文件传输失败
/// </summary>
/// <param name="FileLabel"> 文件标签 </param>
void IFileMustBase.FileFailure(int FileLabel)
{
throw new NotImplementedException();
}

/// <summary>
/// 文件开始续传;这时不会触发开始传输的方法
/// </summary>
/// <param name="FileLabel"> 文件标签 </param>
void IFileMustBase.FileContinue(int FileLabel)
{
throw new NotImplementedException();
}

/// <summary>
/// 对方发过来的续传确认信息;你是否同意续传;
/// </summary>
/// <param name="FileLabel"> 文件标签 </param>
/// <returns> 同意或不同意 </returns>
bool IFileMustBase.FileOrNotContingue(int FileLabel)
{
throw new NotImplementedException();
}

/// <summary>
/// 对方拒绝续传;文件又处于暂停状态;
/// </summary>
/// <param name="FileLabel"> 文件标签 </param>
void IFileMustBase.FileNoContinue(int FileLabel)
{
throw new NotImplementedException();
}

/// <summary>
/// 得到文件的进度;每次缓冲区为单位折算成百分比输出进度;这样可以提高效率;
/// </summary>
/// <param name="FileLabel"> 文件标签 </param>
/// <param name="Progress"> 进度 </param>
void IFileMustBase.FileProgress(int FileLabel, int Progress)
{
throw new NotImplementedException();
}
#endregion
#endregion
}

c# – vcruntime140.dll vs vcruntime140d.dll

c# – vcruntime140.dll vs vcruntime140d.dll

这两个dll vcruntime140.dll和vcruntime140d.dll有什么区别?我们为什么需要它们?它们都是Microsoft Visual C 2015 Redistributable的一部分吗?

谷歌搜索了一段时间,但找不到任何我能理解的东西.

一些背景:我有一个C#程序可以在Windows 10机器上运行,但在Windows Vista上不起作用,看起来是因为我的Windows Vista机器上没有vcruntime140d.dll.

解决方法

虽然我在微软的网站上找不到任何权威,但他们总是发送两个DLL:

>一个不以d结尾的发行版本 – 例如:vcruntime140.dll
>以d结尾的调试版本 – 例如:vcruntime140d.dll

您需要使用正确的一个,因为编译器使用的库是根据项目是使用调试还是发布设置构建的.因此,如果使用发布设置进行编译,则可执行文件将使用vcruntime140.dll,如果使用调试设置进行编译,则可执行文件将使用vcruntime140d.dll

关于如何在 Linux 容器上引用 DLL 文件?linux dll库能用吗的介绍现已完结,谢谢您的耐心阅读,如果想了解更多关于Agilent E3634A IVI-Com 驱动程序错误:ompobj.dll 对于初始化的 ole2.dll 来说太旧了、ASP.Net错误:“类型”foo“存在于”temp1.dll“和”temp2.dll“(pt 2)中、C# socke 异步通信 SanNiuSignal.dll 使用文档(SanNiuSignal.dll 百度云下载:https://pan.baidu.com/s/1skZpSex)、c# – vcruntime140.dll vs vcruntime140d.dll的相关知识,请在本站寻找。

本文标签: