How to build old Silverlight project in Azure DevOps? - silverlight

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).

Related

How do I open a DTSX file in Visual Studio 2019?

How do I open a DTSX file for editing using Visual Studio 2019?
I have generated a DTSX file by using the Import Data wizard found in SQL Server Management Studio, using the same process outlined in this question. The answer to that question explains how to edit a .dtsx file, but it does not appear to be correct anymore. I am using Visual Studio 2019. The answer says I need to use this link to download SQL Server Data Tools for Visual Studio:
Download and install SQL Server Data Tools (SSDT) for Visual Studio
But at that link, it says:
Changes in SSDT for Visual Studio 2019
With Visual Studio 2019, the required functionality to enable Analysis Services,
Integration Services, and Reporting Services projects has moved into the
respective Visual Studio extensions. The core SSDT functionality to
create Database Projects has remained integral to Visual Studio (you
need to select the Data storage, and processing workload during
install). There's no more standalone SSDT installation required.
If you already have a license to Visual Studio 2019:
For SQL Database Projects, install the Data storage and Processing
workload for Visual Studio
For Analysis Services, Integration Services
or Reporting Services projects, install the appropriate extension(s)
from the marketplace
I believe I need Integration Services, but it doesn't have a link to the appropriate extension in the marketplace. Through various googling paths1, everything keeps pointing back to the SQL Server Integration Services Projects extension. I have installed this extension2, but I am still unable to open DSTX files.
Here's how I'm attempting to do it: In Visual Studio, am going to File|Open Project. Then I browse to the folder with the .dtsx file in it, change the filter to *.* (because .dtsx isn't in the list of supported project extensions), choose the file, and click Open. I get this message box:
So, my question again: How do I open a DSTX file from Visual Studio 2019?
See below for detailed versions and installed extensions.
1 For example, see Lesson 1-1: Create a new Integration Services project, where they create a DSTX project. The lesson's Prerequistes instructs you to install the SQL Server Data Tools from Download SQL Server Data Tools, which is the same link from above.
2 I note that version 3.1 of the extension is currently labeled a Preview and that release notes for this version includes the text, "This is the second preview release. We do not recommend using it for production." But I do not see where I am able to download an earlier version of this extension, either from the marketplace website or from in Visual Studio. I would try the latest production release if I could find it, but it doesn't seem to be available.
I also see there are two notes about issues with this preview release. Neither seem relevant to my situation. The first is a regression in VS 16.2 where they recommend upgrading to 16.2.3. I am already on 16.2.4. The second is an issue where the extension and/or Visual Studio Tools for Applications 2019 might be deleted during a VS instance upgrade. I have not done any upgrades to VS since installing this extension.
Installed Software
Visual Studio 2019, version 16.2.4
SQL Server Management Studio, version 17.9.1.
In Visual Studio, when I go to Help|About Microsoft Visual Studio, I also see the following listed in Installed Products (this list is not complete; it includes only the items that seemed relevant):
SQL Server Data Tools 16.0.61906.28070
SQL Server Integration Services 15.0.1301.433
In Visual Studio, when I go to Extensions|Manage Extensions, I see SQL Server Integration Services Projects in the list of installed extensions.
The error message indicates you are trying to open a project/solution. DTSX is a package.
You first need to open the .sln or .proj file. Within the project (solution explorer) you can open the dtsx. Do not try to open the dtsx file from the source control explorer as that does not open with the project references.
In summary, open the solution/project, then open the package from the solution explorer.
To edit and create integration services packages (.dtsx) is necessary to install SQL Server Integration Services Projects.
After installation Visual Studio 2019 can create or edit integration packages either independently (open file) or in Integration Services Project. It is also possible to open packages on SQL server even when SSMS fails with message:
Connecting to the Integration Services service on the computer "xxxx" failed with the following error: "Access is denied."
You will have to install SSMS, SSAS from VS Extensions> (In VS Menu, click "Extensions" and then "Manage Extensions

Error deploying Microsoft System CLR Types per SQL Server witch ClickOnce

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

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.

SSDT 2013 new database Project missing

This might be a trivial error in my setup but I cannot seem to find where I went wrong in stalling SSDT 2013 with SQl Server and having the open to create a new database template
please see image
what I expect to be in the list in a sql template with the option to create a new database project
could someone tell me what i'm missing ?
Thanks in advance
For database projects you'll need to install a version of Visual Studio that supports it - in your case it looks like you ran the standalone SSDT-BI installer which installs SSIS, SSAS and SSRS templates. This doesn't include database project templates. What you need is to install one of the VS versions with support - there are 2 Express versions (Express for Web and Express for Windows Desktop) and 3 paid versions (Premium, Pro, Ultimate). Here is a quote from the SSDT blog post explaining this:
Visual Studio 2013 - VS 2013 now has SQL Server tooling built in and shipped as part of the core product. Database Projects, SQL tools (such as schema compare & data compare), and the online experiences through SSOX are all included with the RTM version. We have full project and SSOX support in VS Express for Web and Express for Windows Desktop, so we have discontinued our stand-alone integrated shell offering. We have a component update feed that will use VS Update to push notification to users. To manually check for updates, go to the Tools > Extensions and Updates... menu to open the dialog. We will continue to post announcements on our blog and forum that a release is available and what is included in that update.
What version of Visual Studio 2013 are you using? You need to have either the Ultimate, Premium or Pro version for SSDT (Link).
If you do have the right version of Visual Studio then you may need to re-run the installer and opt in to SQL Server Data Tools during setup.
I had this issue and resolved it several years ago. I needed to reinstall SSMS with Data Tools. Unfortunately I am encountering the same issue now, but luckily I had documented the issue at the time. I am finding that because there are newer versions of both VS and SSMS, it is hard to find the proper downloads.
From my documentation (3 years ago) None of the attempts to correct the Visual Studio install directly (SSDTBI_x86_ENU download from Microsoft) were successful, but once we did a complete reinstall of SQL Server 2014 which included the Data Tools, the needed template was available in the Add New Project dialog, and the previously incompatible projects found in GitHub******Report.sln were now compatible.

Resources