473,387 Members | 1,603 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

MSScriptControl problem in .net 2.0

Hi NG!

I have converted a running VS.net 2003 solution to VS.net 2005 Beta 2
(Version 8.0.50215.44) and tried to compile it.

This is the code:

myScriptingEngine = new MSScriptControl.ScriptControlClass();
myScriptingEngine.AllowUI = false;
myScriptingEngine.Language = "VBScript";
myScriptingEngine.Timeout = 300000;
myScriptingEngine.UseSafeSubset = false;
myScriptingEngine.Reset();

In the 4th line, the compiler yields:

Error 71 Ambiguity between 'MSScriptControl.IScriptControl.Timeout' and
'MSScriptControl.DScriptControlSource_Event.Timeou t'

Also it claims each line where "myScriptingEngine.Error" occurs.

Another problem is that there are a lot of errors like:

Warning 1 The element 'PropertyGroup' in namespace
'http://schemas.microsoft.com/developer/msbuild/2003' has invalid child
element 'CustomBeforeMicrosoftCommonTargets' in namespace
'http://schemas.microsoft.com/developer/msbuild/2003'. Expected
'Property' in namespace
'http://schemas.microsoft.com/developer/msbuild/2003'.
K:\WINDOWS\Microsoft.NET\Framework\v2.0.50215\Micr osoft.Common.targets 18
10 Miscellaneous Files

Does anyone have an idea how I can solve one of these problems?

Thanks in advance for any hint.

Best regards,

Michael
Nov 17 '05 #1
1 8749
Michael Kremser schrieb:
Hi NG!

I have converted a running VS.net 2003 solution to VS.net 2005 Beta 2
(Version 8.0.50215.44) and tried to compile it.

This is the code:

myScriptingEngine = new MSScriptControl.ScriptControlClass();
myScriptingEngine.AllowUI = false;
myScriptingEngine.Language = "VBScript";
myScriptingEngine.Timeout = 300000;
myScriptingEngine.UseSafeSubset = false;
myScriptingEngine.Reset();

In the 4th line, the compiler yields:

Error 71 Ambiguity between
'MSScriptControl.IScriptControl.Timeout' and
'MSScriptControl.DScriptControlSource_Event.Timeou t'

Also it claims each line where "myScriptingEngine.Error" occurs.

Another problem is that there are a lot of errors like:

Warning 1 The element 'PropertyGroup' in namespace
'http://schemas.microsoft.com/developer/msbuild/2003' has invalid child
element 'CustomBeforeMicrosoftCommonTargets' in namespace
'http://schemas.microsoft.com/developer/msbuild/2003'. Expected
'Property' in namespace
'http://schemas.microsoft.com/developer/msbuild/2003'.
K:\WINDOWS\Microsoft.NET\Framework\v2.0.50215\Micr osoft.Common.targets
18 10 Miscellaneous Files

Does anyone have an idea how I can solve one of these problems?

Thanks in advance for any hint.

Best regards,

Michael


Problem 1 is solved:

"myScriptingEngine" was of type "ScriptControl", which is as interface
that is also implemented by ScriptControlClass. In .net 1.1, this was
not a problem; however, in .net 2.0 it is. It was solved by defining
"myScriptingEngine" as "ScriptControlClass".
Nov 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Csaba Gabor | last post by:
The usual example shown for trapping for failure of COM instantiation (Windows systems) is something like (see for example http://at2.php.net/manual/en/class.com.php): $word = new...
0
by: Andrew Powell | last post by:
Hello all. Newcommer to the newsgroups so please let me know if Im not adhering to any policy. Ive setup an app (.NET app) which is using the MSScriptControl. I have the ActivePython package...
0
by: Alejandra Parra | last post by:
I have the next code: Dim Script As Object = CreateObject("MSScriptControl.ScriptControl") I've run this application in WinXP and it works normally, but if I run the application in Win98, the...
0
by: Slava | last post by:
Hi All, Is it possible to retrieve IActiveScriptSite interface from MSScriptControl using C#? I need this for implementation Exit function ( IActiveScript::Close ). Jscript running inside win...
1
by: Jozsef Bekes | last post by:
Hi All, I need to offer scripting possibilities in my app, and have to use MSSCriptControl for some reasons. I would like to use the feature that's called variable number of arguments, that is...
0
by: DraguVaso | last post by:
Hi, I have a VBScript that I want to run from my VB.NET application. I initialize everything like this: AxScriptControl1.Language = "VBScript" AxScriptControl1.Reset()...
0
by: DraguVaso | last post by:
Hi, I have a VB.NET-application that has to open an email in Outlook. for this I have some VBA-code in a MSScriptControl. This works like always, but sometimes it thorws this error: "...
18
by: Franky | last post by:
I don't know how to ask this so that someone will not misread it but here goes. At run time I want to be able to evaluate functions from the Math library, but at design time I do not know what...
7
by: david | last post by:
I have searched existing posts and have not found an answer to this variation of an old question. I have the following string stored in a variable Dim str as String = "If 9000 < 10200 Then (6 -...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.