msbuild

How to leverage multicore CPUs when compiling C# projects in a large solution?

馋奶兔 提交于 2019-12-22 05:05:05
问题 As far as I know, VS2008/MSBuild do not suport multithreaded compilation of C# projets. I don't know if VS2010 supports it. Do you know a 3rd party product or an open source projet that does that? 回答1: Indeed MSBuild does support multiple cores; though it's a bit of a hack with some limitations. It's easier from the commandline. Likewise, some build servers (teamcity is one if I recall) can have build runners on multiple machines to further reduce build times. 来源: https://stackoverflow.com

How do you stop MSBuild execution without raising an error?

旧街凉风 提交于 2019-12-22 04:56:22
问题 With MSBuild, as soon as an error occurs, the execution of the project is stopped unless ContinueOnError=true . Is there a way to stop the execution of the project without raising an error? I'd like to have this possibility because I have an existing set of msbuild project files and in some circumstances, I would need to stop processing the projects without raising an error because it is a normal exit point for the process and I don't want the person using the script to think something is

How do I change target filename in NuGet Package?

帅比萌擦擦* 提交于 2019-12-22 04:51:09
问题 JavaScript naming convention requires version number in the file name such as jQuery.1.34.min.js , and I have text template which will output my-library.js in output folder. I want to create NuGet Package with my-library.js in such way that on installation it should be deployed as my-library.1.34.js If I build nuget package as part of msbuild process, there is no way I can rename my output js file. I already have a long workaround, in which I have a console app which copies files to folder

NuGet Pack: ignore default includes

点点圈 提交于 2019-12-22 04:49:07
问题 This is the opposite problem from what I usually read about, which is people trying to get files included in the NuGet package. I'm trying to stop file from being included automatically. I'm creating a library of pre-compiled MVC view templates (using RazorGenerator.Mvc), .less files, and JavaScript to support these as needed. The idea is that these are basic things that go into all of our sites. By default, nuget pack includes any files marked Build Action: Content in your project, which any

Supporting multiple versions of NuGet package in one library / NuGet package

谁都会走 提交于 2019-12-22 04:43:26
问题 What I want I want my library to work with a range of versions of a NuGet package with breaking changes in API between the changes. I haven't investigated it further, but this path looks promising: Reference all versions of the library with different APIs by specifying extern namespace aliases. Create proxies for the needed classes, with flags/exceptions/whatever to tell what's actually supported. Choose the correct proxy at runtime depending on what version is actually loaded into the

Supporting multiple versions of NuGet package in one library / NuGet package

走远了吗. 提交于 2019-12-22 04:43:04
问题 What I want I want my library to work with a range of versions of a NuGet package with breaking changes in API between the changes. I haven't investigated it further, but this path looks promising: Reference all versions of the library with different APIs by specifying extern namespace aliases. Create proxies for the needed classes, with flags/exceptions/whatever to tell what's actually supported. Choose the correct proxy at runtime depending on what version is actually loaded into the

TFSBuild/MSBuild and Project Reference vs File Reference

人盡茶涼 提交于 2019-12-22 04:42:35
问题 We Have a large VS solution using project references which is build by TFS Build like so: Solution - Project 1 - Project 2 - Project ... - Project N Because the solution is too large we have several smaller solutions which we use day to day: SubSolution - Project 1 - Project 19 The problem is that developers working on SubSolution find that it is not building because the project references could not be found, so they change the projects to use file references. This then goes on to break the

TFSBuild/MSBuild and Project Reference vs File Reference

孤者浪人 提交于 2019-12-22 04:42:02
问题 We Have a large VS solution using project references which is build by TFS Build like so: Solution - Project 1 - Project 2 - Project ... - Project N Because the solution is too large we have several smaller solutions which we use day to day: SubSolution - Project 1 - Project 19 The problem is that developers working on SubSolution find that it is not building because the project references could not be found, so they change the projects to use file references. This then goes on to break the

Build error when signing with snk key

耗尽温柔 提交于 2019-12-22 04:38:25
问题 Build error is occurring since using Visual Studio 2015. When building in Visual Studio 2015 this is occurring rarely. When building in TeamCity this occurs very often. [Error in Visual Studio 2015] Error extracting public key from file 'CompanyName.snk': The process cannot access the file 'C:\Users\UserName\AppData\Local\Temp\tmp2FF6.tmp' because it is being used by another process. CompanyName.Project.DAL D:\Projecten\CompanyName\Repository\Source\Components\CompanyName.Project.DAL\vbc http

How to use MSBuild to build a Visual Studio Setup Project

佐手、 提交于 2019-12-22 04:35:34
问题 I am trying to use MSBuild to build a Visual Studio Setup Project using the article below: http://msdn.microsoft.com/en-us/library/ms404859.aspx I have followed all the steps mentioned in the article above with the exception of not using TFS in this case. Instead of using the TFS option, I am trying to create a Demo.proj file and have included the below details: ** - Demo.proj** <?xml version="1.0" encoding="utf-8"?> <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">