msbuild

Visual Studio 2013 and MSBuild command line switches

☆樱花仙子☆ 提交于 2020-01-06 02:33:27
问题 Is there a way to specify msbuild switches like /p:option=value within Visual Studio 2013? 回答1: Formalizing my comment from above. A possible solution may be to have a targets file (e.g. VisualStudioOverrides.targets ) that defines the properties to be overridden and their values. Then, if this file exists then the csproj file will import it, thus override the relevant properties. Such an import statement should be placed at the bottom of the csproj file (after the properties to be overridden

What might cause MSBuild to behave differently from machine-to-machine?

南笙酒味 提交于 2020-01-05 17:47:55
问题 I have a C# program (not ASP.NET or even web-related) with platform AnyCPU targeting .NET v3.5 that references a 32-bit third-party .dll. Unfortunately, I also have several "work of art" build machines in our CI pipeline that build this program. I'm trying to add another one but I can't figure out what allows it to build. Whenever I try to build on this new machine, I get LC : error LC0000: 'Could not load file or assembly 'ASSEMBLY' or one of its dependencies. An attempt was made to load a

What might cause MSBuild to behave differently from machine-to-machine?

喜夏-厌秋 提交于 2020-01-05 17:47:08
问题 I have a C# program (not ASP.NET or even web-related) with platform AnyCPU targeting .NET v3.5 that references a 32-bit third-party .dll. Unfortunately, I also have several "work of art" build machines in our CI pipeline that build this program. I'm trying to add another one but I can't figure out what allows it to build. Whenever I try to build on this new machine, I get LC : error LC0000: 'Could not load file or assembly 'ASSEMBLY' or one of its dependencies. An attempt was made to load a

MSBuild, Extension Pack and TfsVersion

冷暖自知 提交于 2020-01-05 14:11:32
问题 I am trying to implement what I see in this post: TFS and msbuild version number with last changeset. That is, I am trying to get the last Changeset number at build time so I can use it in an AssemblyVersionInfo.cs. I am using VS 2008 and TFS 2008. I have installed MSBuild Extension pack v3.5.9.0 (x64). It is in C:\Program Files\MSBuild\ExtensionPack. Here is my MSBuild project: <Project ToolsVersion="3.5" DefaultTargets="Default" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

MSBuild, Extension Pack and TfsVersion

穿精又带淫゛_ 提交于 2020-01-05 14:11:28
问题 I am trying to implement what I see in this post: TFS and msbuild version number with last changeset. That is, I am trying to get the last Changeset number at build time so I can use it in an AssemblyVersionInfo.cs. I am using VS 2008 and TFS 2008. I have installed MSBuild Extension pack v3.5.9.0 (x64). It is in C:\Program Files\MSBuild\ExtensionPack. Here is my MSBuild project: <Project ToolsVersion="3.5" DefaultTargets="Default" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

TextTransform on MSBuild only when file modified? (or an alternate route of doing this)

无人久伴 提交于 2020-01-05 13:09:31
问题 I have a project that integrates TextTransform with MSBuild, but I am now at the point that the files are too many and it is slowing down development time. The process that I have is, I have a POCO.cs; I use Roslyn to Parse the .cs file to gather some metadata; hand the metadata to a .tt file that will then generate a [Implementation].cs Here is part of the .csproj file that pertains to my question: <PropertyGroup> <_CommonProgramFiles>$([System.Environment]::GetEnvironmentVariable(

TextTransform on MSBuild only when file modified? (or an alternate route of doing this)

南楼画角 提交于 2020-01-05 13:08:59
问题 I have a project that integrates TextTransform with MSBuild, but I am now at the point that the files are too many and it is slowing down development time. The process that I have is, I have a POCO.cs; I use Roslyn to Parse the .cs file to gather some metadata; hand the metadata to a .tt file that will then generate a [Implementation].cs Here is part of the .csproj file that pertains to my question: <PropertyGroup> <_CommonProgramFiles>$([System.Environment]::GetEnvironmentVariable(

Cannot determine the location of the VS Common Tools folder

给你一囗甜甜゛ 提交于 2020-01-05 10:09:45
问题 I have a batch file that calls MSBuild and builds three Visual Studio solutions: call "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" MSBuild solution0.sln /property:Configuration=Release MSBuild solution1.sln /property:Configuration=Release MSBuild solution2.sln /property:Configuration=Release This works fine. However, I want to prompt the user to select a version of the program to build. Depending on the user input we build a particular set of solutions. My problem is

C# wrapper library around unmanaged DLL requires unmanaged DLL to be in same directory during build

末鹿安然 提交于 2020-01-05 07:19:06
问题 Usually when referencing a managed DLL that wraps an unmanaged DLL with PInvoke, you have to reference those two DLLs separately - the managed one as a standard <Reference/> in your csproj and the unmanaged one as linked <content/> (as outlined here). However, I recently came across a managed wrapper library which not only auto-copies the unmanaged DLL along with it during the build, but actually produces a build error when the unmanaged DLL is not present in the same directory! This is the

project.assets.json not found with msbuild

◇◆丶佛笑我妖孽 提交于 2020-01-05 06:23:06
问题 I have an ASP.NET Core application that i wish to build on a jenkins machine with MSBuild 15. When i try to build i get the following error: C:\Program Files\dotnet\sdk\2.1.502\Sdks\Microsoft.NET.Sdk\targets\Microsoft.PackageDependencyResolution.targets(198, 5): error NETSDK1004: Assets file 'C:\sync\Src\Util\myUtil\ob j\project.assets.json' not found. Run a NuGet package restore to generate this file I understand that i need to do nuget restore somehow, but i failed to make it work. My build