Unable to add reference in BIDS 2008

Hi there,

I am trying to build packages Programmatically,addeda Script Task and tried to add some references from DLLs.I got an error message showing that there is no template found, and from the event viewer of windows which tells me to run 'VSTA.exe /installvstemplates' or 'devenv.exe /installvstemplates'. I have run these two command and reinstalled the SQL server 2008, but still unable to add any references to the project.

Can someone tell me what I can do for fixing this issue? Thanks in advance.

The error msg:

---------------------------
Integration Services Script Task
---------------------------
No template information found. See the application log in Event Viewer for more details.

In thewindows event viewer:

Event Type:Warning
Event Source:Visual Studio - VsTemplate
Event Category:None
Event ID:1
Date:12/4/2008
Time:4:26:03 PM
User:N/A
Computer:COW76957
Description:
The global template information is out of date. Regenerate the templates by running 'VSTA.exe /installvstemplates' or reinstalling the application. Note: corrective action requires Administrator privileges.
For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.

Thanks,

Mike

December 8th, 2008 7:34pm

I would suggest that you ask your question in this forum. This sounds more like a problem with your VSTA and you will find there more VSTA related help.
Free Windows Admin Tool Kit Click here and download it now
December 9th, 2008 6:09am

Hi, I have posted this issue to VSTA website, unfortunately was pointed back here for solution becausehe wassayingthe issue happend in SSISScript Task. Anyone can help me out?

Thanks.

December 9th, 2008 11:12pm


[I may have found a workaround: the code I had when I was not able to add the reference was in VB.Net, so I dropped in another Script Task with C# as the language, and added the reference without issues, so I think it has something to do with templates for VB.Net, STILL NOT SURE WHAT IS THE CAUSE FOR THIS]



Hi Mkie,
what did you ended up doing to fix this issue? I'm having the same issue right now when trying to add a reference to a Script Task Project.
I have tried to run devenv /installvsTemplates and /resetSettings, and also tried uninstalling/reinstalling the whole VS.2008 with all related components and still have the same errors. It's a show stopper right now as I cannot proceed with development .

let me know,
thanks,
Tamer
  • Proposed as answer by Tamer Yousef Monday, March 02, 2009 8:51 PM
Free Windows Admin Tool Kit Click here and download it now
March 2nd, 2009 6:46pm

I'm having the same issue.
March 3rd, 2009 3:48pm

bpinbama said:

I'm having the same issue.



Does it affect all languages (C# and VB.net)? or is it specific to a language and work with the other language?

-Tamer
Free Windows Admin Tool Kit Click here and download it now
March 4th, 2009 6:24pm

Was anyone able to resolve this? I tried EVERYTHING!! Uninstalled VSTS, SQL Server (all components) and still no go. :(
Please help.
March 17th, 2009 3:44am

Did this ever get resolved? I have the same issue..... also i cant code in C!
Free Windows Admin Tool Kit Click here and download it now
April 30th, 2009 3:00pm

Hi,
HEre i found the solution for the problem.
http://blog.laksha.net/2008/09/no-visual-studio-template-information.html?showComment=1234405860000

I hope it will help.
  • Proposed as answer by Gancev Wednesday, May 13, 2009 1:40 PM
May 13th, 2009 1:40pm

You can try running the following commandin the run prompt:
vsta.exe /hostid SSIS_ScriptTask /setup

make sure you run this command using an administrator account and "as an administrator" if you have User Account Control turned on.

Hope it helps,
Silviu
Free Windows Admin Tool Kit Click here and download it now
July 2nd, 2009 6:19pm

I am getting the same problem as the original poster, but I am getting it when I add a script task in the development environment of SSIS 2008, select Microsoft Visual Basic 2008 as the language, edit the script and then try to add a reference.

I tried running the command that you recommended, but it has not fixed the problem. My event log shows the following:

Event Type:Warning
Event Source:Visual Studio - VsTemplate
Event Category:None
Event ID:1
Date:8/4/2009
Time:9:35:25 AM
User:N/A
Computer:RMT0099
Description:
The global template information is out of date. Regenerate the templates by running 'VSTA.exe /installvstemplates' or reinstalling the application. Note: corrective action requires Administrator privileges.

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.


We are having the issue on all of the machines on which we have installedBIDS 2008. Is there anything else we can try?

August 4th, 2009 1:46pm

I saw the last post was back in August. Was a solution ever found? I'm having the same type of problem using VB as the language for an SSIS Script Task in BIDS 2008. I'm trying to reference System.Runtime.InteropServices to programmatically open a set of Excel workbooks, run a macro in each, then close the files. These workbooks are used later as data sources for a data flow task.

I used thearticle from http://support.microsoft.com/kb/306682/EN-USas a starting point. A windows application built using VS2005 Professional using VB works fine.

I then tried porting over to a script task in SSIS using BIDS 2008 and hit the same roadblock described above.

------------------------------------------------

The application event log, as in the posts above, gives the description:

The global template information is out of date. Regenerate the templates by running 'VSTA.exe /installvstemplates' or reinstalling the application. Note: corrective action requires Administrator privileges.

----------------------------------------------------------------------

My script code thusfar:


' Microsoft SQL Server Integration Services Script Task

' Write scripts using Microsoft Visual Basic 2008.

' The ScriptMain is the entry point class of the script.

Imports

System

Imports

System.Data

Imports

System.Math

Imports

Microsoft.SqlServer.Dts.Runtime

Imports

System.Runtime.InteropServices

<System.AddIn.AddIn(

"ScriptMain", Version:="1.0", Publisher:="", Description:="")> _

<System.CLSCompliantAttribute(

False)> _

Partial

Public Class ScriptMain

Inherits Microsoft.SqlServer.Dts.Tasks.ScriptTask.VSTARTScriptObjectModelBase

Enum ScriptResults

Success = Microsoft.SqlServer.Dts.Runtime.DTSExecResult.Success

Failure = Microsoft.SqlServer.Dts.Runtime.DTSExecResult.Failure

End Enum

' The execution engine calls this method when the task executes.

' To access the object model, use the Dts property. Connections, variables, events,

' and logging features are available as members of the Dts property as shown in the following examples.

'

' To reference a variable, call Dts.Variables("MyCaseSensitiveVariableName").Value

' To post a log entry, call Dts.Log("This is my log text", 999, Nothing)

' To fire an event, call Dts.Events.FireInformation(99, "test", "hit the help message", "", 0, True)

'

' To use the connections collection use something like the following:

' ConnectionManager cm = Dts.Connections.Add("OLEDB")

' cm.ConnectionString = "Data Source=localhost;Initial Catalog=AdventureWorks;Provider=SQLNCLI10;Integrated Security=SSPI;Auto Translate=False;"

'

' Before returning from this method, set the value of Dts.TaskResult to indicate success or failure.

'

' To open Help, press F1.

Public Sub Main()

'

Dim oExcel As Excel.Application

Dim oBook As Excel.Workbook

Dim oBooks As Excel.Workbooks

oExcel = CreateObject(

"Excel.Application")

oExcel.Visible =

True

oBooks = oExcel.Workbooks

oBook = oBooks.Open(

\\xxxxxxxxxxxxxxxxxx\Occupation Codes.xls) [path obfuscated]

oBook.Close(

False)

System.Runtime.InteropServices.Marshal.ReleaseComObject(oBook)

oBook =

Nothing

System.Runtime.InteropServices.Marshal.ReleaseComObject(oBooks)

oBooks =

Nothing

oExcel.Quit()

System.Runtime.InteropServices.Marshal.ReleaseComObject(oExcel)

oExcel =

Nothing

'

Dts.TaskResult = ScriptResults.Success

End Sub

End

Class


--------------------------------------------

Error list descriptions:

Type 'Excel.Application' is not defined.
Type 'Excel.Workbook' is not defined.
Type 'Excel.Workbooks' is not defined.

Free Windows Admin Tool Kit Click here and download it now
November 6th, 2009 2:18pm

Having the same problem. Anyone find a solution?
March 8th, 2010 1:57pm

Had a similar issue and with the help of a great friend discovered this can be worked around by editing the source code in XML for the package in SSIS VS2008

Verify that you do have the PIA installed properly for your particular version of Office.

Open your project

Open your package

Create a script Task

Select "Visual Basic 2008"

Edit the Script. (generates basic template for code)

Save and close the script.

Save and close the package

In Solution Explorer, right click on the package>view code

In the XML file locate the Script Task (search for "RootNamespace")

Scroll to <ItemGroup> <references include ... /> (found several lines beneath the first RootNamespace instance)

Add the following: <Reference Include="Microsoft.Office.Interop.[desired application], Version=[your application version], Culture=neutral, PublicKeyToken=[your application version token]" />

The version and token can be found by right click>properties on the applicable object found in "C:\Windows\assembly"

Scroll to <ItemGroup> <import include .../>

Add the following: <Import Include="Microsoft.Office.Interop.[application]" />

Save the xml source code.

Open the package.

Open the Script Task

Edit Script

Begin writing your code...

  • Proposed as answer by TennesseePaul Thursday, April 22, 2010 5:52 PM
Free Windows Admin Tool Kit Click here and download it now
April 22nd, 2010 5:51pm

hello. Is there a solution to this problem yet? The posted solution does not work at all. vsta.exe /hostid SSIS_ScriptTask /setup does not fix the issue. Unless I am missing something. This problem cascades as well as you can't then import the dtsx file into your Integration services as it will not find the dll again.

I am not even looking at TennessePaul's fix as that just looks like a complete headache.

mac

May 27th, 2010 6:27pm

I believe that the problem with adding references to projects in BIDS is that it lacks the full features of Visual Studio.  In VS under the Project Menu there is an Add Reference option that lets you add .Net or COM objects to your project.

I currently have SS (BIDS) 2008 and VS 2005 so I can't change my 2008 projects with VS.  I plan to install VS 2008 and try it then.

Steve

Free Windows Admin Tool Kit Click here and download it now
July 20th, 2010 4:40pm

macaroo, I was experiencing the same problems and went through the "trouble" that TennesseePaul proposed and it solved the issue for me. It's really not as difficult as it may sound.

The only thing that was different in my situation is that I was referencing a custom assembly (without a strong name), not one installed in the GAC. So in my case, the "PublicKeyToken" attribute was unnecessary and I had to also add a HintPath element in order for the import to work.

 e.g.

<Reference Include="AssemblyName, Version=version number, Culture=neutral">
<HintPath>full path to dll--relative path didn't work for me</HintPath></Reference>

 

October 18th, 2010 2:11pm

Hello Paul

the solution suggested by TennesseePaul , will work. But if there are more than 1 script tasks in a package, it becomes a tedious work to repeat that task everytime.

 

I have a lot of packages to develop and i am stuck with this issue only. I am not able to reference a custom code .net dll. Everytime i try to add my custom .net assembly, i get the error popup as No template information found. I have tried every solution mentioned above.I will now uninstall VS 2008 and install it again.

 

Is this a product bug in SQL Server 2008. I did not face any such issue in Sql Sever 2005, SSIS programming.

 

Please help .

 

thanks

prasanna

 


 

 

Free Windows Admin Tool Kit Click here and download it now
March 8th, 2011 5:30pm

 

Also, i noticed that this error comes only when the Visual Basic.net is selected as the language to program in the script task. It does not throw any error for Visual C#.

 

 

March 8th, 2011 6:49pm

None of the other solutions worked for me.  The reference would be added but whenever the component was opened for editing again, the reference would be lost.  If found this to work...

1. Add the reference (System.DirectoryServices in my case) and ignore the error.

2. Select Build SC_* (or ST_* for a script task) on the project menu.

After doing this the reference was retained.


Free Windows Admin Tool Kit Click here and download it now
September 9th, 2013 5:31am

So huge solutions but nothing

Real problem is conflicting between .net reference ADODB and classic ActiveX COM Library. Microsoft does'not garranty both way and right answer to choose ref ADODB (7...) in .NET tab in project. Works great. Good luck.

For Russian - msdn issue

http://support.microsoft.com/kb/318559 

July 16th, 2014 12:00pm


All the "command line" stuff didn't work for me, but the solution by TennesseePaul worked like a charm.

Free Windows Admin Tool Kit Click here and download it now
May 26th, 2015 3:49pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics