.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Referencing SQL 2005 SMO from VS 2010

Posted By:      Posted Date: September 16, 2010    Points: 0   Category :Sql Server
I've just migrated to Visual Studio 2010 and have found it strange to reference SQL 2005 SMO. Under VS2008, add reference dialog will show GAC in .NET tab. After installing VS2010, SQL 2008 SMO are also installed, and I saw two sets of SMO in GAC with version of 9.0 and 10.0. That's good. But when I open my project, VS 2010 told me that all is wrong. By using add reference dialog, I found no SMO objects in .NET tab. So I browse for dll files under c:\program files\microsoft sql server\90\SDK .... It will not work well since the project file will record relative path. After moving my project, I must repeat this. Why can't I find 2005 SMO in this dialog? I can understand that SMO for 2008 is not there. My project is a .NET 2.0 one and maybe SQL 2008 does not support .NET 2.0. But 2005 do. I can see it in GAC but cannot reference it from VS2010. Hope I've described clearly. Thanks for help!

View Complete Post

More Related Resource Links

Procedure to move all SP 2010 databases from SQL 2005 to SQL 2008 R2

I have a single SharePoint 2010 WFE with a single SQL 2005 64-bit backend.  I need to decomission the SQL 2005 server.  What is the best procedure to move all the SharePoint associated databases to SQL 2008 R2? I have already read this MS doc on moving all databases: http://technet.microsoft.com/en-us/library/cc512725.aspx So the actual move procedure is standard SQL fodder. What I'm not clear about is what to do about the "other" SharePoint databases and how to reassociate them once the DBs are on the new SQL server.  For example, the Usage and Health DB is going to "Wss_Logging" and it specifies my old SQL server.  It is greyed so I cannot chagne it in Central Admin.  How do I let SharePoint know that these databases have been moved too?

Problems with interaction between MS VS 2010 and MS SQL 2005

This is extremely frustrating.  I had bought MS VS 2005, years ago, and generally liked it.  I installed MS SQL 2005 (developer's edition) and found it easy to work with (though I haven't figured out how to create new login credentials on it - but that isn't a problem in my present context).  It appears to me that my problem is due to the clients for SQL server being incorporated and hidden somewhere inthe interface of MSVS 2010 from being apparently individual programs I am familiar with using. My employer just bought me a new machine (because my existing workstation was too heavily loaded), and required me to install both MS VS 2005 and MS VS 2010.  As part of my installation of MS VS 2005 on this machine, I installed MS SQL Server 2005 (but had forgotten to install teh corresponding clients).  And then I installed MSVS 2010.  When I noticed the clients I was used to  had not been installed, I went to install them and failed with an error message that a more recent version had been installed.  The old machine is runnign Windows XP and the new one is using Windows 7 Pro, if that matters. The problem is that I can not find the equivalent of Microsoft SQL Server Management Studio in MS VS 2010.  So I am at loss as to where the tools are in VS2010 to create new databases, tables, &c.  More annoyingly, I can not find the

XML for Analysis Parser; The restriction value - sql server 2005 with Excel 2010 error


Trying to refresh an existing pivot table that is connected to Analysis Services Sql Server 2005 database.  My excel 2010  gets the eroor:\

XML for Analysis parser:  The restriction value provided by the consumer either does not match other restrictions or refers to an unknown object.

I already tried the pivot table patch and I am still experiencing the error.  I also tried starting a new excel spreadshsst and connecting to two other sql servers of newer verions and was succesful.

Win Forms from VS 2005 to VS 2010 Problem....


Hello Experts,

                 I'm working with Win forms using Visual Studio 2005 and code behind language is Visual Basic.My current project contains more than 450 forms.We were planning to migrate it from VS 2005 to VS 2010.So, I opened  my project with VS 2010.It had changed from framework 2.0 to framework 4.0. It builds and runs fine.

My Problem is that,

After  running my application . When I open any form it gives me an Exception System.outofmemoryexception...

If I clean my project It works fine...

What will I do for it?????

I'm googling in the internet... I had found lots of article... But no one is works for me...

Thanks in Advance

Import Visual Studio 2005 to 2010



I am updating/extending a site I originally created in Visual Studio 2005. My new site I am starting in 2010. If I select add exiting item to project I notice a number of differences. 

1. CodeFile has been replaced by CodeBehind (without changing this, any code goes in script on the aspx page, not the .cs file. Why?

2. There is a file called filename.designer.cs created with new pages that my imported pages do not have. What is the purpose of this file and is it required and/or how can it be constructed from imported content?

thanks in advance

SQL RS 2005 integrated mode SharePoint 2010

Hello, we have the environment "SQL Server 2005 SP3" and "SharePoint 2010". My question is now: is it basically possible to install the "Reporting Services 2005" in "SharePoint integrated mode" as it was possible with "SharePoint 2007"? Thank you very much for any help. Karsten

Can I install SQL 2008 on a server running SQL 2005 to install Sharepoint 2010 Enterprise (Productio



Sharepoint 2010 Upgrade Question - A customer is currently running sharepoint 2007 on a 64bit windows 2003 OS with SQL 2005 sp2, they are looking to install/upgrade to Sharepoint 2010 and want to use the current SQL server,for the upgrade a new SharePoint 2010 environment will be built and for a short while they will have two instances of SharePoint running SP2007 and SP2010. The plan is to then manually migrate the data from SP2007 to SP2010 (ENT), the web and application servers will be newly built. From research I think they have three options

1) Upgrade the current SQL 2005(SP2) instance to SQL 2008 R2 standard.

2) Install a new instance of SQL 2008 R2 on the same server and have both SQL 2005 & SQL 2008 running on the same server (Is this an option? Will sharepoint happily run from a SQL server running two SQL instances, do I have to be careful regarding the installation and configuration, could I break the existing sharepoint farm doing this?)

3) Upgrade the current SQL server to SP3 and install a new instance of SQL 2005 SP3 and install SharePoint 2010 Enterprise here, again I have all the questions from point 2 above.

We are thinking of trying option 1, then 2, then 3, and obviously only moving to the next option if we come across a show stopper. H

upgrade the license for VS 2005 to VS 2010


Hi All,

i have licensed Microsoft VS 2005 with .Net Framework Version 2.0.50727.

How can i upgrade the  VS 2010 with .Net Framework Version 4.0?


moving from Visual Studio 2005 to visual studio 2010. Will be on MOSS 2007 for next year at least.


Most of my web servers are 64 bit.

At this new shop I don't have any custom visual Studio 2005 compiled workflows or sharePoint solutions.  What I do have is a few DLLs we've deployed manually to the Web front ends in the 12 hive,  And a few low volume non-sharepoint websites I've deployed with the source - because I knew I'd be moving to 2010 very soon.

What's the risk of moving my development client to 2010? Can I have 2005 and 2010 on the same client? Does 2010 have an option for compiling to 2005 compatibility?

What happens if I compile those solutions (as is) in vs 2010 and deploy?  Does something special need to be installed in SharePoint or my web servers to support VS2010 compiled solutions?

BTW, how smooth is the 2005 to 2005 code coversion (if any) process. Can I open 2005 projects/solutions in 2010?




Updating the AJAX Control Toolkit from VS 2005 to either VS 2008 or VS 2010


At work we've got a ASP.NET app written using VS 2005.  At the time I downloaded and installed the AJAX Control Toolkit from off of this website.  We've been using it ever since, in that website.

Now I'd like to upgrade that website to either VS 2008 or VS 2010, but I'm concerned about the AJAX Control Toolkit.  If memory serves, I think that it came with VS 2008, and I would assume it certainly is a part of VS 2010.  Do I have to remove any reference to the AJAX Control Toolkit, before trying to upgrade it?  Or after upgrading it?  How do I make it reference the AJAX Control Toolkit that's a part of VS 2008/VS 2010?

Visual Studio 2008 Framework 3.5 Project Referencing DLL built in Visual Studio 2010 Framwork 4


I am trying to add a DLL file that was compiled in Visual Studio 2010 with Framework 4 to my project that is in Visual Studio 2008(Framework 3.5), but I am getting a warning after I have added the reference that says "The referenced component 'dll name' could not be found." What is causing VS2008 give this warning? I can not compile the code as this DLL is a required component. Thank you.



Need advice on updating SQL Server 2005 Build 09.00.4035 to Build 09.00.4220 for SharePoint 2010


Hello SQL Server specialists,


Please give me some advice on updating my SQL 2005 Server Build 09.00.4035 to Build 09.00.4220 (Cumulative update 3 ) for SharePoint 2010.

I'm stuck with the following questions:

Will I need to install previous cumulative updates in order to install cumulative update 3?

Has anyone installed SharePoint 2010 on an SQL 2005 Server before, any things I should consider when doing this?

Build 09.00.4220 (Cumulative update 3 ) is the minimum build needed to install SharePoint 2010 is it ok to run with the minimum build or would you recommend me to update to another build ?

I'm looking forward for your advice!


Kind Regards,


Web Application Deployment with Visual Studio 2010 and SQL Server 2005?



Is it possible to do a web application deployment(create package/publish sql & package/publish web) with Visual Studio 2010 and SQL Server 2005?

I'm trying my  hand at this new feature - I have an application created in VS2010 and the backend is SQL Server 2005

I read on msdn that the pre-requisites for the database part of the web application deployment is SQL Server Express 2008 or later versions for the tutorial they posted...Is that mandatory for any deployments??

Thanks for your help! Smile


Referencing SQL Server 2008 R2 SMO from Visual Studio 2010


Hello.  We read a number of things about referencing SQL Server SMO from Visual Studio but still don't have the definite answers we need.  So, here it goes...

A number of years ago we created a C# application using Visual Studio 2005 and SQL Server 2005.  In that application, we added .NET references to a number of SQL Server SMO objects, and everything worked fine.  Those references were:

Microsoft.SqlServer.ConnectionInfo    GAC
Microsoft.SqlServer.Smo            GAC
Microsoft.SqlServer.SqlEnum        GAC

We have now migrated to Visual Studio 2010 and SQL Server 2008 R2.  However, when we try to reference those same SMO objects for SQL Server 2008 R2, they don't appear in the .NET references tab.  We're wanting to reference the SQL Server 2008 R2 version of those same SMO assemblies for our upgraded C# application.

On our development machines, we have SQL Server 2008 R2 Developer installed with all options, including the SDK such that the assemblies are found in C:\Program Files (x86)\Microsoft SQL Server\100\SDK\Assemblies.

So, my first questions are: Are we supposed to do file references to the SMO assemblies instead

installing SQL Server 2005 on Windows 7 with Visual Studio 2010 already installed



Last year I had Vista on machine with Visual Studio 2008 and SQL Server 2005 running fine. Last week I decided to wipe the hard disk, install Windows 7 and make the move to Visual Studio 2010. I still need SQL Server 2005 to be able to test code for clients using this.

Anyway, Visual Studio 2010 Professional went on OK. This installed SQL Server 2008 Epxress.

I then try to install SQL Server 2005. I know that there is a compatibility problem, so following advice from other sources, I want to install it without running the server, then install SQL Server 2005 SP3. Then I should be up and running.


The problem is that even though I make sure the 'Start SQL Server' check box is UNchecked, part way through the installation it throws up an error saying it can't start the server and this part of the installation is unrolled.

I've tried running 'setup.exe SKUUPGRAGE=1' which gets rid of the only warning I was getting up to this point, but the setup seems to insist on running the server even though I tell it not to. So I don't get a chance to run SP3 on it.


I wonder if the problem is that SQL Server 2008 Epxress is already installed but can't see an easy way of uninstalling it. It doesn't appear as an uninstall option using the Visual Studio 2010 disk and if I look at uninstall programs I get the f

VS 2005 web deployment projects in TF build 2010


We have a VS 2005 web deployment project that builds fine in TF 2005 producing a fully precompiled web site.

We have migrated the project to VS 2010 and created a TF 2010 build based on the upgrade template to carry out our existing 2005 build script.

We have downloaded and installed the 2010 Web Deployment Projects RTW (http://www.microsoft.com/downloads/en/details.aspx?FamilyID=89f2c4f5-5d3a-49b6-bcad-f776c6edfa63&displaylang=en) on the build server.

However, the web deploy project does not build in the team build.

Any help would be much appreciated.

ASP.NET, HTML, JavaScript Snippet Support (VS 2010 and .NET 4.0 Series)

This post covers another useful improvement in VS 2010 - HTML/ASP.NET/JavaScript snippet support. Snippets allow you to be more productive within source view by allowing you to create chunks of code and markup that you can quickly apply and use in your application with a minimum of character typing.

Visual Studio has supported the concept of "snippets" for VB and C# in previous releases - but not for HTML, ASP.NET markup and JavaScript. With VS 2010 we now support snippets for these content types as well.
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend