我正在尝试从 vb.net 项目访问 c# 方法。
c#项目有以下代码:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MeF.Client;
public class LoginClass
{
// lines of code that are giving errors (when commented there’s no error)
private ServiceContext context = new ServiceContext();
public string etin;
public string appSysId;
static void Main(string[] args)
{
LoginClass.CreateServiceContext();
}
//bla, bla, bla
}
vb.net 项目有这个:
Imports AimEFileCore
Public Class Form1
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
End Sub
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim Process As New AimEFileCore.LoginClass
Process.CreateServiceContext()
End Sub
运行代码时出现以下错误
System.IO.FileNotFoundException:“无法加载文件或程序集“MeFWCFClient,Version=1.0.0.0,Culture=neutral,PublicKeyToken=null”或其依赖项之一。该系统找不到指定的文件
引用了 Mef dll!
当我评论上面三行时,它就像一个魅力。
哈士奇WWW
达令说
慕的地6264312
相关分类