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.
Related
I tried loading the solutions folder in Visual Studio Code however the build configurations are all wrong and I wasn't able to figure out how to tell VS Code which project to run.
To further complicate things I 'deleted' the folder structure in VS Codes solution explorer and now I can't see the folder structure when I try and load the same folder directory.
VSCode doesn't support the .sln files the same way as VS. It is a directory based editor first of all, not a full IDE. For example, the VSCode Explorer is used to browse, open, and manage all of the files and folders in your project (workspace).
All workspace settings are stored inside your workspace in a .vscode folder and only apply when the workspace is opened. Settings defined on this scope override the user scope. It may help to think about workspace as a root folder that was used to open the project in VSCode.
In general, to be able to build, debug and run the application in VSCode, you need to configure build task and launch configuration.
VS Code provides a conception of
tasks to allow actions like project building. Tasks are defined in task.json file;
launch configuration so you can run/debug app. Launch configs are described in launch.json.
VSCode looks for this files also in your workspace's .vscode folder.
During the configuration process, if you need to specify a path to something in your project, it is common practice to define it as a relative path to this workspace folder by using ${workspaceRoot} variable.
If you install C# for Visual Studio Code (powered by OmniSharp) extension, it helps you to generate appropriate configurations for .NET Core projects.
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.
I have a click once deployment project that has been working fine for a long time now. I added some new dll's to a project that is referenced by it. The dll's can't be referenced in references, so I added them as files to the project.
Build Action is Content, copy to output directory is copy always.
when I build the application, the dll's appear in the bin\debug directory. The program uses them just fine too on my computer. When I deploy the application, the dll's don't make it to the other computer.
Under Publish in application properties I went to application files. the dll's I need are not listed there to be included in the deployment.
I would love some help, I feel like I'm missing something really simple.
I have a feeling if I put the dll's in the main project, it would work. I don't really want to do this, I would like to keep them all located in the project they are actually used in.
When I deploy the application, the dll's don't make it to the other computer.
...
Under Publish in application properties I went to application files. the dll's I need are not listed there to be included in the deployment.
You need to set them to download with the application. Click the DLL in the project properties, then press F4. Set the Build Action to Content, and the Copy to Output Directory to something like 'Copy if newer'
For information - it is likely if you download the DLLs for referencing by a built exe (for example) you may need to configure a manifest file for the executable as well to get it to pick up the DLLS correctly
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.
I have an XNA 3.1 program and would like to create an installer that includes all the content files. I know I can create a ClickOnce installer but it does not package everything up in one file. Is there a way on build of the deployment project that I can look at the project folder and dynamically add the files and directories to the MSI? On the PreBuildEvent There is already an xcopy of the files I want from the game project folder to the deployment folder. What I want is a way to add those into the deployment project. Custom actions don't seem to fit since they are for install time, not build time. Should I give up and go the Wix route?
I did find this project on github. https://github.com/dump247/VDProjectXml It looks like a good start. I'll look into this and Wix.