April 9, 2010 at 12:19 am
Hi all,
if i try to edit the source code of any script componente in any dataflow the following error is displayed after pressing the "design script" button.
===================================
Cannot show Visual Studio for Applications editor. (Microsoft Visual Studio)
------------------------------
===================================
Specified cast is not valid. (Microsoft.VisualBasic.Vsa.DT)
------------------------------
Program Location:
at Microsoft.VisualBasic.Vsa.Dt.VsaIDE.ShowIDE(Boolean showOrHide)
at Microsoft.SqlServer.VSAHosting.DesignTime.ShowIDE(Boolean showOrHide)
at Microsoft.SqlServer.Dts.Pipeline.ScriptComponentHost.ShowIDE()
at Microsoft.DataTransformationServices.DataFlowUI.ScriptUI.propPage_DesignScript(Object sender, EventArgs args)
The provided link doesn't point to any helpful information.
The package was initially build under SSIS Mangement Studio of an SQL Server 2005 SP1. Actually the SQL server was upgradet to SP3. Before the upgrad i was able to edit all script components in the package without problems.
So my question is how to solve the problem. Does any body have an idea?
Thanks a lot in advance....
April 9, 2010 at 3:32 am
First you'll have to figure out what piece of code generates the error. Maybe it uses some depricated functions?
Then, you can edit the code in the XML file in the package to resolve the issue.
Need an answer? No, you need a question
My blog at https://sqlkover.com.
MCSE Business Intelligence - Microsoft Data Platform MVP
April 9, 2010 at 4:18 am
Hi da- zero,
there is no code involved that i created manually. The message is shown from the edit dialog of an script component when i press the button "design script" in the script section.
The dialog is provided by visual studio, so i'm not sure which code i should examine to get the information you mentioned.
Kind regards...
April 9, 2010 at 4:37 am
I assume there is some Visual Basic code inside the Script Component? You know, the code that you want to edit?
Or does the error happen when you drag a new Script Component to the work pane and you want to write some new code?
Need an answer? No, you need a question
My blog at https://sqlkover.com.
MCSE Business Intelligence - Microsoft Data Platform MVP
April 9, 2010 at 4:45 am
I have had something similar happen when after i did a SP upgrade I couldn't find an easy answer, I ended up deleting the component that caused the issue and then re-creating it and it worked fine.
Since you don't have any custom code it shoudn't be too difficult to rebuild it, I saved a copy of the package xml first so i knew what the input/outputs were.
April 9, 2010 at 5:48 am
@da- zero:
Why should plain text cause a problem while opening VSA? Further more i was able to edit the source code of any script component some time ago.
Autsch... the package i'm talking about realises a database synchronisation between the sql server and a mysql database with quite a lot of tables. So there is not only on script component to edit...
Considering your reply I'll try to create a new script component to test if this could be a possible solution.
Here a little update:
I tried to create a new script component. Unfortunatly the same error message was displayed after clicking on "design script". So this is not the solution. :ermm:
April 9, 2010 at 5:55 am
gfey (4/9/2010)
@da- zero:Why should plain text cause a problem while opening VSA? Further more i was able to edit the source code of any script component some time ago.
So, if I've read your question at the beginning of this topic correctly:
* Specified cast is not valid. (Microsoft.VisualBasic.Vsa.DT) This happens when you try to design the script, meaning, when Visual Studio tries to interprete the code. It's not just plain text anymore then. (especially since this gives a cast error). The idea of editing the plain text in the XML is to adapt the code so that the cast error goes away.
* if i try to edit the source code of any script componente in any dataflow the following error is displayed after pressing the "design script" button.. So, first you could edit the code and you can't anymore. This is probably caused by the upgrade, which changes somehow the way Visual Studio treats your code.
Conclusion, you have two options:
1. Find the code that generates the error and fix it. (like I originally said)
2. Remove all the script components and write new ones. (like steveb. said)
Need an answer? No, you need a question
My blog at https://sqlkover.com.
MCSE Business Intelligence - Microsoft Data Platform MVP
April 9, 2010 at 6:00 am
@da- zero:
Meanwhile i tried to create a new script component and got the same error. So it is definitely no problem with the source code contained in the script component.
April 9, 2010 at 6:15 am
Does it happen with all the new script components that you add?
Can you write some code, or does the error happen right away? Meaning, you are not able to write even one single line of code because you can't even open the designer?
Need an answer? No, you need a question
My blog at https://sqlkover.com.
MCSE Business Intelligence - Microsoft Data Platform MVP
April 9, 2010 at 6:28 am
Another thing that i have tried is to start a new solution and import the package that is casuing problems into the solution, i have saved a few corupted packages by doing this
April 9, 2010 at 6:39 am
@da- zero:
There is no chance to write even one line of code because the VSA doesn't open even wehen i try to create a new script component. And yes the error occurs on every script component i tried to open so far.
Regarding your post, i tried to create a new package. unfortunatly the error persists.
I think the upgrade crashed something in the installation. Do you think a reinstall of VS might help? All the post in the other forums tell that this did not solve the problem.
April 9, 2010 at 6:54 am
Well then, we can conclude that the upgrade to sp3 messed everything up 🙂
Can you try the solutions given in the following URLs?
and
Need an answer? No, you need a question
My blog at https://sqlkover.com.
MCSE Business Intelligence - Microsoft Data Platform MVP
April 9, 2010 at 8:40 am
When I had the issue, I went through all the suggestions of moving and removing files I even ended up changing some registry settings, but by the end of it I gave up and removed all the SQL server components including BIDS and also removed my version of Visual studio and then re-installed everything and it worked fine, though no guarantee that this will work for you.
Viewing 14 posts - 1 through 13 (of 13 total)
You must be logged in to reply to this topic. Login to reply