How to edit Build system paths in Visual Studio 2005 - visual-studio-2005

I want to change the build system path for building my VC++ project in VS2005.
When I try to build the project, I'm getting an error that a specified header file cannot be opened. I have that header file in "Microsoft SDKs\Windows\v7.0\Include".
But the path present in 'Build system path' is "Microsoft SDKs\Windows\v7.0\Include" which i found in the Error dialog box when i tried to open that header file through the code.
So I want to change the path in build system path to "Microsoft SDKs\Windows\v7.0\Include".
How can i do this.? How to open Build system paths in VS2005.?

You can add include directives rather than change the build system path. Right click the project in Solution Explorer | properties
C/C++ | General
Select 'Additional include directives'
Here browse to the location of where you include files are.

Related

Failed to find Visual Studio .sln file - Dynamic parameter for build step template

I am fairly new to using TeamCity. We are currently using 9.16.
I am trying to setup a build template to associate across our many projects and I keep getting the error "Failed to find Visual Studio .sln file" for both the NuGet Installer step and Visual Studio (.sln).
Currently it is set to %system.teamcity.build.checkoutDir% and it says there is no *.sln file there, but there is when I look at the build server directly.
Failed to find Visual Studio .sln file at C:\TeamCity\buildAgent\work\58ef95107452dcbc\*.sln
I found the post regarding attaching the VCS root, but I do have that attached and it mirrors the projects that currently do not use a template.
Any help as to what I am missing would be greatly appreciated.
You must put the filename of your visual studio solution file in the "Solution file path" field of the "Visual Studio (.sln)" build runner step.
If your .sln file is at the root of your checkout directory you would specify the filename. Example: YourSolution.sln
For the "Nuget Installer" build runner step you must put the same solution filename in the "Path to Solution File" field.
Note that if your solution file is not in the root folder of your checkout folder you must specify the relative path. Example: path/to/my/SolutionFile.sln
What I was attempting to do is not possible.
Instead I created a parameter at the root level for SolutionFile in the templates. Then I simply change the value of that parameter in each project that uses the template.
In my case I was moving from SVN to GIT with TeamCity, and so had to change the VCS root from:
http://build.server.url:81/svn/MyApp/
To,
http://Build-Server-User#git.build.server.url:7990/MyApp/MyApp.git
Also, I had to change "checkout rules" from:
+:trunk => .
To,
+: => .
Because the default branch in TeamCity for GIT is refs/heads/master
For details, please see https://confluence.jetbrains.com/display/TCD10/Git

Including a batch file with VSIX

I'm trying to create a Visual Studio plugin, it's a menu item that executes batch files. I have no idea how to include the batch files (or any other additional files) with the VSIX when publishing so that they are available to all users that install the extension.
In solution explorer right click on the batch file (in this case I called it BatchFile.cmd) and choose 'Properties'
In the properties window change:
Build Action: Content
Include in VSIX: True
When the solution is built in release mode it creates a VSIX file in the bin/Release folder. This is the package and it contains all the assets required. When the package is installed on another machine, the batch file is included in the install location and can be referenced using:
Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + "BatchFile.cmd"
You can just include the batch file as content in your project, and use GetAssembly() to find the location of your adin dll at runtime

Missing header files for VTK

I installed Visual Studio 2010, Qt and Cmake. I configured them. Then I wanted to test by an example code. However, the program cannot find the header files. I searched on the internet and found that there might be a problem with the PATH.
Then, I followed this way that results in failure:
I wrote each folder name separately by putting semicolon between them to
Project > Properties > C/C++ > General > Additional Include Directories.
In this way, program found the header files but it gave me an error LNK1104. I think it happened because the Path for file name expands to more than 260 characters. I learned that from this site.
I tried to find one folder that I can write to PATH. I think it's lib file. But I could not find it.
what should I do to fix this problem?
Setting two values in visual studio will remove this error.
Go to Properties of the project -> C/C++ -> All Options -> Set the correct value for "Additional Options".
Go to Properties of the project -> Linker -> Input -> Set correct the value for "Additional Dependencies".
If you create the project using CMake, then these values will be setup automatically.

What are "Content Files" (in Visual Studio : Setup Project : File System

In the context of a Visual Studio 2008 Setup Project, what are "Content Files". In other words, when creating a setup project and defining the File System settings and choosing: Add Project Output > Content Files, what files will be added?
For example, what has to be true about a file or its location for it to be considered a Content File for a given project's output?
The build action property of the file will be labeled "content". Here is a link to more information about File Properties.

How do I set a path in Visual Studio?

How do I set a path for DLL files to be searched in Visual Studio for a particular project alone?
Now I am setting it in the environment path variable, but I would like better control over this.
Search MSDN for "How to: Set Environment Variables for Projects". (It's Project>Properties>Configuration Properties>Debugging "Environment" and "Merge Environment" properties for those who are in a rush.)
The syntax is NAME=VALUE and macros can be used (for example, $(OutDir)).
For example, to prepend C:\Windows\Temp to the PATH:
PATH=C:\WINDOWS\Temp;%PATH%
Similarly, to append $(TargetDir)\DLLS to the PATH:
PATH=%PATH%;$(TargetDir)\DLLS
You have a couple of options:
You can add the path to the DLLs to the Executable files settings under Tools > Options > Projects and Solutions > VC++ Directories (but only for building, for executing or debugging here)
You can add them in your global PATH environment variable
You can start Visual Studio using a batch file as I described here and manipulate the path in that one
You can copy the DLLs into the executable file's directory :-)
If you only need to add one path per configuration (debug/release), you could set the debug command working directory:
Project | Properties | Select Configuration | Configuration Properties
| Debugging | Working directory
Repeat for each project configuration.
Set the PATH variable, like you're doing. If you're running the program from the IDE, you can modify environment variables by adjusting the Debugging options in the project properties.
If the DLLs are named such that you don't need different paths for the different configuration types, you can add the path to the system PATH variable or to Visual Studio's global one in Tools | Options.
None of the answers solved exactly my problem (the solution file I was running was trying to find xcopy to copy a dll after generation).
What solved it for me was going into menu "Project -> Properties"
Then in the window that opens choosing on the left pane: "Configuration Properties -> VC++ Directories
On the right pane under "General" choosing "Executable Directories "
And then adding:
$(SystemRoot)\system32;$(SystemRoot);$(SystemRoot)\System32\Wbem;$(SystemRoot)\System32\WindowsPowerShell\v1.0\;$(ExecutablePath)

Resources