0 / 0 / 0
Регистрация: 10.02.2013
Сообщений: 60
1

Application requires that assembly stdole Version 7.0.3300.0

13.01.2014, 17:13. Показов 2493. Ответов 1
Метки нет (Все метки)

Студворк — интернет-сервис помощи студентам
Почему-то на XP выдает такую ошибку... 2010 Express
Код

C#
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Windows.Forms;
using Microsoft.Office.Interop.Excel;
using System.Xml;
 
namespace Konsultant
{
    public partial class MainForm : Form
    {
        private Microsoft.Office.Interop.Excel.Application ObjExcel;
        private Microsoft.Office.Interop.Excel.Workbook ObjWorkBook;
        private Microsoft.Office.Interop.Excel.Worksheet ObjWorkSheet;
        private string time;
        private string put;
        private string puth_old = null;
        private bool timeColorRed = false;
 
        public MainForm(string[] args)
        {
            InitializeComponent();
            timer_smen.Stop();
            this.WindowState = FormWindowState.Maximized;
            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
            ProgStart();
        }
        //Таймер
        void Timer_smenTick(object sender, EventArgs e)
        {
            if(l_timer.Text == "0")
            {
                timer_smen.Stop();
                l_timer.ForeColor = SystemColors.ControlText;
                timeColorRed = false;
                Update_dan();
            }
            else
                l_timer.Text = Convert.ToString(Convert.ToInt32(l_timer.Text) - 1);
 
            if((timeColorRed == false) && (Convert.ToInt32(l_timer.Text) < (Convert.ToInt32(time) / 3)))
            {
                l_timer.ForeColor = Color.Red;
                timeColorRed = true;
            }
 
        }
        //Считывание из Excel вручную
        private void открытьToolStripMenuItem_Click(object sender, EventArgs e)
        {
            OpenFileDialog openDialog = new OpenFileDialog();
            openDialog.Filter = "Файл Excel|*.XLSX;*.XLS";
            openDialog.ShowDialog();
            if (openDialog.FileName != "")
                LoadExcel(openDialog.FileName);
            else
                MessageBox.Show("Ошибка при считывании Excel файла", "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error);                   
        }
        //Считывание из Excel
        private void LoadExcel(string putExcel)
        {
            try
            {
                ObjExcel = new Microsoft.Office.Interop.Excel.Application();
                //Книга.
                ObjWorkBook = ObjExcel.Workbooks.Open(putExcel);
                //Таблица.
                ObjWorkSheet = ObjExcel.ActiveSheet as Microsoft.Office.Interop.Excel.Worksheet;
                Microsoft.Office.Interop.Excel.Range rg = null;
                //Иникатор
                loading frm = new loading();
                frm.Show(this);
                this.Enabled = false;
 
                Int32 row = 3;
                dataGridViewMain.Rows.Clear();
                List<String> arr = new List<string>();
                while (ObjWorkSheet.get_Range("a" + row, "a" + row).Value != null)
                {
                    // Читаем данные из ячейки
                    rg = ObjWorkSheet.get_Range("a" + row, "g" + row);
                    foreach (Microsoft.Office.Interop.Excel.Range item in rg)
                    {
                        try
                        {
                            arr.Add(item.Value.ToString().Trim());
                        }
                        catch { arr.Add(""); }
                    }
 
                    if (arr[0] != "Профессия")
                    {
                        dataGridViewMain.Rows.Add(arr[0], arr[1], arr[4], arr[5], arr[6]);
                        (frm.Controls["Kol"] as System.Windows.Forms.Label).Text = Convert.ToString(row - 1);
                    }
                    row++;
                    arr.Clear();
                }
 
                this.Enabled = true;
                frm.Close();
                //MessageBox.Show("Файл успешно считан!", "Считывания Excel файла", MessageBoxButtons.OK, MessageBoxIcon.Information);
                Update_dan();
            }
            catch (Exception ex)
            {
                MessageBox.Show("Ошибка: " + ex.Message, "Ошибка при считывании Excel файла", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            finally
            {
                //ObjWorkBook.Close();
                //(false, "", null)
                // Закрытие приложения Excel.
                ObjExcel.Quit();
                ObjWorkBook = null;
                ObjWorkSheet = null;
                ObjExcel = null;
                GC.Collect();
            }
        }
        //Обновление информации
        private void Update_dan()
        {
            Random rnd = new Random();
            int index =rnd.Next(0, dataGridViewMain.RowCount);
            
            L_prof.Text=dataGridViewMain.Rows[index].Cells[0].Value.ToString();
            L_org.Text=dataGridViewMain.Rows[index].Cells[1].Value.ToString();
            L_zp.Text=dataGridViewMain.Rows[index].Cells[2].Value.ToString();
            L_adr.Text=dataGridViewMain.Rows[index].Cells[3].Value.ToString();
            L_rab_mes.Text=dataGridViewMain.Rows[index].Cells[4].Value.ToString();
            l_timer.Text = time;
            timer_smen.Start();
        }
        //Включение выключение рамки
        private void убратьРамкуToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (this.FormBorderStyle == System.Windows.Forms.FormBorderStyle.None)
                this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Sizable;
            else
                this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
        }
        //Выход
        private void выходToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Close();
        }
        //При запуске
        private void ProgStart()
        {
            if (System.IO.File.Exists((System.Windows.Forms.Application.StartupPath + "\\config.xml")) == false)
            {
                Options frm_opt = new Options();
                frm_opt.ShowDialog();
                LoadXML();
            }
            else //Считывание XML
            {
                LoadXML();
            }
        }
        //Загрузка из XML
        private void LoadXML()
        {
            XmlTextReader XmlReader = new XmlTextReader((System.Windows.Forms.Application.StartupPath + "\\config.xml"));
            while (XmlReader.Read())
            {
                if (XmlReader.NodeType == XmlNodeType.Element)
                {
                    if (XmlReader.Name.Equals("Constant"))
                    {
                        time = Convert.ToString(XmlReader.GetAttribute("Time"));
                        put = Convert.ToString(XmlReader.GetAttribute("Put"));
                    }
                }
            }
            XmlReader.Close();
            if (puth_old != put)
            {
                puth_old = put;
                LoadExcel(put);
            }
            else
                Update_dan();
                
        }
        //Окно настроек
        private void настройкиToolStripMenuItem_Click_1(object sender, EventArgs e)
        {
            Options frm = new Options();
            frm.ShowDialog();
            LoadXML();
        }
        //Изменение размера формы
        private void MainForm_SizeChanged(object sender, EventArgs e)
        {
            int temp = this.Size.Height / 30;
            tabControl1.Font = new System.Drawing.Font(tabControl1.Font.Name, temp);
            L_prof.Font = tabControl1.Font;
            L_org.Font = tabControl1.Font;
            L_adr.Font = tabControl1.Font;
            l_timer.Font = tabControl1.Font;
            adr_org.Font = tabControl1.Font;
            org_g.Font = tabControl1.Font;
        }
    }
}


Добавлено через 30 секунд
Писал под .NET 4

Добавлено через 17 секунд
Может весь проект прикрепить?

Добавлено через 14 минут
Полная ошибка

"Unable to install or run the application. The application requires stdole Version 7.0.3300.0 in the Global Assembly Cache (GAC) first.
0
Programming
Эксперт
94731 / 64177 / 26122
Регистрация: 12.04.2006
Сообщений: 116,782
13.01.2014, 17:13
Ответы с готовыми решениями:

Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 3
ребят почему так пишет Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower...

Building MFC application with /MD[d] (CRT dll version) requires MFC shared dll
Здравствуйте. Подключил afx.h, появилась ошибка. Из-за чего? Что делать?

Rake-11.3.0 requires ruby version >= 1.9.3
Всем привет! Просьба разобраться с RoR, гугление не спасло (хотя, варианты решения, естественно,...

Получение assembly version file
Подскажите я получаю assembly version file вот так: FileVersionInfo fv =...

1
0 / 0 / 0
Регистрация: 10.02.2013
Сообщений: 60
15.01.2014, 09:19  [ТС] 2
Жаль то не помогли... Но решение нашел! Надо было в сборку добавить stdole.dll.
0
15.01.2014, 09:19
IT_Exp
Эксперт
87844 / 49110 / 22898
Регистрация: 17.06.2006
Сообщений: 92,604
15.01.2014, 09:19
Помогаю со студенческими работами здесь

Assembly-CSharp, Version=0.0.0.0. is not marked as serializable
Делаю систему сохранения. Пытаюсь сохранить позицию игрока, но выдает вот такую ошибку: ...

Gem::InstallError: rubyzip requires Ruby version >= 1.9.2
Добрый вечер! Изучаю Ruby on Rails Tutorial Michael Hartl. В 3-ей главе на установке $ bundle...

Ошибка при соединении с БД "Mixed mode assembly is built against version 'v2.0.50727'"
Выдает такую ошибку при соединении с базой &quot;Mixed mode assembly is built against version...

Нужны драйвера на hp scanjet 3300 и hp laserjet 3300
Привет всем!!! Подскажите пожалуйста где можно скачать драйвер на hp scanjet 3300 и hp laserjet...


Искать еще темы с ответами

Или воспользуйтесь поиском по форуму:
2
Ответ Создать тему
Опции темы

КиберФорум - форум программистов, компьютерный форум, программирование
Powered by vBulletin
Copyright ©2000 - 2023, CyberForum.ru