So this was how I got the Box example working. These actually works for the other examples for Introduction to 3d programming in directx 11 also so use this for other examples to that you wish to run.
Using Visual Studio 2013
1) Open the Box example. Right click on the project and click on properties. The screenshot will make this clear for you if not sure where this is. https://ibb.co/jfoKYG
2) At the top where it says configurations. Make sure that is set on 'All configurations'. Then click within configuration properties - VC++ Directories. You need to add some text into the exe directory, include directory and library directory. So select on each field one by one and paste inside of there, you can paste over anything that's already in there:
executable directory, paste in - $(DXSDK_DIR)Utilities\bin\x86;$(ExecutablePath)
include directory, paste in - $(DXSDK_DIR)Include; the location of your common folder for all these examples ;$(IncludePath)
libriary directory, paste in - $(DXSDK_DIR)Lib\x86; the location of your common folder for all these examples ;$(LibraryPath)
Then click 'apply' to keep all that has been entered. Click 'ok' then play the project. It should now run.
In case the above fix does not work I have seen this myself where a tick box is not ticked for some reason so you should check they are ticked > In the Box example open properties for the Box project. In VC++ Directories where we were before. For each of the exe, incl and library directories click on the drop down and select edit. In this window you will see at the bottom a tick box with 'Inherit from parent or project defaults'. This should be ticked, so if the above steps aren't working check this is ticked for each of the three directories.
----------------
I created this guide from scratch as I was curious to see if a step had to be included which involves building an effects project and copy pasting files. I have seen now that many examples are working with the steps I have tried above only so maybe the effects procedure is not required (maybe its for the examples to work using VS15).
In case there is an example someone comes across that isn't working with the steps used above i'll include this other procedure (Only carry out these steps if the above does not work for you):
1) If you don't have download the directx sdk june 2010. https://www.microsoft.com/en-gb/download/details.aspx?id=6812 . You need to copy the effects11 folder found, on my computer it is in C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Samples\C++\Effects11. IMPORTANT, COPY THIS AND PASTE SOMEWHERE ELSE. You do not want to change anything from it's original location.
2) So now you have the Effects11 folder copy and pasted somewhere else on your computer, location doesn't matter really can be anywhere you want to place it. Inside this folder, open the Solution for Effects11_2010. You need to run this in debug and release mode, at the end of each run a message will appear saying 'unable to start program' but this is fine.
3)Then after this has been done there will be a debug and release folder appear in the Effects11 folder. In the debug folder find the Effects11 object library file and rename it to Effects11d. In the release folder now find the Effects11 object library file, this does not need renaming.
4)Now both of these files the Effects11d that was renamed and the Effects11 just seen both need to be copied. They should then be pasted into the Common folder that the books examples come with. This common folder allows for the examples to work, that common folder. So both debug and release effect files paste them into the common folder. Last of all in the Effects11 main folder open it one more time. Open 'Inc' folder, copy 'd3dx11effect' header file. Then paste this into the common folder now.
----------------
That's pretty much it. Thank you gamedev.net for helping me getting this working. The community have been an invaluable help. Every person that gave me input in a thread i made a year ago that i worked at for awhile then stopped to work on other stuff. To the people that have helped me in this recent thread I made as I am now needing to use DirectX for something i'm making. Every bit of info i received got me that bit closer to making this books examples to run for me. Such a hassle they don't just run straight away but with newer operating systems and software and when the examples were actually created. It's probably understandable/expected for the examples to need tweaks. I want to give a big thank you to community members Infinisearch and Happy SDE who's help on this matter helped me get this working. They had both given massive input into making this work for me. Thanks guys but you know this already as I PM'd this to you both ;).
Ok, this is a long enough post as it needs to be. Better cut this post short now. Thanks again gamedev.net for allowing me to learn directx from that book now, as i have the examples working.
edit - I have just realised that there are downloads for Source Code Set 2 and 3. I was only testing the examples from code set 1. I totally forgot that there were more examples. Only because i've been trying so long trying to get these first lot of examples running. Hopefully the other examples work fine but the examples for code set 1 definitely all run okay. I am going to see now what these other examples are like. I am keen to see what interesting things there are to see in these other code sets.
- The first example for code set 2 needs the effects11 procedure to occur before it can run fyi. I haven't tested anymore so far. The other examples are working fine (code set 2). I'm going to say that for code set 2, effects11 needs setting up.
- Tested near enough every example now, code set 3 including. They all run. from code set 2 the effects11 needs setting up then the examples are able to work.