msbuild

Msbuild and SVN update

懵懂的女人 提交于 2020-01-29 14:28:23
问题 I want to write a simple task which will update and commit source code that was Nightly build to SVN. I was on the msbuildtasks.tigris.org page, and downloaded the dll's but I have no idea how to write it. Could you please provide some basic samples? 回答1: Here is an example (taken from the MSBuild Community Tasks Build) that does exactly that: <ItemGroup> <CommitFiles Include="www\index.html" /> <CommitFiles Include="www\MSBuild.Community.Tasks.Nightly.zip" /> <CommitFiles Include="www

how do I execute cmd.exe process only once and in foreach pass commandText?

扶醉桌前 提交于 2020-01-25 20:57:28
问题 I want to execute process of cmd.exe only once outside foreach and inside foreach want to send parameters to this process. I am currently doing this: var msbuildPath = (string) regKey.GetValue("MSBuildToolsPath"); foreach (var item in listBox1.Items) { var FilePath = item.ToString(); var startInfo = new ProcessStartInfo() { WindowStyle = ProcessWindowStyle.Hidden, Arguments = String.Format("\"{0}\" /nologo ", FilePath), FileName = Path.Combine(msbuildPath, "msbuild.exe") }; var proc = Process

Treat Warnings as Errors using SonarQube Analysis

你离开我真会死。 提交于 2020-01-25 09:22:26
问题 I have been trying to make my solution fail to build on Visual Studio Team Services when there are warnings. I have enabled the option in the project in VS2017 to treat warnings as errors, so that it won't build. Treat warnings as errors set to All Also, there is a MsBuild argument for the same purpose set to true on VSTS. Treat warnings as errors set to true This works, as when there is a warning it is treated as error (Eg. an unused int is a warning and becomes an error, failing the build).

How to copy and rename file to output folder as part of build

喜夏-厌秋 提交于 2020-01-25 08:56:05
问题 I believe this is more of an msbuild-related question. Have a .net core app and I need to conditionally publish a file and based on the build config selected in Visual Studio 2019, the file should be renamed before publishing to the target. So Im looking at modifying the csproj file (which is nothing but an msbuild file itself) I dont see a condition option on the copy task https://docs.microsoft.com/en-us/visualstudio/msbuild/copy-task?view=vs-2019 The goal Im after, is if I have 3 different

My Visual Studio 2019 WPF app is setting a dll as the output when it should be an exe

南楼画角 提交于 2020-01-25 06:49:34
问题 This is my first time trying to make a deployable program. After creating a nice little WPF XAML app that runs (i.e. I can run the executable in the bin folder), I am trying to wrap it in a setup program. After following multiple directions online for both WiX and "Microsoft Visual Studio Installer Projects". Both make installer packages, but they are only targeting the dll file from the WPF XAML output when I as for the "Primary Output". It seems this is stemming from the build of the WPF

My Visual Studio 2019 WPF app is setting a dll as the output when it should be an exe

房东的猫 提交于 2020-01-25 06:49:09
问题 This is my first time trying to make a deployable program. After creating a nice little WPF XAML app that runs (i.e. I can run the executable in the bin folder), I am trying to wrap it in a setup program. After following multiple directions online for both WiX and "Microsoft Visual Studio Installer Projects". Both make installer packages, but they are only targeting the dll file from the WPF XAML output when I as for the "Primary Output". It seems this is stemming from the build of the WPF

beforebuild target of all the projects are executing at first on solution build

冷暖自知 提交于 2020-01-25 06:43:09
问题 In our solution, I have two projects which contain a .tt file. My build order should be as follows > 1. project_A Template transform > 2. project_A Build > 3. Project_A resource DLL will be created in the post-build event. > 4. Project_B Template transform > 5. Project_B Build I am using the following target invocation in csproj file or both project, <Target Name="BeforeBuild"> <CallTarget Targets="Transform" ></CallTarget> </Target> In visual studio, each beforebuild target is called

Specify MSTest parameters in MSBuild

北战南征 提交于 2020-01-25 04:46:25
问题 I'm trying to prevent certain (MSTest) unit tests from being run on our build server. I'd really like to just add a TestCategory, and then specify: /category:"!RequiresLoginCredentials" But I'm not sure how to indicate that in the msbuild project file. The relevant section of the build file currently has: <ItemGroup> <!-- TEST ARGUMENTS If the RunTest property is set to true then the following test arguments will be used to run tests. Tests can be run by specifying one or more test lists and

Boilerplate project creation error

半城伤御伤魂 提交于 2020-01-25 04:01:08
问题 I have downloaded the boilerplate project available here Boilerplate I have made sure that VS 2015 is up to date. When trying to create a project (asp.net core MVC 6 (rc2) Boilerplate (also RC2))I get the error: The imported project "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\V14.0\Dotnet\Microsoft.DotNet.Props" was not found. Confirm that the path in the declaration is correect and that the file exists on Disk. I've checked the path and this isn't there, question is, what is it?

MsBuild and FxCop problems

♀尐吖头ヾ 提交于 2020-01-25 00:56:08
问题 I'm trying to make a build file to run with msbuild using cmd or jenkins build job. The structure of the project is the demo is here: www.saramgsilva.com/wp7/sarasilvademo.rar Now i have 3 diferents ways to run fxcop, but i have problems in all. 1) In cmd go to the root file and then run C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe .\SaraSilva.WP7.build /target:FxCop this show a error: exit with code 128 2) In cmd go to the root file and then run C:\Windows\Microsoft.NET