We have an application made in C# with Visual Studio. The installer of this application is made with Publish of Visual Studio.
If the app is already installed on a PC, the installer warns that an application is already installed and to update the application to a new version, the previous version must be uninstalled, but that implies that a database in SQL containing it is deleted the project.
To solve the problem we create another application that downloads only the new *.exe file of the application and replaces the previous one and that way the 'updates' of our app have worked correctly.
But now we have added new functionality that previous installers don't have and just replacing the *.exe file is not the solution.
My question is: How can I create a Visual Studio installer that doesn't delete the database that I mentioned?
At the moment the cumbersome solution to this problem is to restore the database in another part of the PC, uninstall the old version of the PC, install the new version and paste the database.
Any comments or suggestions are welcome
Wix allows you complete control over what is installed or updated when you run the installation process.
I have created a new Azure Function app with an Http Trigger in Visual Studio 2017 (which I have just updated to v15.8.4).
Using the generated function, when I try to run it I just get a message box with the error
The debug executable "C:\Users\Paul\AppData\Local\AzureFunctionTools\Releases\2.5.2\cli\func.exe" specified in the 'FunctionApp1' debug profile does not exist.
Sure enough there is no func.exe at that location, just a func.dll.
The file C:\Users\Paul\AppData\Local\AzureFunctionTools\Releases\1.3.0\cli\func.exe does exist.
I have successfully run an Azure function locally before but I assume updating Visual Studio a few times has broken something.
How can I get this working?
I Deleted AzureFunctionsTools and azure-functions-core-tools from C:\Users\ {YourUser} \AppData\Local. And ran the solution again it downloaded the same tools and then executed without errors.
I eventually got this to work by changing the settings in the Debug screen.
I changed Launch from Project to Executable
I set Executable to C:\Users\xxxx\AppData\Roaming\npm\node_modules\azure-functions-core-tools\bin\func.exe
I changed Application arguments to start
I changed Working Directory to Sourcedirectory\FunctionApp1\FunctionApp1\bin\Debug\netstandard2.0
I would still love to know where the Project settings were getting their values from though...
In my similar case after installing Visual studio 2019 16.11.2 in a new Win 10 S.
I had already AzureFunctionsTools version 3.23.5 installed with func.exe inside the cli folder (without_x64 suffix)
But my newly installed VS 2019 was looking for func.exe in a similar path with only one difference that was (_x64 suffix after cli).
C:\Users\[username]\AppData\Local\AzureFunctionsTools\Releases\3.23.5\cli_x64
After getting no result trying a other solutions mentioned here I finally renamed the existing cli folder to cli_X64 and it worked
How can I get this working?
In your case, it seems that there is no azure function tools v2 , please have a try to install it.
npm i -g azure-functions-core-tools#core --unsafe-perm true
Please also try to update the [Azure functions and Web Jobs tools] to latest version
tool->Extensions and updates
And then try to run the azure function, if there is no corrosponding version it will download it automatically.
Test Result
Update
Check the function tools from the path
C:\Users\{userName}\AppData\Local\AzureFunctionsTools\Releases
I am able to get this working just by targeting .Net Standard 2.0.
Just change to netstandard2.0 in the project file.
Application Settings
Debug Settings
There is no need of providing a path to the func.dll.
I was just having on a fresh install of Visual Studio 2019 (had to uninstall 2017), and it was irritating me to no end.
I have found a solution to the problem, but no reason as to why this problem happened nor why Visual Studio deemed it necessary to make it so hard to fix things (they have no option of installing or reinstalling Azure Functions Tools in VS 2019 or even outside of it).
Solution:
Find a way to download the release. I used npm: npm install -g azure-functions-core-tools#3
(-g is global but you can install it locally, #3 will install the latest 3.x.x)
Replace the entire contents of C:\Users\<username>\AppData\Local\AzureFunctionsTools\Releases\3.4.1\cli_x64 with the version you installed.
For me, it was all the files in \node_modules\azure-functions-core-tools\bin.
What worked for me is combination of above two answers .
Same error I also faced due to anti-virus but can't modify anti-virus since it can be changed by IT Security/networking team and process is time-taking & long process. Another workaround is :
Install azure-functions-core-tools via npm
npm install -g azure-functions-core-tools#3
Change Executable & Working Directory in Debug settings for azure Project settings
Working Directory : C:\<Project path>\bin\Debug\netcoreapp3.1
Executable : C:\Users\<username>\AppData\Roaming\npm\node_modules\azure-functions-core-tools\bin\func.exe
I have a Solution file (.Sln) in Visual Studio for my Application. Application development started back in .NET 3.0. Later it was decided to provide application in .NET 3.0 and .NET 4.0.
Since there wasn't an option (I was not present at that time) so two solution files were created.
App_NET30.Sln
App_NET40.Sln
Later came a requirement to support .NET 4.5 as well. So one more file was created
App_NET45.Sln
Respective Solution files are opened using Visual Studio version
App_NET30.Sln - Opened in VS 2008
App_NET40.Sln - Opened in VS 2010
App_NET45.Sln - Opened in VS 2010
Now, somehow, this does not seem a good way to me. There has to be a neat and clean way of doing this. Like doing it all in a single solution file
I tried to create a single solution and defined various build configurations in the file and changed Target Framework in each build configuration. But it did not persist.
What can be a way to have a single solution file and achieve all that I desire ?
I have a VS 2013 Installer Project, it all works fine for the user that installs the app, however all other user profiles see the following when they run the shortcuts:
It appears that the shortcut is the issue here. If I go to program files and run the app directly and/or create a new shortcut the app runs with no issues.
I have set InstallAllUsers to True:
I also noticed if I set the InstallAllUsersVisable to True, it doesn't actually appear in the install wizard.
Shortcuts are added to the highlighted folders:
Is there a way to get around the install prompt? If not can I somehow get the installer to cache the msi so its accessible?
I did notice the shortcut path is just UC Extend, not the path to the exe:
Not sure what I am doing wrong here. No amount for searching the net has helped me get past this. Really appreciate some help on this :)
I ended up creating a new installer project and the problem went away. I had applied VS 2013 SP1 since originally creating the project so maybe that was the fix.
I am kind of new to Visual Studio and have found no solutions online, so this may be a simple problem nobody has bothered to post about.
I am working with a system that requires certain browser settings on a very specific version of Internet Explorer and am trying to create a launcher that can be installed on all users of a domain computer that establishes all these settings and creates a simple IE window (to dissuade people from using it more than needed).
I have written this application, but when I run the installer it a) gives me no option to change the install directory, and b) does not give me the option to change the default install directory in the project properties.
Other sources continue to say to change the 'Install Folder URL' to something else, but whenever I change it to say '\\localhost\c$\A_File_Directory', nothing ever changes and it continues to install in an unknown location.
Any help would be appreciated (perhaps a location with in-depth examples for VS)
EDIT -- It seems there is no way to do what I am looking for through Visual Studio, so I think I will be just deploying the ClickOnce installer through Group Policy so it can run on a per-user basis. Thanks to all who helped!
As of VS 2010 the ClickOnce Installer does not let you choose where to install the application. It controls that. I have found it rather irritating and if you really need to control where something is installed you need to use a different installer.
Here's another answer for VS 2012
Settting the ClickOnce installation folder URL in Visual Studio 2012