Visual studio 2022 WinForm publish folder - c#

i have created a WinForm application and i tried to publish it but i have many questions about this publish process.
Why does Visual studio create the app folder in C:\Users\'Username'\AppData\Local\Apps\2.0 ?
Is there a way install the app .exe in another folder such as "ProgramFiles"?
How does this publish thing really work, is there a documentation about it?
What is the AppName.application file that is created after publishing?
I am worried about this because i want to create a Themes folder and i don't want the app folder to be so deep into the folder tree.

The app folder in C:\Users'Username'\AppData\Local\Apps\2.0 is a system folder, it is used to hold temporary data for .Net Framework apps installed on your PC.
you have nothing to worry about with that folder . . .
You can install the .exe and publish the solution in the folders that you want,
you can do it by using ClickOnce deployment to a folder.
Here is a Microsoft documentation how to use it.

Related

Linking files when publishing a project

I have a project that I wish to publish. currently, I hardcode some reference files (.json,txt, and .ico) to be used in my project, which reside in a folder on my desktop for testing purposes. now that I feel I'm close to a version 1.0 release I want to migrate my resources to a applications folder upon install. basically want to create these files when the app is installed.
2 big questions I have is how to reference to the application folder that doesn't exist yet, and how do I publish the setup project.
I have the setup project installed for VS2019, and followed a quick and brief blog on how to use it. but I haven't found out how to publish that setup project. I can publish my project with my actual code in it, but I cannot publish the setup project.
below is a screenshot of the setup project. and i will add screenshot of my settings for the reference file.
Add the files into subfolder of your project and in the options part in Visual studio set that files will be copied to "debug"/"release" folder.
You will have an output folder with all what you needs and can be shippable.

sharpdx_direct3d11_effects_x64.dll DLLNotFoundException

What's the correct procedure for deploying WinForms / WPF Applications which use SharpDX.Direct3D11.Effects v3 NuGet package?
They seem to depend on two unmanaged DLLs:
sharpdx_direct3d11_effects_x64.dll
sharpdx_direct3d11_effects_x86.dll
Should these be copied to the output directory? As a post build step or otherwise?
After we publish the WPF/WinForms applications from Visual Studio, it will generate an Application Files folder which contains .dll.deploy files.
I installed the SharpDX.Direct3D11.Effects package in my WPF application. And after I publish this application, I found the sharpdx_direct3d11_effects_x64.dll and sharpdx_direct3d11_effects_x86.dll will generate sharpdx_direct3d11_effects_x64.dll.deploy and sharpdx_direct3d11_effects_x86.dll.deploy files in Application Files folder. We need not to copy to them to output directory.
If the depend on DLLs are not include in your Application Files folder, please configure them through Project Properties -> Publish tab -> Application Files to set the Publish Status for these Dlls as Include.

How to create a single setup.exe using visual studio 2010?

When I am publishing my project, it creates a folder named "Application Files" and two files named "ProjectName.application" and "setup.exe". But I am not expecting this. When I publish my project/solution it will create a single setup.exe and no ohter folder and files will create there.
The app.application manifest file and setup.exe are the so-called smart client deployment model. AFAIK, you can provide a link to app.application on a webpage and .NET aware browsers are able to download necessary files from the manifest.
If you need a setup package that end users can click-and-install, you should use a setup creator like the one VS 2010 suggests - InstallShield Express.

publish winforms application without install

I've been creating winforms application for a while now, but i've never really published one to other people before.
Recently I started doing this but every time I publish my build, the user requires to de-install his current installation and install the new one.
Is there any way to remove this, so I'll only have to send a .exe file which they can use without any form of installing?
I've attempted to send the .exe file in the bin/debug/ but this only seems to work on computers where Visual Studio is installed.
Go to your solution and set the CopyLocal to true for all projects, this will ensure that the ..\Bin folder contains all the necessary assemblies for your program. Then just zip up the ..\Bin folder, get it onto the client machine, and then unzip it.
Hope this helps!
1) Change from Debug to Release in Solution Configurations
2) Right click on your project and click rebuild
3) Go to your bin=>Release=> app.publish for your exe version
4) Copy over any required .dll files,any .config files and any other resource/image files you need from bin=>Release to bin=>Release=> app.publish.
Your app.publish folder should now contain all the files required to run your form, and can be copied or zipped up and send to anyone who needs to use it !
You can try using ClickOnce as an installation method. It even has a built-in auto-update, so you can publish your application to a web server, and all existing installations will download latests version automatically.
To configure ClickOnce go to corresponding tab in your project settings.

Deployment issues regarding some resources

I am having a issue regarding my deployment of my software in Visual Studio 2012. First of all I am not able to install the "InstallShield Limited Edition" through VS12 so I am currently testing out Advanced Installer instead.
Mys issue comes due to the fact that in my program I am fetching a .pdf file and modifying it and later on showing them to the user. These PDF:s is in the programs resources folder but does not follow with the installer, so my application crashes since it cannot find this. The same is for my .chm file (help file)?
My customer is using XP and when I try to publish the software directly from VS12 it works on my computer, Windows 8, but not on his computer. The application won't even start for him.
So how can I deploy my pdfs to the installer file, or why is this not accomplished already?
It seems that the PDF and CHM files are not imported automatically in the project. What type of project have you created in VS?
To add those files in the setup use the "Edit in Advanced Installer" button from the Advanced Installer VS extension and go to Files and Folders page. There you should add the two files in the desired folder and save the project.

Categories

Resources