Regenerate T4 template after each build on build server without Vistual Studio - visual-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

Related

Incompatible project type .deployproj (Visual Studio 2019)

I have a solution that contains a .deployproj type of project. It seems that Visual Studio 2019 is not able to load that project. The detailed error message is the following:
Unsupported
This version of Visual Studio is unable to open the following projects. The project types may not be installed or this version of Visual Studio may not support them.
For more information on enabling these project types or otherwise migrating your assets, please see the details in the "Migration Report" displayed after clicking OK.
- Provisioning.Arm, "C:...\Provisioning.Arm\Provisioning.Arm.deployproj"
Non-functional changes required
Visual Studio will automatically make non-functional changes to the following projects in order to enable them to open in Visual Studio 2015, Visual Studio 2013, Visual Studio 2012, and Visual Studio 2010 SP1. Project behavior will not be impacted.
What can I do in order to load the project within Visual Studio 2019?
It seems that you need to install the Azure Development workload in order for Visual Studio to be able to load .deployproj projects.
So just modify the current installation to also contain this workload. (I don't know exactly what individual component needs to be installed for this to work, I just installed the entire Azure Development workload).

What should I install, except Visual Studio itself, for Microsoft.Common.props to appear under c:\Program Files (x86)\MSBuild\14.0\?

My csproj files import Microsoft.Common.props, but this file does not exist on my build server.
The build server does not have Visual Studio 2015 installed (and I like it this way), but we did install the 2015 build tool chain. The file is not there.
What else is missing to install? Google seems to be helpless here.
What should I install, except Visual Studio itself, for Microsoft.Common.props to appear under c:\Program Files (x86)\MSBuild\14.0\?
AFAIK, you have to install the Visual Studio 2015, if you need the import file Microsoft.Common.props. Or you can just copy this file from the machine which have installed the Visual Studio 2015.
If you do not want to install the Visual Studio 2015 on your build server, I would like suggest you can upgrade your project to Visual Studio 2017, then you can use the Visual Studio Installer, which you can see new experience:
The smallest install is just a few hundred megabytes, yet still contains basic code editing support for more than twenty languages including source code control. Most users will want to install more. You can add one or more 'workloads' that represent common frameworks, languages, and platforms instead of entire Visual Studio.
Check more info Visual Studio 2017 version 15.0.

Convert Visual Studio Solution and Project Files to DDK Build

I know products (such as VisualDDK) exist to use Visual Studio as a front end while using the DDK to build a project but I have the exact opposite question.
Are there tools to take an already existing Visual Studio *.sln and *vcproj files and generate dirs and sources files that can be used with the DDK?
I am interested in Visual Studio 2008 and above products.

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

MSBuild calling the Package Target of Web Project

Does anyone know the components that need to be installed in order to make the Package Target available via MSBuild.
It's possible to Package using MSBuild on a machine with Visual Studio installed, but not on a build server with only the .NET 4 SDK and Web Deploy 2.0 installed, which results in the following error:
msbuild "Package" does not exist in the project.
It partly comes down to the following missing files on the server:
c:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\Web\*.*
This can of course be resolved by copying the contents of the MSBuild VisualStudio folder to the equivalent directory on the build server, but this is not a manageable solution for server configuration.
All the answers I've read involve having Visual Studio installed or copying the files. Surely it's possible to compile the Web Deploy package without installing Visual Studio?
I have a TeamCity CI server without VS installed building a Web Project configured to also create a deployment package on successful build. However, for the life of me I can't recall if I copied those files manually or if they were installed by some component.
The relevant components I have installed are the following, if you want to give it a shot:
.NET 4.0 SDK;
Microsoft Visual Studio 2010 Shell (Integrated) Redistributable Package;
Visual Studio 2010 SDK; (Not the VS 2010 SDK SP1)
Microsoft Visual Studio 2010 Visualization & Modeling SDK;
Web Deploy 2.0;
I installed the VS Shell in order to be able to install the VS 2010 SDK which in turn was required in order to install the Visualization & Modeling SDK so that I was able to run T4 transformations on the build server.
With this components and configuring the following MSBuild properties DeployOnBuild=true;DeployTarget=Package to create the deploy package I had no problems, but as I said earlier I may have copied the files manually after giving up all hope of finding a more cleaner solution and now my brain is blocking any memory of such ill action.

Resources