编写一个例程WinForms应用程序,它引用了我自己编写的一些自定义库.我正在构建一个依赖于另一个库的特定库,当我这样做时,我收到以下警告消息:
"无法加载文件或程序集'RHLib'版本1.0.0.0,Culture = neutral,PublicKeyToken = null'或其依赖项之一.系统找不到指定的文件"
应用程序功能,没有错误消息,但我是那些喜欢完全干净的编译之一 - 没有错误,没有警告.我无法想象这一个.
有问题的库有一个对"缺失"库的引用,当VS完成编译时,"缺失"库被编译并存在于Debug目录中,构建顺序将"缺失"库放置为构建的第一个项目并且"缺失" "库没有依赖关系 - 它是一个小型库,可以让我摆脱循环装配问题.
有任何想法吗?
在我的Web应用程序中,我将其他站点的代码复制并粘贴到我的页面中,当我运行应用程序时它也是源代码的起始形式,它给出了这样的错误
编译错误说明:在编译服务此请求所需的资源期间发生错误.请查看以下特定错误详细信息并相应地修改源代码.
编译器错误消息:ASPNET:确保此代码文件中定义的类与'inherits'属性匹配,并且它扩展了正确的基类(例如Page或UserControl).
来源错误:
第1行:使用系统; 第2行:使用System.Data; 第3行:使用System.Web;
源文件:c:\ Inetpub\wwwroot\DomainIV\WhoIs.aspx.cs行:1
这是我的问题,请帮助我谢谢你.
我有这样的代码
public static Type ToType(XmlSerializableType xmlSerializableType)
{
string func = "XmlSerialzationType.ToType";
Type type = null;
if (xmlSerializableType != null && xmlSerializableType.Name != string.Empty)
{
type = Type.GetType(xmlSerializableType.Name);
if (type == null)
{
// May be a user defined class
try
{
Assembly assembly = Assembly.Load(xmlSerializableType.AssemblyName);
type = assembly.GetType(xmlSerializableType.Name);
}
catch (Exception ex)
{
TestDebug.DebugTraceSevere(func, "Exception " + ex.ToString());
}
}
}
return type;
}
Run Code Online (Sandbox Code Playgroud)
当' xmlSerializableType.Name'成为用户定义的类'_rounded_tree'时,我有一个名为"leaf"的基类和一个名为"roundedtree"的用户定义类,我第一次获得'assembly as _rounded_treeGOLD, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' and so'的值,type因为{Name ="_ ground_tree"FullName ="_rounded_tree …
我正在尝试在 VSTO Excel 插件中使用 CefSharp WindowForm 控件。CefSharp.WinForms 版本是 75.1.142,我正在 Excel 2013(64 位)到 VS 2017 上制作插件。
我收到 FileNotFoundException: '无法加载文件或程序集 'CefSharp, Version=75.1.142.0, Culture=neutral, PublicKeyToken=40c4b6fc221f4138' 或其依赖项之一。该系统找不到指定的文件。' 在下面的代码执行中。
public void InitBrowser()
{
var cefSettings = new CefSettings();
cefSettings.MultiThreadedMessageLoop = true;
// I'm setting current directory to D:\\CEF\\cefsharp\\ExcelWinform\\ExcelWinformAddIn\\bin\\x64\\Debug\\ where all the CefSharp dlls and dependencies are present.
cefSettings.BrowserSubprocessPath = "D:\\CEF\\cefsharp\\ExcelWinform\\ExcelWinformAddIn\\bin\\x64\\Debug\\CefSharp.BrowserSubprocess.exe";
if (!Cef.Initialize(cefSettings, performDependencyCheck: true, browserProcessHandler: null))
{
throw new Exception("Unable to Initialize Cef");
}
browser = new ChromiumWebBrowser("http://www.google.com");
{
Dock = DockStyle.Fill;
}
BrowserSettings browserSettings …Run Code Online (Sandbox Code Playgroud)