Compile generated files in Visual Studio - visual-studio-2010

Does Visual Studio have some options to add/compile all selected files that were auto generated outside visual studio i.e in pre build event? How to achieve this.

you can auto generate them once, add then to the project and just compile...
the pre build will generate them and then you will compile with the fresh files.

Related

How to add an existing cmake project to the Visual Studio Solution

I am using Visual Studio 2017 and I have a solution consisting of several projects mainly in C++. Now I want to add an existing C++ project which using CMake for building to my solution in visual studio and build it along with other projects in solution. Is it possible to do that? FYI, I can build the cmake project separately in Visual Studio.

Visual Studio 2015: How to automate cmake operations?

I'm using Visual Studio 2015 Enterprise Edition. I followed this tutorial
https://www.youtube.com/watch?v=IgvbhyDh8r0
Like Visual Studio creates a .sln file when any new project is saved and then on building it executes it to build the project, in the case of this VTK tutorial, it uses CMake to create the build file .sln for Visual studio to execute. Is there any way I can automate/replace the process of CMake using Visual Studio only?
PS- Just ignore if I have any misunderstanding of the concepts as I'm totally new to this and was not able to find proper documentation on it.
After you've generated a .sln file once, you don't need to run CMake manually again. It hooks itself into ZERO_CHECK project, so it would regenerate the solution every time you change CMakeLists.txt.
But you can't do with VS only, as you have to generate .sln for the first time.

Using tsconfig.json with Visual Studio 2013? (web project)

I'm using Angular 2 in my web project, and as such need TypeScript to suport experimental decorators such as #View. This can be done in tsconfig.json with "experimentalDecorators": true but I see no such option in Visual Studio's project settings. (I created a TypeScript Project.) As such, I need Visual Studio to detect and use my tsconfig.json file.
I've read various places online that Visual Studio should pick up and use a tsconfig.json if it's present in the project's root directory. However this is not happening. I am using Visual Studio 2013 Update 4 -- and upgrading to Update 5 as I write this.
Does anyone know how to get Visual Studio 2013 (NOT Visual Studio Code, and NOT Visual Studio 2015) to use the tsconfig.json file? Maybe it needs to be in the solution's root instead of the project's root?
Failing that I can try adding a pre-build event to call tsc directly... but that seems sloppy.
I also was looking for this. It appears that Visual Studio 2013-2015 not support tsconfig.json yet. Currently you need to edit your project file.
Edit: With Typescript 1.8 release Visual Studio 2015 seams to fully support .tsconfig. See http://www.typescriptlang.org/docs/release-notes/typescript-1.8.html
The following question: What are the TypeScript project build configuration options? points to a .targets file where the TypeScript configuration options are defined.
You could manually modify that .targets file to add support for experimentalDecorators, although that's not scalable because you'd have to do that to each developer's machine.

Visual Studio 2010 and .bsc file

I'm using an open source Mozilla project in Visual C++ 2010. The project requires UNIX based build tools and therefore I cannot create a Visual Studio project for it directly. I must use the command line build files (makefile, configure script, etc) bundled with the project to build the project using cl.exe. (This is due to the fact that some .h files are generated by the make utilities.)
The problem is, without creating a Visual Studio project, how do I browse through the project source files using say the "F12 Go To Definition" feature available in Visual Studio? I know I can generate a .bsc file using the /FR compiler option. But, I also found that the Object Browser in Visual Studio 2010 doesn't seem to support a .bsc file. When I open a .bsc file directly using Visual Studio 2010, it says "Class not registered, Looking for object with CLSID: {D9B3211D-E57F-4426-AAEF-30A806ADD397}.
How do we use a .bsc file under Visual Studio 2010?
Unfortunately BSC is not supported anymore for Visual Studio 2010+
More details: http://connect.microsoft.com/VisualStudio/feedback/details/514470/bsc-files-cannot-be-used

Regenerate T4 template after each build on build server without Vistual Studio

My solution file contains many projects which consist of many template files and I want regenerate each template after or before build on the project. I know how to do that locally, but I have problem how to do that on build server where Visutal Studio is not installed. Do you have any sollutions?
I know that are two sollutions form this source: Get Visual Studio to run a T4 Template on every build :
a) Visual Studio Visualization and Modeling SDK - i have to install visual studio (except Express Edition) and i can't do that
b) use TextTransform.exe tool, but then I have problems with missing dlls in GAC
Regards
With Visual Studio 2010 SP1 and the Visual Studio Visualization and Modeling SDK for Visual Studio 2010, you're licensed to copy and redistribute the necessary files to do T4 transforms at build time on a build server (note, only a build server, not arbitrary redistribution). You can simply copy these files from a machine with Visual Studio and the SDK installed.
The two license files in question are:
1) buildserver.txt in the Visual Studio install directory
2) redist.txt in the VisualStudioIntegration\Tools\DSLTools directory of the SDK.
I have found solution;)
For regenerate T4 templates file i use solution described by Cheburek from this page Get Visual Studio to run a T4 Template on every build. But if I want to use Cheburek solution on build server without Visual Studio installed I need to add following dll files to GAC, and then everything is OK:)
1) Microsoft.VisualStudio.TextTemplating.10.0.dll
2) Microsoft.VisualStudio.TextTemplating.Interfaces.10.0.dll
Regards

Resources