Unable to add app.config file in Visual Studio 2017? - 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.

Related

visual studio how to share exe with someone without visual studio

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 !

Visual Studio 2017 source control missing in file menu

As a starting developer I am running into some problemes with Visual Studio 2017. I developed some weeks without any problems, but now I can't add a project under source control.
If I add a blank solution I used to be able to add a new project to that solution, but that option isn't visible anymore. It happend when I added a project under source control. How can I undo this?
missing menu (picture from a manual made earlier)
Solution: File --> Open --> Open from source control --> select the right project.
Now new projects can be added to the solution. Save this solution and you can open it when VS starts.
Not sure, but see if this works. This was in visual studio 2013, but is the same problem.
Click here!

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.

Source file inclusion in visual studio

I've just Installed visual studio express 2015 on my PC and when I try to add a new source file to a project by right clicking on the 'source files' option in the solution explorer , the dialog box shows "no items found" instead of showing installed visual C++ templates. What could the problem be?
You most probably have not installed VC++ has while installing Visual Studio. It is sad that C++ is now not installed by default. You might have selected "Default" while installing VS - you should have chosen Custom and selected Visual C++ development. You need to re-install it (just re-launch setup).
If this doesn't help, please post the screenshot.

Using Visual Studio 2012 IDE, but compile with Visual Studio 2008

Where I work, we are stuck on VS2008 and will be for quite some time as converting the projects/solutions and integrating them back into our build process would take significant time; we're planning on moving to 2013 at some point though. However, I use VS2012 at home and love a lot of the features in the IDE that are missing in 2008.
I've read that you can use 2012 as an IDE and build with the 2008 compiler, but I can't find details on how this is accomplished. Any ideas? If I open one of the masterbuild files in 2012, it inevitably asks to convert them to the 2012 format, which I really don't want to do.
Thoughts? Thanks!
Yes it is possible as can be found on the Visual Studio site. However, I believe it will only give you options of the versions you have currently installed on the machine in question.
Here are the steps as laid out in the link, provided here to ensure the information link does not get broken:
(authored and published by Microsoft)
To change the target Framework
In Visual Studio, in Solution Explorer, open the shortcut menu for your project and then choose Unload project. This unloads the project (.vcxproj) file for your project.
Note: A C++ project cannot be loaded while the project file is being modified in Visual Studio. However, you can use another editor such as Notepad to modify the project file while the project is loaded in Visual Studio. Visual Studio will detect that the project file has changed and prompt you to reload the project.
On the menu bar, select File, Open, File. In the Open File dialog box, navigate to your project folder, and then open the project (.vcxproj) file.
In the project file, locate the entry for the target Framework version. For example, if your project is designed to use the .NET Framework 4.5, locate v4.5 in the element of the element. If the element isn't present, your project doesn't use the .NET Framework and no change is required.
Change the value to the Framework version you want.
Save the changes and close the editor.
In Solution Explorer, open the shortcut menu for your project and then choose Reload Project.
In Solution Explorer, open the shortcut menu for your project and then choose Properties. In the Property Pages dialog box, in the left pane, expand Common Properties and then select Framework and References. Verify that Targeted framework shows the new Framework version.
To change the project toolset
In Visual Studio, in Solution Explorer, open the shortcut menu for your project and then choose Properties.
In the Property Pages dialog box, open the Configuration drop-down list and then select All Configurations.
In the left pane of the dialog box, expand Configuration Properties and then select General.
In the right pane, select Platform Toolset and then select the toolset you want from the drop-down list. For example, if you want to compile with the Visual Studio 2010 toolset, select Visual Studio 2010 (v100).
Choose the OK button.
Try to use CMake. It could manage out of source build. You could create a VS2012 for edit and another VS2008 based for compiling. The source will be common.
From Visual Studio 2012 Compatibility page on MSDN
Some solutions, projects, files, and other assets that you created in
Visual Studio 2010 Service Pack 1 (SP1) will run without modification
in Visual Studio 2012, but others have to be upgraded.
If your original project is 2008 then you won't be able to use it in 2012, sorry.