visual studio how to share exe with someone without visual studio - c++

I made a small game visual novel like on visual studio (It runs on console) I am using it as a CLR proyect.
I want to share this app with a friend who doesn't have visual studio or any programming tool, how can i do this ?
I tried only compilers but they say stuff like "pch.h" not found or "conio.h" not found.
Is there a way to show this to my friend ?

You must generate a setup wich will automaticaly detect all your program dependencies.
I suggest you create setup project that can detect all these dependencies:
1- install Microsoft Visual Studio Installer Projects from here
2- Download the appropriate VC Redist here
3- Put your project in release mode
4- Add setup project to your VS solution
5- Add your program to the setup project
6- Choose primary output of your project
7- Add the downloaded VC_redist.x86.exe to setup
8- Go to project custom action
9- Add VC_redist.x86.exe
10- Build your setup project, Give the generated msi to your friend and have fun !

Related

Unable to add app.config file in Visual Studio 2017?

Working in Visual Studio 2017; I have added a class library in my project. Now I want to add an app.config file.
When I try to add by "Add new Item" but config file is missing from item list.
How can I do it?
You probably forgot to install workload .NET desktop development.
Go to installation, click to modify and include the workload .NET desktop development.
Check image of installation screen
Just right click your class library. Click on Add -> New Item and you should find Application Configuration file
Note:
If you have a solution without any project or all project are unloaded, you would not find the Application Configuration File
If you are missing visual studio templates,then Close all instance of Visual Studio and Open visual studio command prompt and type,
devenv /installvstemplates
Press Enter. Let the process be complete and now open visual studio. You will get all missing templates under Visual Studio installed templates.
I couldn't add app.config using the GUI tools for my web project. However, I have added the app.config file manually and the build process picked it up and used it.

Changing target to x64 breaks the FLTK build in Visual Studio 2017

I'm trying to build the FLTK version 1.3.4 which you can find from http://www.fltk.org/software.php in Visual Studio 2017.
I unzip everything, navigate to the ide/VisualC2010/ folder, and open the fltk.sln file in Visual Studio 2017.
Visual Studio asks if I would like to upgrade project targets to the latest Microsoft Visual Studio 2017 toolset. The upgrade options are Windows SDK Version: 10.0.16299.0 and Platform Toolset: Upgrade to v141. I press OK.
At this point if I do Build->Build Solution (Ctrl Shift B), everything works. However I noticed that the target is Win32 and I would like to also compile the library so I can link against x64 programs.
I go to Build->Configuration Manager and then in the Active Solution Platform->New... and Type or select new platform: x64 and Copy settings from: Win32 and Create new project platforms [checked] and then I press OK. This takes a while to complete.
Repeating step 3 no longer succeeds, with many projects failing with fatal error c1041: cannot open program database ...
I am pretty much a beginner at Visual Studio and I don't really understand what I'm doing. Can someone clue me in on what is happening here?
Fixed it by going to Tools -> Options and then Build and Run and then I changed maximum number of parallel project builds from 4 to 1.

Using UE4 with Visual Studio 2017

I recently did some cleaning of my drives. I decided to install visual studio 2017 after cleaning the drives up. I have been trying to continue work on my old UE4 project using the engine pulled from GitHub. I tried rebuilding the project with VS2017 which I know is not fully supported yet. I did run into quite a few problems, including the missing corecrt.h files. I reinstalled the Windows SDK to fix this.
The current problem is a new missing file called windows.h, and I believe it is missing due to the build tools looking for the wrong version of the SDK. I was wondering, has anyone else successfully integrated Visual Studio 2017 with their UE4 project after running into similar problems?
-- Edited due to poor grammar.
As I know Version 4.15 supports both Visual Studio 2015 (default) and Visual Studio 2017. If you are building the Engine from source code, you would want to open a command prompt after running Setup.bat and run the command GenerateProjectFiles.bat -2017. This will give you a Visual Studio 2017 solution for the Engine.
To use Visual Studio 2017 for projects, you can set your preference for which version projects use by going to Edit -> Editor Preferences -> General -> Source Code and choosing Visual Studio 2017 in the Source Code Editor setting.
If regenerating the Engine's VS project files doesn't help. Try regenerating your own UE4 project's VS project files.
With Visual Studio and UE4 closed, find the .uproject file, right click and select Generate Visual Studio project files.
Open the solution, make sure your UE4 game (e.g. MyProject) under the Games folder is set as the StartUp project (right click, Set as StartUp project), then try a compile.

Add Visual C++ Redistributable for Visual Studio 2015 to InstallShield

Issue
I have just set up my InstallSheild which works fine and i am just wondering how i can add the (x86) + (x64) version of this download : https://www.microsoft.com/en-gb/download/details.aspx?id=48145 to my InstallShield so the user has to install it.
I have tried to get this working on One-Click but this also does not work.
Has anyone tried adding this package to there InstallShield?
If its simple MSI project then you go into Application data/Redistributables search for desired package to add, probably needs to be downloaded first. When you check it it should be included and installed before feature selection, you can change this option in this view. (i dont have personal experience with this)
But i have suite project which includes c++ redist 2015. You can add it in Packages view, right click it and add new executable. You can map it from the installshield folder (where it was downloaded from the step i wrote above) or from the place you have downloaded it before.
You just need to add a prerequisite for Visual C++ Redistributable. In that prerequisite, you just need to mention a path of exe (files to include). You can set this path to the download location where you have already downloaded that exe.
So it will get added to your installer. And then while installation it'll get installed on target system on one click.

Adding dependencies to a setup project Win32 application Visual Studio

Hi I am looking to create a setup project for my Win32 application developed using Visual Studio 2013. I have created the setup.exe using InstallShield However now i also need to add dependencies which should be installed along with the required application when setup.exe is run.
The dependencies are simply Visual C++ Redistributable for Visual Studio 2015.
I went through this article for creating the setup.exe for my application. But I did not find any documentation which directs me how to add dependencies to this installer.
I found this document which describes a walkthrough for adding dependencies but that is no more possible in Visual Studio 2013 as much as I am aware. Now we 'NEED' to use Install Shield. Correct me if I am wrong.
Please direct me to some documentation which will guide me to add dependencies to my setup project.
UPDATE
I found in the InstallShield Project Assistant an option to check for installation requirements. But it requires you to specify the directory to search the particular file. As far as I know the Visual C++ Redistributable package is not installed in any particular location but the only way to detect its presence is to check if the registry key is set to 1.
So instead of checking I'd rather always have the setup file to install the Visual C++ Redistributable package no matter it is present or no.
But even for that how do I go about it?
There might be other reasons you need to use InstallShield that I'm not aware of, but in the simple case of a C++ app that needs the runtime as a prerequisite, I'd use Visual Studio 2015 (Community Edition will do) and add the Installer project extension. The project properties lets you build a prerequisite installer (a setup.exe) and among the choices are the VC++ runtimes. That's just an exe that does its checks and installs if required.
I'm not sure how you got a VC 2015 C++ requirement while developing with VS 2013. Again, VS 2013 also has a community edition and an installer project extension that will install the VS 2013 C++ prerequisites.
The redistributable installers have their own checks to see if they need installing. I wouldn't expect InstallShield to require you to know the detection rules of a C++ runtime. that's a bit odd. There may be another setting where you just say C++ runtime required.