我正在C#visual studio 2012 RC中构建应用程序.
我必须在应用程序中运行脚本.为此,我正在使用.这两个库.我的应用程序的目标.net框架是4.5.
using Microsoft.SqlServer.Management.Smo;
using Microsoft.SqlServer.Management.Common;
Run Code Online (Sandbox Code Playgroud)
在检查天气数据库是否存在后,我编写了运行脚本的代码.
当我运行代码时会弹出一个意外的异常.我真的知道这是什么意思.你可以帮助我摆脱这个例外.
我也附加了我的代码和异常预览.
请帮助我......我已经搜索过太多了.

**Here are the Exception Details.**
Run Code Online (Sandbox Code Playgroud)
未处理System.IO.FileLoadException HResult = -2146232799消息=混合模式程序集是针对运行时的版本"v2.0.50727"构建的,如果没有其他配置信息,则无法在4.0运行时中加载.Source = mscorlib StackTrace:System.Reflection.RuntimeAssembly.GetType(RuntimeAssembly程序集,String name,Boolean throwOnError,Boolean ignoreCase,ObjectHandleOnStack类型),位于System.Reflection.RuntimeAssembly.GetType(String name,Boolean throwOnError,Boolean ignoreCase). Microsoft.SqlServer.Management.Common.ServerConnection.ExecuteNonQuery(String sqlCommand,Microsoft.SqlServer.Management.Common.ServerConnection.GetStatements(String query,ExecutionTypes executionType,Int32&statementsToReverse)中的Reflection.Assembly.GetType(String name,Boolean throwOnError). ExecutionTypes executionType)在Microsoft.SqlServer.Management.Common.ServerConnection.ExecuteNonQuery(String sqlCommand)位于McFarlaneIndustriesPOSnamespace.SplashScreen.CreateDatabase()的e:\ Works\McFarlane Industries\McFarlane Industries销售点源代码\ McFarlaneIndustries\SplashScreen.cs:第139行在McFarlaneIndustriesPOSnamespace.SplashScreen.splashScreenTimer_Tick(对象发送者,EventArgs e))在e:\ Works\McFarlane Industries\McFarlane Industries销售点源代码\ McFarlaneIndustries\SplashScreen.cs:System.Windows.Form.Timer.TimerNativeWindow上的System.Windows.Forms.Timer.OnTick(EventArgs e)第159行System.Windows.Forms上的System.Windows.Forms.FornsWindow.DebuggableCallback(IntPtr hWnd,Int32 msg,IntPtr wparam,IntPtr lparam)中的.WndProc(Message&m)位于System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG&msg). System.Windows.Forms上的System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason,ApplicationContext context)中的Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID,Int32 reason,Int32 pvLoopData)位于E:\ Works\McFarlane Industries\McFarlane Industries Point of S的McFarlaneIndustriesPOSnamespace.Program.Main()的System.Windows.Forms.Application.Run(Form mainForm)中的.Application.ThreadContext.RunMessageLoop(Int32 reason,ApplicationContext context)ale源代码\ McFarlaneIndustries\Program.cs:在System.Runtime.Hosting.ManifestRunner的System.AppDomain.nExecuteAssembly(RuntimeAssembly assembly,String [] args)的System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly,String [] args)第19行System.Runtime.Hosting.ApplicationActivator.CreateInstance(ActivationContext activationContext,String [] activationCustomData)中的System.Runtime.Hosting.ManifestRunner.ExecuteAsAssembly()处于System.Runtime.Hosting.ApplicationActivator.CreateInstance(ActivationContext activationContext)的.Run(Boolean …
我正在Visual Studio 2012 RC中开发一个POS系统的C#应用程序.我必须使用标签打印机打印销售
兄弟P-Touch QL-500标签打印机.
我已经做了什么.
制作了一个模板(Mylabel.lbl).
但在那之前.
我运行一些内置的示例,但这些示例引发异常.在谷歌上做了很多搜索之后我发现这是打印机的驱动程序问题.
我无法安装驱动程序,因为驱动程序的安装需要连接打印机. 我没有打印机.
我需要做什么
使用兄弟P-Touch QL-500标签打印机打印标签的正确方法是什么.
请帮帮我,我已经做了很多时间搜索.stackoverflow是我最后的希望.我是这种标签印刷的新手.请帮助我将非常感激.
我正在使用的ruff示例代码.
bpac.DocumentClass doc = new DocumentClass();
if (doc.Open("templateFile.lbx"))
{
doc.GetObject("field1").Text = "...";
doc.GetObject("field2").Text = "...";
doc.StartPrint("", PrintOptionConstants.bpoDefault);
doc.PrintOut(1, PrintOptionConstants.bpoDefault);
doc.EndPrint();
doc.Close();
}
Run Code Online (Sandbox Code Playgroud)
这是我正在尝试的示例代码.第一行抛出异常
bpac.DocumentClass doc = new DocumentClass();
Run Code Online (Sandbox Code Playgroud)
我还附加了异常屏幕预览.

manifest.json 中定义了一个内容脚本。内容脚本正在执行一项简单的任务。它将iframe添加到页面中并尝试在其中打开本地 HTML文件。
问题是:
ifrm.setAttribute("src", "http://www.xyz.com/"); //working correctly.
Run Code Online (Sandbox Code Playgroud)
但
ifrm.setAttribute("src", chrome.extension.getURL("view/abc.html")); //Not working
Run Code Online (Sandbox Code Playgroud)
iframe 未打开本地 HTML 文件。
任何建议...
html javascript iframe google-chrome-extension content-script