msbuild

Azure DevOps - conditional package restoration

限于喜欢 提交于 2021-02-08 04:32:12
问题 A solution that is built via Azure DevOps pipeline has some projects that use conditional package references such as: <Choose> <When Condition="'$(Configuration)'=='Debug'"> <ItemGroup> <PackageReference Include="Mock.MyPackage" Version="1.0.0" /> </ItemGroup> </When> <Otherwise> <ItemGroup> <PackageReference Include="MyPackage" Version="1.2.0" /> </ItemGroup> </Otherwise> </Choose> The package source is a private NuGet feed. The dotnet restore task does not respect the conditional package

Suppress .codeanalysislog.xml and .lastcodeanalysisuccceeded files from getting dropped

做~自己de王妃 提交于 2021-02-07 18:17:46
问题 Is there a way I can suppress .codeanalysislog.xml and .lastcodeanalysisuccceeded from getting dropped in my output directory on build? 回答1: I agree, the bin folder is bad place for these FxCop files. However suppressing these files from getting generated, or deleting them unconditionally after the build is not the best decision. First, removing .lastcodeanalysissucceededd will cause code analysis re-run even when nothing has changed. Second, removing .CodeAnalysisLog.xml will make it almost

MSBuild output missing javascript files compiled by Typescript

倖福魔咒の 提交于 2021-02-07 17:56:49
问题 We use MSBuild on our CI server to compile our WebApp, however the build omits the JavaScript files built by TypeScript from the output of the build. I would expect the output to contain the JavaScript and not the Typescript, however neither are in the output at the expected locations. How can I include the JavaScript files without having to have them all in my solution? The TypeScript team seems to think this is bad, but I would rather not have duplicates of all the files in my solution

MSBuild output missing javascript files compiled by Typescript

纵然是瞬间 提交于 2021-02-07 17:55:23
问题 We use MSBuild on our CI server to compile our WebApp, however the build omits the JavaScript files built by TypeScript from the output of the build. I would expect the output to contain the JavaScript and not the Typescript, however neither are in the output at the expected locations. How can I include the JavaScript files without having to have them all in my solution? The TypeScript team seems to think this is bad, but I would rather not have duplicates of all the files in my solution

CMake & Visual Studio: How to get a quick, quiet command line build?

Deadly 提交于 2021-02-07 14:24:16
问题 I've got a cmake project that successfully does everything that I want. But I've got about 100 files, and I tire of seeing the huge output that is generated, 30 lines per file every time when I only need to recompile a single file. To be clear, I'm compiling cmake --build . to get this result. What is the parameter that I need to pass to the compiler (or MSBuild) to skip the printing that it checked the unchanged files? Compiling the project inside Visual Studio doesn't create all of this

Setting environment variables in Jenkins with a bat file?

浪子不回头ぞ 提交于 2021-02-07 14:20:55
问题 Currently I have a batch file that sets all the environment variables needed before starting the build process. It's a must to use the same bat for setting the env variables. I tried to use EnvInject Plugin, didn't have any success. Also tried "Execute Windows batch command" before running msbuild. e.g. start mybat.bat - this didn't seem to work either How can I integrate the same bat file to set the variables? 回答1: Each Jenkins "build step" has it's own environment, I explained this in

Incrementing Delphi XE project version number from command line

回眸只為那壹抹淺笑 提交于 2021-02-07 13:47:57
问题 I have a Delphi XE project and I'm trying to change the version number of the program before building it with MSBuild. Version number information is located in the DPROJ file but if I change these values the version number does not change. I think the reason for this is that when you change version number in the IDE, Delphi saves the changes to both DPROJ and RES files. Is there a way to compile the RES file from the command line with the changes in DPROJ file? I found this question which

The reference assemblies for framework .NETCore, Version=v5.0 were not found

懵懂的女人 提交于 2021-02-07 12:29:24
问题 I have a UWP project that was created using Visual Studio 2017. It builds fine on this machine (machine 1). However, when I copy the project over to a machine (machine 2) where I only have the Visual Studio 2017 Build Tools installed, and attempt to build it using MSBuild, I get the following error: C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets (1126,5): error MSB3644: The reference assemblies for framework ".NETCore

Build “*.DTPROJ” - SSIS on the build server with devenv.exe (Visual Studio 2012)

荒凉一梦 提交于 2021-02-07 08:16:24
问题 I'm trying to build a SSIS project (*.dtproj) with Visual Studio 2012 on the build server. As far as I know there's no support to build this kind of project directly using MSBuild. However my thinking is that if I can build it using the Visual Studio 2012 IDE locally, I would be able to build it using the Visual Studio command line (calling devenv.exe/devenv.com) directly from a command line on the build server But I have tried so many combinations and I have not been able to find anything

Override a nuget package reference with a local project reference

久未见 提交于 2021-02-07 06:47:41
问题 I'd like iterate on a nuget package without continuously pushing the package to a nuget feed. I'm wondering if it's possible to conditionally add a project reference instead of a nuget package reference via a target or props file in csproj files that would allow me to locally debug my nuget package. In my csproj I would have: <Reference Include="A"> if(Exists(localOverrides.props) { <HintPath>localOverrides.A.HintPath</HintPath> } else { <HintPath>..\packages\A.dll</HintPath> } </Reference>