[转] (Exception from HRESULT: 0x80070002) (EnvDte80)

---------------------------------------------------------------------------------------------------
使用Script. Task组件并编辑脚本时跳错如下:
Cannot show Visual Studio Tools for Applications Editor
Additional Information:
The System Cannot Find The File Specified (Exception from HRESULT: 0x80070002) (EnvDte80)
----------------------------------------------------------------------------------------------------
下面是摘录的解决办法,原地址:http://social.msdn.microsoft.com/Forums/en-US/sqlintegrationservices/thread/e5337b0c-7f70-4603-859e-fbc7d0cf1c37
感谢这些大牛.
------------------------------------------------------------------------------------------------------
 
 
 

Ask a question

Monday, June 08, 2009 4:43 PM
 
 
 
John Shiangoli

210 Points
  
 
0
 
Hi All,
I was wondering if someone would be kind enough to assist me with the following issue?
Using Visual Studio 2008 and editing an SSIS project.
Using a data flow task, create a script. component, when I attempt to edit the script. I get the following error
Cannot show Visual Studio Tools for Applications Editor
Additional Information:
The System Cannot Find The File Specified (Exception from HRESULT: 0x80070002) (EnvDTE80)
with no success and I also reinstalled SQL Server 2008 and VS 2008 still with no success
Running on Windows XP SP 2
SQL Server 2008 SP 1
VS 2008 SP 1
Any ideas would be greatly appreciated
Regards
John
 
Reply
Quote
 
 

All Replies
Monday, June 08, 2009 5:20 PM
 
 
 
ETL vs ELTL
 
 
 
 
 
 
 

 (MCC)
10,445 Points
  
 
0
 
hi,
are you getting the error while editing OR clicking on design script. button?
which edition of sql server  you are using ( enterprise, develpoer....)
thanks-
--------------------------------------------------------------------------------
Let us TRY this | Don’t forget to mark the post(s) that answered your question
 
Reply
Quote
 
 
Monday, June 08, 2009 6:40 PM
 
 
 
John Shiangoli
 
 
 
 
 
 
 

210 Points
  
 
0
 
Hi
I get the issue when I click on the edit button under script. I'm using developer edition
Regards
John
 
Reply
Quote
 
 
Monday, June 08, 2009 11:26 PM
 
 
 
Shashi.Hosur
 

10 Points
 
 
0
 
I am also having the same problem.  Tried uninstalling 2008 SQL server, Visual studio 2008, SQl server 2005 and Visual Studio 2008.  Visual Studio tools for Applications and reinstalling them.
Proposed As Answer byAviationPlanningTuesday, June 30, 2009 4:22 PM
 
 
Reply
Quote
 
 
Thursday, August 27, 2009 2:19 PM
 
 
 
MS World Fan

0 Points
  
 
0
 
I installed vsta, sql server 2008 sp1, even reinstalled sql server2008, but the problem still persist ....
 

Can anybody solve thissss
 
thanks in advance 
 
Reply
Quote
 
 
Thursday, September 10, 2009 4:28 PM
 
TadAnderson

 (Partner)
200 Points
  
 
0
 
Same issue:
 
Cannot show Visual Studio Tools for Applications Editor
 Additional Information:
 The System Cannot Find The File Specified (Exception from HRESULT: 0x80070002) (EnvDTE80)
 
Unistalled SQL Server
 Uninstalled just the shared components
 Installed VSTA 2.0 SDK
 Repaired VS 2008
 Repaired SQL 2008 serveral times
 
Running Vista Ult 64bit
 
Must I tell my client we simply cannot use SSIS in 2008 and that they should consider other options for upgrading their 100s of DTS packages?
 
A re-write to a different solution?
 
Reply
Quote
 
 
Friday, September 11, 2009 6:43 AM
 
ETL vs ELTL
 

 (MCC)
10,445 Points
  
 
0
 
Hi,
 Please check the following threads on same forum
 
Error Starting Script. Editor in SSIS

Thanks-
--------------------------------------------------------------------------------
Let us TRY this | Don’t forget to mark the post(s) that answered your question

Reply
Quote
 
 
Wednesday, September 16, 2009 1:21 PM
 
 
 
MS World Fan
 

0 Points
  
 
0
 
Hi,
 
I'm sorry to say that I already tried complete things in mentioned post, before setting a query in this post....
 
 
Does anybody got solution...
 
 
i tried all things like installing r deinstalling sql suite and vsta, registering dlls etc....
 
 
any help would be appriciated...
 
 
thanks in advance
 
Reply
Quote
 
 
Monday, September 21, 2009 9:11 PM
 
 
 
Silviu Guea - MSFT

 (MSFT)
340 Points
 
 
9
 
I've used the following command script. to clean up cached VSTA configurations for SSIS with success. From a command prompt (under WoW32 on 64 bit platforms) with admin privileges (make sure to run the command prompt as an administrator if you have UAC enabled) run a batch file with the following content:
@rem start batch file
@rem delete the VSTA registry cache from the current user
REG DELETE HKCU\Software\Microsoft\VSTA /f
REG DELETE HKCU\Software\Microsoft\VSTAHost\SSIS_ScriptTask /f
REG DELETE HKCU\Software\Microsoft\VSTAHost\SSIS_ScriptComponent /f
@rem delete the VSTA registration cache for SSIS script. task and data flow script. component
REG DELETE HKLM\Software\Microsoft\VSTAHost\SSIS_ScriptTask /f
REG DELETE HKLM\Software\Microsoft\VSTAHost\SSIS_ScriptComponent /f
@rem delete the cached files from the HDD
rd /s /q "%AppData%\Microsoft\VSTA"
rd /s /q "%AppData%\Microsoft\VSTAHost\SSIS_ScriptTask"
rd /s /q "%AppData%\Microsoft\VSTAHost\SSIS_ScriptComponent"
rd /s /q "%USERPROFILE%\Local Settings\Application Data\VSTA"
rd /s /q "%USERPROFILE%\Local Settings\Application Data\VSTAHost\SSIS_ScriptTask"
rd /s /q "%USERPROFILE%\Local Settings\Application Data\VSTAHost\SSIS_ScriptComponent"
@rem re-generate the VSTA files for SSIS script. task and component
"%ProgramFiles%\Microsoft Visual Studio 9.0\Common7\IDE\vsta.exe" /hostid SSIS_ScriptTask /setup
"%ProgramFiles%\Microsoft Visual Studio 9.0\Common7\IDE\vsta.exe" /hostid SSIS_ScriptComponent /setup
@rem end batch file
Hope it helps,

--------------------------------------------------------------------------------
This posting is provided "AS IS" with no warranties, and confers no rightsMarked As Answer bySilviu Guea - MSFTMicrosoft Employee, ModeratorWednesday, September 23, 2009 5:31 PM
 
 
Reply
Quote
 
 
Wednesday, December 23, 2009 9:31 PM
 
Jeff Armstrong

5 Points
  
 
0
 
I had this problem with SQL 2008 and Windows XP.  I followed Silviu's steps and resolved my issue instantly, no reboot required.  Make sure to create the batch file as recommended and be patient and wait for it to close (may take a while for vsta to complete).
 
Reply
Quote
 
 
Saturday, February 06, 2010 3:09 AM
 
jstroope

0 Points
  
 
0
 
Thanks so much, Silviu.  I had the same problem mentioned above and your fix worked like a champ!
 
Reply
Quote
 
 
Thursday, February 11, 2010 10:25 PM
 
 
Ryan D
 

25 Points
  
 
0
 
I tried your recommended batch file, but now I get the following error when I click on the "Edit Script" button:
 Cannot find one or more components.  Please reinstall the application.
Cannot show VS 2008 Tools for Applications editor.The VSTA designer failed to load: "System.Runtime.InteropServices.COMException...
Error HRESULT E_FAIL has been returned from a call to a COM component.
at VSTADTEProvider.Interop.VSTADTEProviderClass.GetDTE...
at Microsoft.SqlServer.VSTAHosting.VSTAScriptingEngine.EnsureDTEObject()"
(Microsoft.SqlServer.VSTAScriptingLib) Where can I find the "setup" file/folder?

Reply
Quote
 
 
Friday, March 12, 2010 4:34 PM
 
CalgaryCoder
 

0 Points
  
 
0
 
Thanks for those instructions, Silviu.  I modified them a bit and got the problem solved. 
- I had to replace %ProgramFiles% with the C:\ProgramFiles (x86) path. 
- The "delete the cached files from the HDD" couldn't find those folders either, so I manually deleted them from here:
C:\Documents and Settings\\Application Data\Microsoft\VSTAHost
- Under the "delete the VSTA registration cache for SSIS script. task and data flow script. component" , those paths were invalid so I manually deleted registry folders in:
HKLM\SOFTWARE\Wow6432Node\Microsoft\VSTAHost
The differences may be due to me running Win Server 2003 x64.
--------------------------------------------------------------------------------
CalgaryCoder
 
Reply
Quote
 
 
Monday, June 21, 2010 9:05 PM
 
Ristogod
 
MTU Onsite Energy

0 Points
  
 
0
 

I've tried all the suggestions in this thread and still I cannot get the "Edit Script" button in the Script. Task control to work within a SSIS project within VS2008.
 
 
 
What's strange is when I take the script. given above and run it, most of the stuff is not found to remove or delete.
 
 
 
Anyone actually know the cause and sure fire solution to this?
 
Reply
Quote
 
 
Monday, July 12, 2010 8:05 PM
 
KyleAB

70 Points
  
 
0
 
I have this prob as well. Has everyone affected had multiple versions of SSIS and/or VS?
 
Reply
Quote
 
 
Wednesday, July 21, 2010 10:26 PM
 
 
 
SNMSDN
 

540 Points
  
 
0
 

I fixed it by going to Control Panel/Add Remove Programs and removing Microsoft Visual Studio Tools for Applications 2.0. Then reinstalled by getting the SDK from Summit Software here
 
http://www.summsoft.com/VSTAInfReq.aspx
 
Then did a .NET Framework 3.5 SP1 Repair with the installation from here
 
http://www.microsoft.com/downloads/details.aspx?familyid=ab99342f-5d1a-413d-8319-81da479ab0d7&displaylang=en
 
Unfortunately I did not test before doing the .NET Framework 3.5 SP1 Repair, so I can't say for sure whether or not that was absolutely necessary, I'm just elated to have my Script. Editor back!
 
Sean
 
Reply
Quote
 
 
Thursday, July 29, 2010 8:20 PM
 
Jonny Carmona
 

25 Points
  
 
0
 
It works for me!!! Thank you Silviu
--------------------------------------------------------------------------------
JAC
 
Reply
Quote
 
 
Sunday, September 05, 2010 7:17 PM
 
Jacob Sparrow

10 Points
  
 
0
 

That worked for me.
 
 
 
With gratitude for your help,
 
 
 
JS
 
Reply
Quote
 
 
Thursday, September 09, 2010 6:22 PM
 
 
 
Russell T. Gould, Ph.D. _
 
The Boeing Company

0 Points
  
 
0
 
Finally, after two days of shenanigans after installing SS 2008 R2, this script. saved my bacon!  Thanks, Silviu!
--------------------------------------------------------------------------------
Data Architect and Database Consultant Medford, Oregon
 
Reply
Quote
 
 
Thursday, March 03, 2011 9:14 PM
 
 
 
autocannon
 

10 Points
  
 
0
 
 
TITLE: Microsoft Visual Studio
 
------------------------------
 
 
Cannot show Visual Studio 2008 Tools for Applications editor.
 
 
------------------------------
 
ADDITIONAL INFORMATION:
 
 
Specified cast is not valid. (EnvDTE)
 
 
------------------------------
 
BUTTONS:
 
 
OK
 ------------------------------
 
 
 

I get the above error when trying to open an SSIS package script. task script. editor.  The package had been working just fine, but now I am getting this error, and the script. is running but it's not actually doing anything.
 
 

I am not sure what  "(under WoW32 on 64 bit platforms)" means, can you elaborate on that a bit. 
 
This is Visual Studio 2008 running on windows server 2008 (non R2) with service pack 2 on a 64 bit machine.
 
 
 
 
Reply
Quote
 
 
Friday, March 25, 2011 3:26 PM
 
autocannon

10 Points
 
 
0
 
I found out what was causing this.  We have an add-in called SQL Prompt 5 that we use in SSMS 2008 R2. When disabled in Visual Studio 9 > Tools > Add-in Manager this error went away.
Proposed As Answer byautocannonFriday, March 25, 2011 3:26 PM
 
 
Reply
Quote
 
 
Friday, June 17, 2011 2:57 PM
 
 
 
PAU3

0 Points
  
 
0
 
It works for me!!! Thank you Silviu
 
Reply
Quote
 
 
Wednesday, November 30, 2011 4:07 PM
 
 
 
Rb_Brewer
 
 
Reddy Software Solutions...

0 Points
  
 
0
 
Batch file said it couldn' file some of the files yet THE SOLUTION STILL WORKED!  Thanks!  I didn' even have to close SSIS.
--------------------------------------------------------------------------------
Pat Reddy
 
Reply
Quote
 
 
Thursday, November 29, 2012 8:46 AM
 
 
 
baobab123456789
 
0 Points
  
 
0
 
 
I've used the following command script. to clean up cached VSTA configurations for SSIS with success. From a command prompt (under WoW32 on 64 bit platforms) with admin privileges (make sure to run the command prompt as an administrator if you have UAC enabled) run a batch file with the following content:
 
@rem start batch file
 @rem delete the VSTA registry cache from the current user
 REG DELETE HKCU\Software\Microsoft\VSTA /f
 REG DELETE HKCU\Software\Microsoft\VSTAHost\SSIS_ScriptTask /f
 REG DELETE HKCU\Software\Microsoft\VSTAHost\SSIS_ScriptComponent /f
 
@rem delete the VSTA registration cache for SSIS script. task and data flow script. component
 REG DELETE HKLM\Software\Microsoft\VSTAHost\SSIS_ScriptTask /f
 REG DELETE HKLM\Software\Microsoft\VSTAHost\SSIS_ScriptComponent /f
 
@rem delete the cached files from the HDD
 rd /s /q "%AppData%\Microsoft\VSTA"
 rd /s /q "%AppData%\Microsoft\VSTAHost\SSIS_ScriptTask"
 rd /s /q "%AppData%\Microsoft\VSTAHost\SSIS_ScriptComponent"
 
rd /s /q "%USERPROFILE%\Local Settings\Application Data\VSTA"
 rd /s /q "%USERPROFILE%\Local Settings\Application Data\VSTAHost\SSIS_ScriptTask"
 rd /s /q "%USERPROFILE%\Local Settings\Application Data\VSTAHost\SSIS_ScriptComponent"
 
@rem re-generate the VSTA files for SSIS script. task and component
 "%ProgramFiles%\Microsoft Visual Studio 9.0\Common7\IDE\vsta.exe" /hostid SSIS_ScriptTask /setup
 "%ProgramFiles%\Microsoft Visual Studio 9.0\Common7\IDE\vsta.exe" /hostid SSIS_ScriptComponent /setup
 
@rem end batch file
 
Hope it helps,
 
--------------------------------------------------------------------------------
This posting is provided "AS IS" with no warranties, and confers no rights
Thanks a lot,  you saved my day!
 
It was almost ready to use on Windows 2008R2:
 
@rem start batch file
 @rem delete the VSTA registry cache from the current user
 REG DELETE HKCU\Software\Microsoft\VSTA /f
 REG DELETE HKCU\Software\Microsoft\VSTAHost\SSIS_ScriptTask /f
 REG DELETE HKCU\Software\Microsoft\VSTAHost\SSIS_ScriptComponent /f
 
@rem delete the VSTA registration cache for SSIS script. task and data flow script. component
 REG DELETE HKLM\Software\Wow6432Node\Microsoft\VSTAHost\SSIS_ScriptTask /f
 REG DELETE HKLM\Software\Wow6432Node\Microsoft\VSTAHost\SSIS_ScriptComponent /f
 
@rem delete the cached files from the HDD
 rd /s /q "%AppData%\Microsoft\VSTA"
 rd /s /q "%AppData%\Microsoft\VSTAHost\SSIS_ScriptTask"
 rd /s /q "%AppData%\Microsoft\VSTAHost\SSIS_ScriptComponent"
 
rd /s /q "C:\Users\administrateur.CHV\AppData\Local\Application Data\VSTA"
 rd /s /q "C:\Users\administrateur.CHV\AppData\Local\VSTAHost\SSIS_ScriptTask"
 rd /s /q "C:\Users\administrateur.CHV\AppData\Local\VSTAHost\SSIS_ScriptComponent"
 
@rem re-generate the VSTA files for SSIS script. task and component
 "%ProgramFiles(x86)%\Microsoft Visual Studio 9.0\Common7\IDE\vsta.exe" /hostid SSIS_ScriptTask /setup
 "%ProgramFiles(x86)%\Microsoft Visual Studio 9.0\Common7\IDE\vsta.exe" /hostid SSIS_ScriptComponent /setup
 
@rem end batch file
 

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/23233191/viewspace-752661/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/23233191/viewspace-752661/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值