Problems setting the ServiceName of a Windows Service - service

I have created a Windows Service via Visual Studio 2019.
The Visual Studio project's solution is (for the purposes of this question):
ProductSyncService
So it was no surprise to find that the name displayed in Services.msc was this.
I would like to change it to:
Product Sync Service
I first set the Service Name property of serviceInstaller1, but that didn't work:
so I then tried setting it via the code as well (belt & braces), but that is not working either:
Despite doing a 'Clean' and then a rebuild and a re-install, Services.msc still shows it with the concatenated name.
I should add that I'm using Advanced Installer to create the MSI and that it has no references to the concatenated name.

I eventually found that there is indeed ServiceName property within Advanced Installer that was overriding the values in my Visual Studio project.
Easy to change and it's working fine now.

Related

Maui Blazor Hybrid - Cannot double click on the exe in the bin folder

I recently installed the preview version of visual studio and created a new .net maui blazor hybrid app.
When debugging the app, a window shows up and everything works just as expected.
However when i go to the bin folder and run the exe that is located there the window does not come up.
In the windows event logs i can see the following:
Exception Info: System.DllNotFoundException: Unable to load DLL 'Microsoft.ui.xaml.dll' or one of its dependencies
And indeed that dll is missing from the bin folder.
What does visual studio do to make this work? How can i just run the exe?
Right now we only support so-called “packaged” apps. Those you need to publish to an MSIX and install in order to run.
We’re working on adding the unpackaged scenario as well, you can track that here: https://github.com/dotnet/maui/issues/3166
While searching for the above issue I noticed a couple of others ones though. According to this and this it might already be possible right now, you might want to try!

Cannot read property 'length' of undefined visual studio code

why i can´t acces to the config using sftp v 1.1.2 on visual studio code v 1.21.0?
I´m using visual studio code with a connection to a virtual machine with ubuntu server. i have downloaded the latest version fo sftp, and when i tried to use the config it shows this message [sftp] Cannot read property 'length' of undefined.
I had this problem as well when I started a new window/project for the sole purpose of an SFTP setup, even though it seemed to work fine on a pre-existing project (which is not where I wanted it). I discovered that if you add a folder to the new project first, it works as expected. I believe this is because the plugin needs a place to store the configuration, and if there is not a folder the plugin doesn't have a place to store it.

Update Target Button is disabled in Sql Server Database Schema Comparison

I use Visual Studio 2013 Professional Update 4 in combination with multiple SQL Server 2012 Enterprise servers/instances. The Idea was to create a Version controlled deployment using a Visual Studio Solution with SQL Server Projects.
However for some reason the "Update Target" and "Generate Script" button is disabled.
I can update the local database project from the sql server database but the other way around is not working. (see screenshot)
Google is not helpful at all although I found a few people with a similar problem.
Update target button is disabled after schema comparison
VS2012: Schema compare, update button disabled
VS2012 Schema compare buttons disabled
But none of this questions/blogposts is about Visual Studio 2013 and in addition none of the proposed solutions is working for me.
Question: Why is the Update Target button disabled and what do I have to change to fix this?
Note: Of course, I'm using the latest version of SQL Server Data Tools(12.0.50318.0)
This was driving me nuts, as well. I finally noticed a "warning" message stating "Cannot generate deployment plan due to an internal error". Because of this, the Update and Generate Script buttons were both disabled.
I resolved this by closing Visual Studio, navigating to the folder containing the Database project and removing all (*.dbmdl) files. I then restarted Visual Studio, re-ran the compare schema and the Update button was enabled.
The tip that helped me was to look at the error list. (View Menu, Error List). Once I cleared the errors (just the errors, the ones with the red X) I was able to compare the schema again and the Update and Generate Scripts buttons were both enabled.
Beside the generate script, click on OPTIONS and select only the objects for which you want to compare.
This and ONLY this worked for me.

Error when opening Word document that was created by VSTO Template

I have created a new Visual Studio Word 2010 Template project, now I want to deploy it using a Windows Installer setup.
I followed this tutorial using Visual Studio 2012 with InstallShield 2013LE.
After installing the setup and opening the Word Template, it seems to work fine. However, after saving the template as *.dotx-document and opening it again the Installing Office customization dialog appears.
The message says There was an error during installation: Downloading file file:///[Path to the dotx file]/WordTemplate.vsto did not succeed.
To check whether I've made an error creating the setup and registry entries, I also tried Advanced Installer 10.9 Office Add-In setup, that creates the required entries automatically. It also fails with the same error message.
There is nothing special about the VSTO Addin. I started a new project for testing purposes, that adds a ribbon and a header to the Word Template file.
Finally I tried the built in Click-Once installer, with success, newly created documents can be opened without any exception. But it comes with some limitations. I would like to add some files and let the user choose the installation path, what doesn't seem possible.
So what am I missing to deploy my VSTO AddIn?
I believe that such a problem is coming from proxy server issues. The proxy server on the client machine is blocking the download of your vsto file that is considered as an executable file.Unfortunately the only solution I see was stipulated in an old post proposing to zip your installer and to send it to users ( which is not optimal, I must agree).
You must also run a command to clear the app cache any time you deploy (from your windows console):
rundll32 dfshim CleanOnlineAppCache
Hope that helps !

Creating single installer for a multiple MSI's?

I have three different MSI's created to deploy my project. My end result is to run a single exe that will call the rest three MSI's, with the current running installation description or name. As same as we see while Visual Studio Installation.
I have tried WIX but didn't come up with anything. Please guide.
Environment - Visual Studio 2008 / 2010 with Win 7
You're looking for a bootstrapper (sometimes called a chainer). There are many available, including open-source ones like DotNetInstaller and WiX's Burn.
You could create one MSI and combine all you project's primary outputs. If you need to separate them just add a folder for each project's primary outputs.