MSScriptControl problem in .net 2.0

M

Michael Kremser

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.Timeout'

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\Microsoft.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
 
M

Michael Kremser

Michael said:
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.Timeout'

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\Microsoft.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".
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top