msbuild

How do I specify the platform for MSBuild?

烈酒焚心 提交于 2020-02-09 06:31:11
问题 I am trying to use MSBuild to build a solution with a specified target platform (I need both binaries, x86 and x64). This is how I tried it: C:\WINDOWS\Microsoft.NET\Framework\v3.5>MsBuild SolutionPath\Solution.sln /t:Rebuild /p:Configuration=Release /p:Platform="x86" However the build always fails if the platform is different from "Any CPU". What am I doing wrong? This is the while output MSBuild prints: C:\WINDOWS\Microsoft.NET\Framework\v3.5>MsBuild SolutionPath\Solution.sln /t:Rebuild /p

How to find out exactly why Visual Studio 2019 rebuilds unmodified .NET Core projects

╄→гoц情女王★ 提交于 2020-02-07 03:35:29
问题 I'm building a solution containing .NET Standard 2.0 and .NET Core 2.0 projects (C# and F#) in VS2019 (16.1.1). If I build multiple times without changes the second and subsequent builds should say "Build: 0 succeeded, 0 failed, X up-to-date", but it sometimes rebuilds some projects every time. How do I find out exactly why? There are many SO questions and blog posts about this, most of them suggesting setting the build log verbosity to "Diagnostic" and looking for "not up to date". I've done

Mark an assembly CLSCompliant in csproj

流过昼夜 提交于 2020-02-05 04:01:46
问题 In a reply of this question is explained how to set InternalsVisibleTo in csproj . I presumed this worked also for CLSCompliant : <ItemGroup> <AssemblyAttribute Include="System.CLSCompliant"> <_Parameter1>true</_Parameter1> </AssemblyAttribute> </ItemGroup> But is not! MSBuild complains that true can't be converted to from string to bool : > dotnet build Microsoft (R) Build Engine version 16.4.0+e901037fe for .NET Core Copyright (C) Microsoft Corporation. All rights reserved. Restore

MSBuild cant find resgen.exe

北慕城南 提交于 2020-02-04 20:41:10
问题 I have a VM machine where I copied over the SDK files and path, went to the registry and added the keys to the registry, but I keep getting the error that resgen.exe cannot be found: C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1835,9): error MSB3091: Task failed because "resgen.exe" was not found, or the correct Microsoft Windows SDK is not installed. The task is looking for "resgen.exe" in the"bin" subdirectory beneath the location specified in the Installation

Where is the TFS build process going?

送分小仙女□ 提交于 2020-02-04 01:34:09
问题 Im having a hard time figuring out what the best approach is when designing my build process. It seems Microsoft have turned things around (again). I am using TFS 2015 and Visual Studio 2015. For earlier versions of TFS I have normally created custom code activities that I plug in to my build definition process file (xaml). I like this approach because it gives me great flexibility and enables me to code .NET classes. I used these guides: https://msdn.microsoft.com/en-us/library/dd647551(v=vs

Visual Studio asks me to reference a nonexistent assembly

爱⌒轻易说出口 提交于 2020-02-03 03:16:45
问题 I somehow brought my project to a state where Visual Studio 2013 fails to compile it with a ridiculous error: The type 'System.Collections.Generic.Dictionary`2' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Collections, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. First of all, there is no such assembly, it does not exist . Second, Dictionary<TKey, TValue> is defined in mscorlib.dll , which is referenced by default, of

Visual Studio asks me to reference a nonexistent assembly

蓝咒 提交于 2020-02-03 03:16:26
问题 I somehow brought my project to a state where Visual Studio 2013 fails to compile it with a ridiculous error: The type 'System.Collections.Generic.Dictionary`2' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Collections, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. First of all, there is no such assembly, it does not exist . Second, Dictionary<TKey, TValue> is defined in mscorlib.dll , which is referenced by default, of

The SonarQube MSBuild integration failed - SonarQube 7 with Scanner 4.0.2.892 and VS2017

天大地大妈咪最大 提交于 2020-02-02 14:08:46
问题 I'm using SonarQube 7.0 and SonarQube Scanner for MSBuild 4.0.2.892 and attempting to follow these instructions to scan my .NET application on Windows (ASP.NET Core). The three commands below are part of the instructions: C:\SonarQube\Scanner\SonarQube.Scanner.MSBuild.exe begin /k:"org.sonarqube:sonarqube-scanner-msbuild" /n:"TradingPlatform" /v:"1.0" "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\MSBuild.exe" /t:Rebuild C:\SonarQube\Scanner\SonarQube.Scanner

.NET project with project.json cannot be built

柔情痞子 提交于 2020-02-02 06:22:51
问题 I have .net app, and I am trying to migrate from packages.config to project.json . Everything works fine when I build the project with Vs 2015 or manually using MsBuild from a command line. The problem starts to happen when I build it on build server with the setup: .NET 4.51 app MSBuild 14.0.25402.0 Windows Server 2012 Microsoft Build Tools 2013, 2015 RC installed. No Visual Studio installed. Nuget 3.4.3.855 When doing nuget restore project.lock.json is being created, packages are downloaded

Why doesn't AutogenerateBindingRedirects work for a Web.config in Visual Studio 2017

一世执手 提交于 2020-02-01 17:39:13
问题 I have a reference to a .Net Standard 2.0 library that requires Microsoft.AspNet.WebApi.Client 5.2.4. This has a lot of dependencies that need to be redirected to use newer versions. To avoid package/dependency explosion I've updated the first PropertyGroup in the csproj file: <RestoreProjectStyle>PackageReference</RestoreProjectStyle> <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects> <GenerateBindingRedirectsOutputType>true</GenerateBindingRedirectsOutputType> I'm expecting