Error deploying Microsoft System CLR Types per SQL Server witch ClickOnce - sql-server

I'm trying to deploy an application that uses Microsoft ReportViewer 2012 that needs Microsoft® System CLR Types per SQL Server 2012 in order to work but I can't get to install it with ClickOnce.
I checked them in project's prerequisites but it seems they cannot be found
(I checked download from the web).
even if they're present in
C:\Program Files (x86)\Microsoft SDKs\ClickOnce Bootstrapper\Packages
When I deploy my setup installation fail because it can't download SqlClrTypes. If I install them using the same msi manually it works ok.
What can I do to make them install via ClickOnce ?
I'm using Visual Studio 2017, tried 2019 but the same thing happen.
EDIT: Fixed the issue with the prerequisites, my product.xml was referring to the wrong version for some reason. Now the setup is created without issue but when I try the installation it fails when downloading the msi. From the install.log it tries to download it from : http://go.microsoft.com/fwlink/?LinkID=221258

Related

How to build old Silverlight project in Azure DevOps?

We have an old Silverlight project that we have to maintain while a modern replacement is developed.
For build and publication, we use Azure DevOps.
The problem arose after Windows 2019 and 2022 remained in the available images of Azure DevOps. With versions of VS with which the project with Silverlight stopped building.
Visual Studio Enterprise 2019 16.11.32901.82
Visual Studio Enterprise 2022 17.3.32901.215
2022-09-10T14:26:05.9397408Z ##[error]abcWebSilverlight\abcWebSilverlight.csproj(1056,11): Error MSB4226: The imported project "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Microsoft\Silverlight\v5.0\Microsoft.Silverlight.CSharp.targets" was not found. Also, tried to find "Microsoft\Silverlight\v5.0\Microsoft.Silverlight.CSharp.targets" in the fallback search path(s) for $(MSBuildExtensionsPath32) - "C:\Program Files (x86)\MSBuild" . These search paths are defined in "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\msbuild.exe.Config". Confirm that the path in the <Import> declaration is correct, and that the file exists on disk in one of the search paths.
Now, to solve the problem with the building, I see two possible ways:
Somehow install the necessary VS version.
I've googled all over the internet but can't find how to do it.
In the Build task, I set the desired version and the build jumps to the available version of the studio because others are not installed in the system.
Dirty hack. Try to somehow install the extension https://marketplace.visualstudio.com/items?itemName=RamiAbughazaleh.SilverlightProjectSystem&ssr=false#qna in the hope that the project will work.
But then again, in Azure DevOps, I don't see a tool that allows me to do this.
I would appreciate any advice on a possible solution to my problem.
Thank you.
You cannot use Visual Studio 2017 or later to build old Silverlight (v4 or v5) projects - you have to continue using Visual Studio 2015.
Source: https://learn.microsoft.com/en-us/visualstudio/releases/2017/vs2017-compatibility-vs
Silverlight projects are not supported in this version of Visual Studio. To maintain Silverlight applications, continue to use Visual Studio 2015.
In Azure DevOps, the only way to get this to work is to setup your own instance of Windows with VS2015 (or the VS2015 build tools) installed and then also install the Azure DevOps self-hosted pipeline agent (for building: https://learn.microsoft.com/en-us/azure/devops/pipelines/agents/agents?view=azure-devops&tabs=browser#install)
The instance can be either on-premises or cloud-hosted (either Azure or even an AWS VM instance) and will work so long as it can access the internet to communicate with Azure DevOps (configuration is a bit different if you're using DevOps Server).

Microsoft SQL Server Management Studio error at startup

I get this error when I try to run Microsoft SQL Server Management Studio:
The application has failed to start because its side-by-side configuration is incorrect. Please see the application event log or use the command-line sxstrace.exe tool for more detail.
SxSTrace detail:
1, 2
What I did for solving the problem:
reinstalled SQL Server
reinstalled Microsoft SQL Server Management Studio
updated at recent version of .NET Framework
reinstalled Visual C++ Redistributable
And I still get that same error.
What should I do?
you should install an earlier version. I had the same error and I installed version 18.5 and it worked just fine.
https://learn.microsoft.com/pt-br/sql/ssms/release-notes-ssms?view=sql-server-ver15#185
I had the same error with version 18.9.2. I don't know if it's related to the problem, but I firstly installed SSMS in Program Files and not in Program Files (x86).
First I have tried to repair the installation, with no success.
Then I have uninstalled SSMS, rebooted by PC, re-installed SSMS (this time in the default Program Files (x86) folder) and rebooted my PC again.
After these steps, I was able to start SSMS without errors.
I did the following to solve this error.
Copied all the files and folders from the folder C:\Program Files (x86)\Microsoft SQL Server Management Studio 18\ from a working machine and pasted on the server which was having issue.
Once the copying was completed, I it started appearing in Add or remove programs # control panel.
Post copy SSMS started working normally.
I removed the following Sql related ones from the control panel.
Then i followed these steps
https://stackoverflow.com/a/66085979/16391774
I reinstalled the same version (at present latest version v18.12.1 and i used it version) and my problem was solved.
Uninstalling did not work.
Upgrading (Installing newer version or same version) did not work.
What worked:
delete or rename “C:\Program Files (x86)\Microsoft SQL Server Management Studio 18”
delete registry manually or via .reg file
reg DELETE “HKLM\SOFTWARE\WOW6432Node\Microsoft\Microsoft SQL Server Management Studio” /reg:32)
Afterwards, installing SSMS worked without a flaw and it started.
Found at https://social.msdn.microsoft.com/forums/en-US/7ab37d2b-6bac-4221-b827-d274b00b9a56/ssms-18-how-to-uninstall?forum=sqlkjmanageability&prof=required, similar to https://superuser.com/a/1440276/146668 .

Windows Installer 4.5 Doesn't appear in the prerequisites component list

From Prerequisites on the setup property pages, I selected the option to Download prerequisites from the component vendor's web site
There is no Windows Installer 4.5 in the prerequisites to install option..
because every im installing my setup using the sqlexpr_x64_ENU.exe in custom actions to install, run the setup after the extracting sqlserver it pops up the window says
There is a problem with this Windows Installer package. Aprogram run as part of the setup did not finnish as expected. Contact your support personnel or package vendor
im using VS2017 on windows 10
Exclude MSI Engine: You should not include Windows Installer 4.5 with any package these days. This runtime is from back in the day of Windows Vista - we are long since on version 5. Windows Installer should be deployed only via Windows Update as of today - in my opinion. Leave the runtime out of your setup.
No Concurrency: You can not run an MSI setup from within another MSI setup via a custom action. This is due to technical restrictions. There is a mutex set when an MSI runs its actual installation sequence, and triggering another installation sequence from within it will fail. A similar answer on the topic.
Setup.exe Launcher: What you need is to install your pre-requisites via a setup.exe launcher instead. This runs installations in serial, not in parallel. Which version of SQL Server are you installing? I see only a couple of versions available in the Visual Studio Installer Project launcher.
Other tools have features to allow you to install a setup.exe with embedded packages of various kinds in sequence. I have explained a myriad of times how to do this in previous answers. Here are just a few that I found quickly:
SQL Server named instance with Visual Studio 2017 Installer project (basically exactly the same issue - I suggest WiX the open source, free alternative)
Custom installer for application in Visual Studio 2017 (I suggest WiX and several commercial tools that are easier to use - maybe try to read this one)
Cannot call command.exe(SQL Server Setup.exe) while calling C# CA with parameters
How to create a MSI file which simply copies a directory to Program Files? (tools list)
Combine exe and msi file in one installer
Visual Studio 2017 Installer Project - include VC++ 2015 Redistributable
The general situation:
The problem is not Windows Installer 4.5, it's the fact that you are trying to do a recursive MSI install (the SQL one from inside yours) which is not allowed and will fail.
The MSI 4.5 engine is pretty much obsolete, about 10 years old, and anyway it's not the issue, and it's not clear why you believe it is. But it IS in the Prerequisite list on my VS 2017 setup project prerequisites - see 3 - even though you almost certainly don't need it.
There are some SQL Express options available in the Prerequisites of the VS setup project - right click the project in solution explorer and choose Properties, then Prerequisites.

SQL Server Management Studio (SSMS) 2014 System.EnterpriseServices.Wrapper.dll Error

SSMS 2014 SP1 recently started throwing an error around a mismatch of the System.EnterpriseServices.Wrapper.dll when trying to connect to any database.
I had recently installed LinqPad 5 which required installing.Net 4.6.
Trying to repair SSMS did not fix the issue. Various resources online, suggesting updating the GAC and C:\Windows\winsxs\x86_System.EnterpriseServices_b03f5f7f11d50a3a_2.0.0.0_x-ww_7d5f3790 assemblies from the .Net 2.0 folder and the also did not fix the issue.
This was my solution to get my dev environment back to working as normal. Obviously it isn't ideal, so if anyone has a better solution, please share.
As an interim measure:
Uninstall .Net 4.6 from Add/Remove Programs
Reinstall .Net 4.5.1
from: https://msdn.microsoft.com/en-us/vstudio/hh487283.aspx
Restart SSMS, possibly you may need to restart your computer
If you subsequently recieve an error in Visual Studio:
Open the VS developer command prompt (C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools\Shortcuts for Visual Studio 2013)
Run devenv /setup
Alternatively you could run a repair from the VS installer
I believe this is because .Net 4.6 overwrites the files in the C:\Windows\Microsoft.NET\Framework\v4.0.30319 folder, as .Net 4.x all share this folder, SSMS doesn't seem to be able to handle the updgrade. .Net 2.0 uses a different folder, hence why alot of the solutions around presumably didn't help.

SQL Server Compact error: Unable to load DLL 'sqlceme35.dll'. The specified module could not be found

I'm developing a Windows Forms application using Visual Studio 2008 C# that uses an SQL Server Compact 3.5 database on the client. The client will most likely be 32 bit Windows XP or Windows Vista machines. I'm using a standard Windows Installer project that creates an MSI file and setup.exe to install the application on a client machine. I'm new to SQL Server Compact, so I haven't had to distribute a client database like this before now. When I run the setup.exe (on new Windows XP 32 bit with SP2 and Internet Explorer 7) it installs fine, but when I run the application I get this error:
Unable to load DLL 'sqlceme35.dll'. The specified module could not be found
I spent a few hours searching for this error already, but all I could find were issues relating to installing on 64 bit Windows and none relating to normal 32 bit that I'm using.
The install application copies the all the dependent files that it found into the specified install directory, including the System.Data.SqlServerCe.dll file (assembly version 3.5.1.0). The database file is in a directory called 'data' off the application directory, and the connection string for it is
<add name="Tickets.ieOutlet.Properties.Settings.TicketsLocalConnectionString" connectionString="Data Source=|DataDirectory|\data\TicketsLocal.sdf" providerName="Microsoft.SqlServerCe.Client.3.5" />
Some questions I have:
Should the application be able to find the DLL file if it's in the same directory, that is, local to the application, or do I need to install it in the GAC? (If so, can I use the Windows Installer to install a DLL file in the GAC?)
Is there anything else I need to distribute with the application in order to use a SQL Server Compact database?
There are other DLL files also, such as MS interop for exporting data to Excel on the client. Do these need to be installed in the GAC or will locating them in the application directory suffice?
You don't need it to be in the GAC for SQL Server Compact to run, and it will pick them up from the application directory. There are several ways to deploy an SQL Server Compact project. The two main ways are:
Deploying the SQL Server Compact redistributable installer with your project, but this way is painful and also can be unistalled by the end user, or upgraded by Windows updates and breaking your application.
Including the DLL files in your application folder. Depending on the features of SQL Server Compact you are using (replication or whatever), there is a handful of DLL files to deploy in your application folder.
If you have SQL Server Compact installed on your machine, they are most likely located at "C:\Program Files\Microsoft SQL Server Compact Edition\v3.5". They can be added to the project in Visual Studio and then set their project output type to "copy always". And the main reference to System.Data.SqlServerCe that you have in your project references should have copy local set to true.
sqlceca35.dll
sqlcecompact35.dll
sqlceer35en.dll
sqlceoledb35.dll
sqlceqp35.dll
sqlcese35.dll
If you have these all set, then in your installer project all you have to include is the project output of this project and you're good. In my opinion this is the only way to go. It is a simple deployment, of a couple of files and you are in control of what DLL versions your application uses.
I hope that helps.
I had a similar problem, a Visual Studio 2008 Windows application targeting 32-bit Windows XP and Windows Vista that used SQL Server Compact 3.5 SP1 - that then got this error when installed on 64-bit Windows 7:
Unable to load DLL 'sqlceme35.dll'. The specified module could not be found
I was embedding an MSI for SQL Server Compact into the installer for the application.
Following this rather confused discussion on MSDN revealed that I needed to use the 64-bit MSI for SQL Server Compact on 64-bit machines. D'oh! That is, from page Microsoft SQL Server Compact 3.5 Service Pack 1 and Synchronization Services for ADO.NET version 1.0 Service Pack 1 for Windows Desktop I needed SSCERuntime-ENU-x64.msi rather than SSCERuntime-ENU-x86.msi for 64-bit machines.
How to: Deploy a SQL Server Compact Edition Database with an Application should help, at least with your first two questions.
In general, I think you should not install anything in the GAC for a single application.
The following provide a solution to the problem and an explanation also.
Troubleshooting: Can’t load SQL Server Compact DLL
SqlCeException on application's first use of SQL Server Compact
Laxmi Narsimha Rao Oruganti 's blog
I hope this helps.

Resources