我正在尝试编译此处列出的程序:
http://www.webreference.com/js/column117/index.html
但是,每次我尝试时都会出现错误:
错误 JS1259:引用的程序集依赖于另一个未引用或找不到的程序集
我检查了一下,据我所知,我拥有正在导入的库的所有 DLL 文件。怎么了?
有没有办法获得关于哪个库缺少哪个类或反之亦然的更详细信息?
我正在尝试编译此处列出的程序:
http://www.webreference.com/js/column117/index.html
但是,每次我尝试时都会出现错误:
错误 JS1259:引用的程序集依赖于另一个未引用或找不到的程序集
我检查了一下,据我所知,我拥有正在导入的库的所有 DLL 文件。怎么了?
有没有办法获得关于哪个库缺少哪个类或反之亦然的更详细信息?
似乎我还需要导入辅助功能才能使其与新版本一起使用。更详细的错误消息会很好。:(
但是当它到达“private var myData:DataTable;”时,我现在在这个脚本中遇到了同样的错误。部分:
import System;
import System.Windows.Forms;
//import System.ComponentModel;
import System.Drawing;
import Accessibility;
import System.Data;
import System.Data.SqlClient;
package ResizeMe
{
class PanelForm extends System.Windows.Forms.Form
{
private var panel1: Panel;
private var label1: Label;
private var myDataForm: DataGridView;
private var myData: DataTable; // !!!
private var connectionString: String;
private var selectCommand: String;
private var dataAdapter: SqlDataAdapter;
private var commandBuilder: SqlCommandBuilder;
function PanelForm()
{
this.Text= "Anchoring Demo: Resize Me";
try
{
selectCommand = "SELECT * FROM dbo.Deities";
connectionString = "Integrated Security=SSPI;Persist Security Info=False;" +
"Initial Catalog=protos;Data Source=localhost"
dataAdapter = new SqlDataAdapter(selectCommand, connectionString);
commandBuilder = new SqlCommandBuilder(dataAdapter);
// myData = new DataTable();
// myData.Locale = System.Globalization.CultureInfo.InvariantCulture;
// dataAdapter.Fill(myData); // !!!
// myDataForm = new DataGridView();
// myDataForm.DataSource = myData;
// myDataForm.Location= new Point(100,100);
// myDataForm.Size= new System.Drawing.Size(100,100);
}
catch (e:SqlException)
{
// MessageBox.Show("To run this example, replace the value of the " +
// "connectionString variable with a connection string that is " +
// "valid for your system.");
}
label1= new Label;
label1.Location= new Point(10,10);
label1.Size= new System.Drawing.Size(80,20);
label1.Name= "label1";
label1.Text= "This is a Label";
panel1= new Panel;
panel1.Location= new Point(0,0);
panel1.Size= new System.Drawing.Size(300,300);
panel1.Name= "This is a Panel";
panel1.Anchor= AnchorStyles.Top | AnchorStyles.Left;
panel1.Controls.Add(label1);
panel1.Controls.Add(myDataForm);
this.Controls.Add(panel1);
}
}
}
Application.Run(new ResizeMe.PanelForm());
任何线索我错过了什么?
[编辑] 仅供参考,在开发过程中使用 .NET Framework v2.0.50727 中包含的 jsc.exe,因为它会产生实际上有用的详细错误。如果需要,您可以随时切换到更新版本的最终版本。这就是解决我的问题的方法。