msbuild

Build and test with TeamCity and Fakes Framework

痞子三分冷 提交于 2019-12-13 13:12:28
问题 We are running a TeamCity 8.1.4 buildserver with VS2013 installed on the machine. I've recently introduced tests which rely on the Microsoft Fakes Framework. Because of this I had to add some references to the new Fake assemblies and the Microsoft.VisualStudio.TestTools.UnitTesting assembly. This all runs fine on my local development machine. Now, when I try to build the solution on the TeamCity server, the following errors are thrown: SomeDirectory\Processors\ProcessorTests.cs(3, 27): error

How can i execute sqlite (sqlite3) statements in MSBUILD, the Exec Task?

≡放荡痞女 提交于 2019-12-13 12:31:17
问题 I am trying to run some queries on my sqlite database after building my application. I have tried; <Exec Command='sqlite3 "@(DeployedSqliteDbPath) DELETE FROM BatchConfig";'/> and <Exec Command='sqlite3 "@(DeployedSqliteDbPath)";'/> <Exec Command='sqlite3 "DELETE FROM BatchConfig";'/> But it doesn't seem to work. Can someone help? 回答1: This worked; <Exec Command='sqlite3 "@(DeployedSqliteDbPath)" "DELETE FROM BatchConfig;"'/> 来源: https://stackoverflow.com/questions/29846013/how-can-i-execute

MSBuild vs compiler

那年仲夏 提交于 2019-12-13 12:23:35
问题 What is the difference between using MSBuild and the C# compiler from a command prompt? I want to manually build my solutions/projects without using Visual Studio and I want to learn how to use the command line tools. 回答1: By C# compiler do you mean csc.exe ? If that is what you mean, then csc and MSBuild are completely different applications. MSBuild uses a solution and project files to build the files in your project. MSBuild uses csc.exe as its actual compiler but knows where to find

Publishing my asp.net mvc application via script and not Visual Studio

别等时光非礼了梦想. 提交于 2019-12-13 12:14:16
问题 I dont really know much about this to be honest with you... I have managed to download mscommunity build and I have managed to use the script below to successfully compile and build my application, however I want to get my asp.net mvc application "published" so I want the same files that you when clicking "publish" inside visual studio. My current build file looks like this: <?xml version="1.0" encoding="utf-8"?> <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer

MSBuild and package restore with packages.config

牧云@^-^@ 提交于 2019-12-13 12:14:09
问题 Sorry if this question has been answered before, but I just cannot seem to find an answer: Is it possible to restore packages during the build using MSBuild only if projects are still using packages.config? 回答1: As far as I can read on https://docs.microsoft.com/en-us/nuget/consume-packages/package-restore it is possible: MSBuild: use the msbuild /t:restore command, which restores packages packages listed in the project file (PackageReference only). Available only in NuGet 4.x+ and MSBuild 15

MSBuild step in TeamCity considers app.config instead of web.config for ASP.NET WEB API project resulting in warning MSB3247

安稳与你 提交于 2019-12-13 12:06:54
问题 I have ASP.NET WEB API project with Web.conig file. When it builds in VS2015, no errors and no warnings are reported. However when I build this project on TeamCity using MSBuild build step, I get warning MSB3247: [ResolveAssemblyReferences] ResolveAssemblyReference [14:30:01] : [ResolveAssemblyReference] No way to resolve conflict between "protobuf-net, Version=2.0.0.602, Culture=neutral, PublicKeyToken=257b51d87d2e4d67" and "protobuf-net, Version=2.0.0.480, Culture=neutral, PublicKeyToken

MSBuild: Ensure a target is run before any other build steps

别等时光非礼了梦想. 提交于 2019-12-13 12:04:19
问题 I am trying to have the AssemblyInfo.cs file updated to reflect the next Publish version of the project BEFORE any other build steps occur. in my project file i added before the end: <Import Project="$(ProjectDir)Properties\PublishVersion.proj" /> PublishVersion.proj looks like this: <?xml version="1.0" encoding="utf-8"?> <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import

Microsoft.Web.WebJobs.Publish producing duplicate assemblies in deploy package

社会主义新天地 提交于 2019-12-13 11:45:13
问题 I have a large number of Azure WebJobs that all deploy to a single Azure App Service, along with a Website on the same Azure App Service. Each WebJob all use the WebJobs SDK and the Microsoft.Web.WebJobs.Publish nuget package (we are up-to-date with version 1.0.13) to package them up for deployment. The following are the MSBuild arguments we use in the CI build (VSTS) to produce the deploy package: /p:DeployOnBuild=true /p:PublishProfile=Release /p:WebPublishMethod=Package /p

Create NuGet Package using MSBuild and VS Team Services

走远了吗. 提交于 2019-12-13 09:33:45
问题 I am using visual studio 2015, from past few days I was trying to create nuget package that are hosted on Visual Studio Team Services (previously Visual Studio Online) and created every time a project is build, but with no success. Can someone please provide step by step intro to how to achieve this task. I am very thankful to you. 回答1: Following is a simple build definition to create nuget package and publish the package to VSTS hosted package service: Create a build definition in VSTS to

Compiling C# .Net from Command Line

帅比萌擦擦* 提交于 2019-12-13 09:10:18
问题 I'm trying to compile a c# .net project only using command line so that I could create a bat file to compile and run the Selenium tests. I exported the code from SVN. And I opened the command prompt and am able to restore packages using below command. And then when I try to compile with msbuild it could not reference the dll added in through the nuget. I know in visual studio through package manager console I can use a command (update -reinstall) and make it work, but how to do this without