Get Visual Studio to deploy dbnetlib.dll on Windows CE - visual-studio

I'm developing a device application, using a connection with a 'regular' Sql Server 2005 (not a Compact DB). Whenever I try to open SqlConnection on Windows CE (a Datalogic Memor CE), I’m getting a MissingMethodException: Can't find PInvoke DLL 'dbnetlib.dll'..
This seems to be a deployment issue. In my project I include:
C:\Program Files (x86)\Microsoft SQL Server Compact Edition\v3.5\Devices\Client\System.Data.SqlClient.dll
The file System.Data.SqlClient.dll does get deployed to my application directory, but there is no sign of dbnetlib.dll.
When I Google this Exception, I mainly get these suggestions:
This is a Microsoft bug, when Visual Studio 2005 and 2008 are installed. Resolve by (re)installing 'SQL Server Compact 3.5 Design Tools' http://support.microsoft.com/kb/945371.
I have Visual Studio 2008 and 2010 - AFAIK 2005 was never on my system. I tried un- and re-installing the SQL Server Compact 3.5 Design Tools (\WCU\SSCE\SSCEVSTools-enu.msi)
Edit: Since the Devices\Client-directory is installed by 'SQL Server Compact 3.5 for Windows Mobile' (SSCEDeviceRuntime-ENU.msi), I downloaded and also tried un- and re-installing the base version, SP1 and SP2, but there was still no deployment-difference.
Another suggestion is to install the SQL Client separately using a (platform-dependent) .cab (like sql.wce5.armv4i.CAB) and this dbnetlib.dll copied from e.g. C:\Program Files (x86)\Microsoft SQL Server Compact Edition\v3.5\Devices\Client\wce500\armv4i to a persistent start-up directory (like \Backup\Startup on this Datalogic).
Without trying, I think this might even be limited to including this platform-dependent dbnetlib.dll, since System.Data.SqlClient.dll does get deployed.
But this seems more like a a work around to me, deployment should take care of this. Drawback of this work around seems:
an install is executed at each cold boot (and maybe even at a warm boot)
adding (more) platform (and version) dependency to my project by explicitly defining the .cab
The question is: do you know a solution for Visual Studio to deploy correctly?
Another question might be: do you have an opinion about this work around?
(BTW: the DB-connection works fine on a Datalogic Memor WM (Windows Mobile), so I guess the appropriate .NET-library is already installed on that device.)

Visual Studio generally does a good job of working out what to deploy, but it isn't fullproof. For example if the DLL is linked dynamically then it has no way of knowing that it is required and won't deploy it: it also routinely and silently fails to deploy files to the Windows directory.
I would recommend that you manually deploy the file during development. I generally prefer to do this anyway to make sure I know what has been deployed (the joy of batch files...).

Related

Cannot Import DTSX files back into SQL Server 2008r2 Int Services after export and edit in VSPro2013

I've carried out a lot of work here and want to be able to use my DTSX packages
But I get the version incompatibility and the Error message is specific
But there must be some way I can run my packages. They appear to not be able to be run from within VS2013 Pro editor
My question is, what do I need to install exactly to all allow me to execute these saved packages?
By asking here i can save time since there are many versions and many add ons etc
First - how to run a SSIS 2008 package?
There is a good overview here, by Ashish Kumar Mehta of MSSQTips, on how to execute packages both remotely on the server or locally. Either way you need the SQL Server Client Tools installed from the SQL Server media (CD, image, etc.). There's no possibility of running a package locally from Management Studio or raw Visual Studio. You can run the package remotely through Management Studio only if that package was stored within the SQL Server. Theoretically, you can run a package in development mode via VS2013, see below.
Second - how to modify a SSIS 2008 package?
Unlike subsequent SQL Server (and SSIS) versions, with 2008 you couldn't just use your regular Visual Studio with a downloadable plugin. You had to install one Business Intelligence Development Studio (BIDS), a Visual Studio 2008 derivative (i.e. not a plugin) available on your SQL Server media. That's the way to go if you want to edit the package but also maintain its 2008 version. Otherwise, you're free to upgrade the package to Integration Services 2014 level by several methods, and start hacking at it via Visual Studio 2013 with a downloadable Data Tools - Business Intelligence plug-in. Be advised, it's not possible to convert the package back to 2012 nor 2008 versions.

Is Visual Studio Required to run Coded UI tests on a build server?

I have references to
using Microsoft.VisualStudio.TestTools.UITest.Extension;
using Microsoft.VisualStudio.TestTools.UITesting;
But I'm building on a server without Visual Studio installed.
My builds are failing because these dlls can't be found (their path is in the VS install directory on my local machine)
Does this mean VS is required to run these on the build server? Or can I just copy the dlls into some project folder and add them as references?
The recommended approach is to install VS on the build server and the licensing is such that you are able to do that. The team know that this is not an ideal solution but it's the only one we have today. Note that the build server images provided by Microsoft in the hosted environment (tfs.visualstudio.com) have VS2012 and VS2010 installed into them for exactly this type of reason.

Creating a standalone .exe for a windows application in visual studio 2008?

I have created a windows based application in C# using visual studio 2008 which basically scans for the registry and then fixes the resulting errors. Now using the msi installer i have made a setup and it works fine. However i have met with a new requirement.
Usually after providing the setup to the user/client has to install the setup and when installed, in the installed folder there are lots of .dlls that i had used to create the project. But my requirememt is to create a single standalone .exe using which i wouldnt have to provide my users with the setup file. All i need to do is that using this single .exe file my whole project should execute and perform the same process of scanning and fixing the registry.
I also tried "ClickOnce Deployment in .NET Framework 2.0" and got the error "ClickOnce does not support the request execution level 'requireAdministrator'". and also have gone through the link
"ClickOnce does not support the request execution level 'requireAdministrator.'"
But still i feel that i would be comfortable if i can get a single standalone exe which can execute my windows forms application.
Is there any way to do it?
Any hint with this thing will be really helpful to me.
Thanks in advance
~Viknesh

What's the minimum set of tools I need to open Windows Azure samples shipped by Microsoft?

I wanted to try open "Hello World" from here. I already had Visual Studio 2010 installed. I went here and downloaded WindowsAzureSDK-x86.exe and installed the SDK.
Yet when I double click the .sln in the sample Visual Studio opens the .csproj (the project with web role) just fine but complains it can't open the .ccproj file because its project type is not supported by this version of the application.
What else do I have to install so that I can open that .ccproj project file?
You need the Windows Azure SDK+tools. The easiest way to do this is to visit here and select "Get Tools and SDK." This will fire up the Web Platform Installer, which should do a much better job of setting up your environment.
A few more things: You'll need SQL Express (or SQL Server) installed as well. I "think" the Web Platform Installer will take care of that for you, but I'm not 100% sure. Also, you'll need to run Visual Studio as Administrator, to allow it to properly interact with the local Windows Azure simulator.
Turns out I needed to also install the thing called "VSCloudService.exe" on the same page. Once I installed it .ccproj files open just fine.

TFS 2010 Build - Do I need to install Visual Studio 2010 on TFS 2010 Build Server

I have the following error on the build server for code that compiles and passes tests fine locally.
(150): The imported project
"C:\Program
Files\MSBuild\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets"
was not found. Confirm that the path
in the declaration is
correct, and that the file exists on
disk.
I've added the WebApplications folder from my local machine to the appropriate path on the build server but I'm still getting the same error on build.
I believe the recommended approach with TFS2008 was to install VS2008 in it's entirety on the build server. Is this still the case with TFS2010 and VS2010 accordingly? a.k.a Sledgehammer to crack a nut.
Pretty much, especially if you plan on using other features like MSTest. You can try just adding the targets file but you'll probably still have some missing dependencies. You could go through the whole process of fixing the dependencies as you go along but it's probably easier just to install VS 2010 and be done with it.
This blog post seems to describe a way to do what you want without having to install additional software on the build server, if all you need is the .net compilers. It does not cover C++ compiler setup.
I discovered that if you're going to do just "standard" (i realize that's open to interpretation) web apps and non-web apps (e.g. services), you can get away with installing just Visual Studio 2010 Shell, plus Visual Studio 2010 SP1 on the build server. That will get you the missing .targets files.
Since a full VS install is required for advanced features, does anyone know if the build-server-install license cost is waived?

Resources