Newest msbuild Questions

Q&A for professional and enthusiast programmers

TFS 2013 Build force MSBuild to use Visual Studio 2015

I'm having a TFS 2013 build error with the new VS 2015 string interpolation syntax (Unexpected character '$'). I have modified the "Run MSBuild for Project" task of the build process template like so, ...

MS Build task cannot find AL.EXE

The issue is the following: C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(2863,5): error MSB3086: Task could not find "AL.exe" using the SdkToolsPath "" or the registry ...

Custom ProjectSchemaDefinitions in Project Property Sheet

I finally managed to configure my Visual Studo C++ Project to show my Custom ProjectSchemaDefinition if I take a look at a Single Project->Property. My Question: Is there any way to show this in a ...

SonarQube, TFS 2015 Vnext build -ERROR: JAVA_HOME exists but does not point to a valid Java home Folder. No “\bin\java.exe” file can be found there

We are using TFS 2015 SonarQube 5.6 .NET 4.5 jre1.8.0_112 jdk1.8.0_112 We have installed and Configure SonarQube on Same server in same box where TFS & TFS build is installed & configured....

Execute powershell build script from console application

my intent is to execute a .NET powershell script inside a console application. The powershell script have a function which start a build process using Start-Process and MSBuild, I tested it calling ...

Building VS2017 .net core apps that target the full .net framework

I have created a asp.net mvc core app targeting the .net framework (not the multi platform core) as I want to include standard .net framework libraries and running cross platform is irrelevant to me ...

cmake: use msbuild.exe instead of vs2013 use GENERATOR=“Visual Studio 12 vs2013 Win64”

Can you specify from a batch file or edit a file under the cmake installation?? I want to use msbuild.exe without visual studio IDE but I get this error: -- The C compiler identification is unknown -...

Msbuild Robocopy output to Itemgroup

I am to get list of changed files from source and destination folder using below command on command prompt robocopy.exe 2 1 /l /e /zb /xx /xl /fp /ns /nc /ndl /np /njh /njs My requirement is use ...

Trouble building multi-project .sln via command line

Also seems the documentation is somewhat conflicted. devenv /? : /Project Specifies the project to build, clean, or deploy. Must be used with /Build, /Rebuild, /Clean, or /...

Jenkins slave machine Windows configuration

I am very new to Jenkins and sort of new to build .net application, but the guy left team so I have been assigned to do this. I have read tons of articles online about setting up Jenkins master, but ...

csproj file settings for several build projects

I have this solution structute: Solution.sln |--WebUI.csproj (has Core.csproj as dependency) |--Core.csproj |--Tests |--UnitTests |--WebUI.UnitTest.csproj (has Core.csproj and ...

How to build .rc resource-definition file with MSBuild

I have downloaded the Visual C++ 2015 Build Tools (I'm trying write C++ without Visual Studio). I also have an example project (window application). It compiles fine, but I can't get the compiler to ...

Set MSBuild properties on Build target input items based on metadata

I'm using a code-generation tool (Entity Framework, in this case) in one of my projects, and it generates code that causes the compiler to emit warnings. I'd like to ignore those warnings for a ...

Elastic beanstalk and Visual Studio Online

Is there any way to deploy build from VSO direct to Elastic Beanstalk? I have working build of .Net Core application and I can easy deploy it from AWS Toolkit, but don't know it is possibile from VSO.

MSDeploy package to arbitrary DeployIISAppPath [duplicate]

I have an MVC Web API application which is published to an Azure App Service. Our standard build process goes like this: Build server builds and tests solution. Build server creates .zip MSDeploy ...

MSBuild Import a changable project at runtime

I have a msbuild script: Msi.msbuild which imports a Variables.msbuild project: <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="CreateInstaller"> <...

Zip content without preserving folder structure

I'm working on custom msbuild script. One of the Targets should zip up build output. For the sake of example let's say here's the path to output C -Folder -------bin ----------Debug I have following ...

Microsoft Tracker.exe documentation required

I'd like to use Tracker.exe for incremental building a custom step in Visual Studio 2015. Does anyone have the full doc on how to do it? The help supplied in "Tracker.exe /?" is not elaborate enough.

Postsharp not building in custom configuration via MSBuild

I'm running MSBuild via command line on a customer configuration (like Debug, Release that you see in Visual Studio, except I'm using my own one). MSBuild build.msbuild /p:Configuration=Dev ...blah ...

.net core : load an assembly and its unmanaged dependencies at runtime

I want to be able to load a database driver assembly at runtime and perform a connection to the server. For example in a console application I want to load the SQLite driver from my nuget package and ...

.NET Framework Class Library with Microsoft.Extensions.DependencyInjection

I have a .NET Framework (4.5.2) class library that I'd like to use Microsoft.Extensions.DependencyInjection with as we're separately developing an ASP.NET Core app. I installed it using nuget, it ...

MSBuild Macro for NuGet package directory

I'm working on a NuGet package that adds a step to the build process by using a .targets file. I need to reference other files from my NuGet package in order to complete the build successfully. In ...

Integration Tests using localdb with Visual Studio Online Errors - 'contained database authentication' must be set to 1

I am using localdb for some Entity Framework repository integration unit tests. I have implemented a standard build configuration and after initial problems read that I should initialise and start ...

SonarQube for MSBuild - End Analysis: Error during SonarQube Scanner execution Line out of range in the file

##[error]15:41:48.530 ERROR: Error during SonarQube Scanner execution ##[error]java.lang.IllegalStateException: Line 33 is out of range in the file Controllers/BaseAccessRequestController.cs (lines: ...

How to setup MSBuild tool in Jenkins with Windows slave and Linux master

Master Environment: Jenkins 2.45 Ubuntu 16.04 Slave Environment: Jenkins 2.32.2 Windows 2008 R2 VS 2013 I have a master/slave setup with a linux master and a windows slave. I have a few .NET ...

Issues with SonarQube Integration with VSTS with multiple MSbuild projects

In my build definition I have couple of Java & multiple MS build projects. Java projects are built using Ant. There are multiple ANT & MSbuild steps in build defination I want to integrate my ...

VSTS - Compile aspx pages on build

I have a task on a Visual Studio Team Services configured as follows: The solution contains an ASP.NET Web Forms application. The task compiles the solution but unfortunately compilation errors on ....

How can I build a native DLL as part of a .NET build process?

I am building a project in C# to interface with a C++ library. Because I want this to be cross platform I am using .NET Core RC3 though I'm not sure if that is relevant. Right now I have the cpp ...

MSBuild from command line, but no app_offline.htm?

I have an MVC Application and a WebAPI Service is a single solution, and for both projects I have created a publilsh profile using the File System to deploy. It actually works quite beautifully. ...

What is the difference between various MSBuild version properties, such as Version, VersionPrefix, and VersionSuffix?

Building projects with MSBuild 15 and Microsoft.NET.Sdk allows users to specify half a dozen version properties. What is the difference between each of these and what is the right way to use them? ...

Building WiX on Visual Studio Team Services times out

I have an existing XAML build I am porting over to Visual Studio Team Services build. There is a Solution file that contains two wixproj projects, and this builds with no issues on the current (legacy ...

MSBuild overwrite properties value with Import

I have a msbuild script which contains only PropertyGroup: DefaultVariables.msbuild <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <!-- default values if nothing is ...

MSBuild Error : MSBUILD : error MSB1009: Project file does not exist

I am very new to MSBuild environment and while trying to build one of the application that I am working on, I am following some instructions. By following the instructions written in the application ...

Conditional conditional symbol definition in a .csproj file

I am an experienced C# developer, but a complete beginner when it comes to MSBuild, and now I have a .csproj file containing the following XML snippet: <Choose> <When Condition=" $(...

How to run 'rebuild project' from the command line

Some Context: I am working on a Continuous Integration pipeline with MSBuild for a large project that includes an Android application. This application includes some automatically generated files ...

WPF compile time variable best way

I'm writing a tool with WPF application , and I need to reuse this tool as it is different time changing just small variables , like the title of the app, or a path or the path of a specific image in ...

Write Properties (name=value) to a file from an MSBuild project

For an MSBuild project, I would like to output some kind of a .config file that would be redistributed along the generated binary so the parameters used at build time can be checked by the users of ...

MSBuild config transform issues - desination folder and reverting file back to original state

Problem: DataFolder.config file is not reverting back to previous state (the patch element's value). Also, none of the custom config file transforms are being pushed out to the destination folder. ...

How do I get MSBuild to understand read dependencies in my tlog files?

My end goal is to make it possible to add 3D scenes in fbx format to my solution, and make them automatically converted into sdkmesh files and dds textures when I build my solution. To do this, I ...

VSTS - Build Wix MSI

I am having trouble building my solution in VSTS (Visual Studio Team Services) which contains a Wix project. I've tried using the Visual Studio Build process where I am pointing to my solution (using ...

When running Dotnet Publish for nuget in VSTS with local Agent it always try to publish old version why?

I have a strange problem I can't figure out how to solve. I use .net core and on VSTS I have this build pipeline: 1... Dotnet restore 2... MsBuild 3... Dotnet test 4... Publish test 5... Dotnet ...

I have to rebuild my DLL twice when I swap from x64 to x86 and vice versa

Whenever I change my configuration to build x64 or x86 and I click rebuild I get this output: 1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\Microsoft.Common....

How to run the build definition in .net core 1.0

We are using .net core 1.0 for developing and building the projects. I want to automate the build process so I have created the build definition. In build definition I have provided all the required ...

How to build .sqlproj so that it can generate .dacpac file

I am trying to build .sqlproj file so that it can generate .dacpac file and I can upload that on the nuget server. Now one problem is that I donot know what things you need from my side that I can ...

How to write a custom task to get project dependencies using MSBuild?

I want to get all the project dependencies of a particular .proj file in a list format. For that, I wrote a custom task, hooking it to the MSBuild target file. How do I calculate the dependencies ...

WARN: Protobuf file not found, when using SonarQube

I'm just getting started with SonarQube and it does run so far. The IT department has set up SonarQube 6.2 for our Team Foundation Server and I have installed and configured the msbuild scanner on my ...

How to debug a project file in MSBuild 14.0 / VS2015?

How to debug a project file in MSBuild 12.0 / VS2013? has an answer, but apparently that method is not supported in Visual Studio 2015/MSBuild 14. Does anyone know a way to perform MSBuild debugging ...

Include source files of package in .NET Core MSBuild

In a project.json based project I was able to reference (source) files in a nuget package quite easily. I just added the following to project.json, and I could reference the classes in my code. Even ...

C# Project Build Failure in Jenkins

I have MSBuild configured on a Jenkins instance to build the C# projects. the projects without any namespace in the project name, builds successfully whereas any project with a space in its name like "...

Including Native binaries from Nuget in Azure package programmatically

My project uses Microsoft.TeamFoundationServer.ExtendedClient 15.112.0-preview. This package includes a few unmanaged binaries, and a .target file that copies them to the output dir: <Target Name="...
Translating... 0%