msbuild

Post-build event copy not working

谁说我不能喝 提交于 2020-01-15 09:14:11
问题 I have a post-build event to copy a .dll from one project to another on successful build using the following command: copy $(TargetPath) ....\MainProject\bin This works fine on my local machine, but it appears to be failing on the build server because when building the MainProject I receive the following: warning MSB3245: Could not resolve this reference. Could not locate the assembly "Project2". Check to make sure the assembly exists on disk. If this reference is required by your code, you

Change assembly name for build settings in .csproj

落花浮王杯 提交于 2020-01-15 08:59:08
问题 I have an application which I want to publish with ClickOnce via command line. I have a test and a live version. It should be allowed to have both installed at the same time, which means that I need to change the assemble name (and preferably also the product name) for one of the builds. I would like to do this in the build settings. I have managed to make some build settings, which works fine, but I cannot figure out how to change the assembly and product name, for just one of them. I have

Custom build action properties in a Visual Studio C# project

*爱你&永不变心* 提交于 2020-01-15 07:15:52
问题 In a Visual Studio C++ project I can define custom build actions and corresponding property rules (see cl.xml under the MSBuild folder). How can I create such a rule for a custom build action in a C# project? Under the MSBuild folder there's a the file Microsoft.CSharp.CurrentVersion.targets which references CSharp.ProjectItemsSchema.xaml , CSharp.xaml and CSharp.BrowseObject.xaml which looks exacltly like the definitions I need. Using procmon I can see that these files are not accessed at

Can I include a .targets file in a .props property sheet?

孤人 提交于 2020-01-15 07:12:27
问题 I'm developing in C++ using Visual Studio 2012; I have about 25 projects in a solution that all use the same property sheet ( .props file). I now need every project that uses said props file to also use a specific .targets file. Instead of editing each of the 25 .vcxproj files to add an import tag (or adding the import via the GUI for each project), I'd like to put an import statement in the .props file they all already use. Is this even possible? I've tried adding the import statement that

TFS 2010 msbuild overwrites different versions of referenced library in output directory

南笙酒味 提交于 2020-01-15 06:19:07
问题 I'm building Web project using TFS 2010. The project contains Silverlight client and .NET/C# server side. Both of these (client and server) are referencing one 3rd party library for which we have Silverlight and .NET version, but both versions use the same name. The problem is that msbuild with outdir property specified puts all the libraries to one flat hierarchy in output directory so one library overwrites the other. I know that one solution would be to modify build template and not

TFS 2010 msbuild overwrites different versions of referenced library in output directory

旧街凉风 提交于 2020-01-15 06:18:47
问题 I'm building Web project using TFS 2010. The project contains Silverlight client and .NET/C# server side. Both of these (client and server) are referencing one 3rd party library for which we have Silverlight and .NET version, but both versions use the same name. The problem is that msbuild with outdir property specified puts all the libraries to one flat hierarchy in output directory so one library overwrites the other. I know that one solution would be to modify build template and not

MSBuild to run unit tests

早过忘川 提交于 2020-01-15 05:55:07
问题 I am trying to configure CruiseControl .net to build our repository code periodically and run the tests included in the solution. I have configured the retrieving code from the svn server and building part. But I am unable to run tests on it. MSBuild keeps on complaining that. error MSB4057: The target "Test" does not exist in the project. I also tried running the tests through command line to see if that works with the same error. I used: MSBuild.exe TestProject.csproj /t:Test My

How to handle and include headers and libraries for building a Visual Studio 2010 solution on different machines

橙三吉。 提交于 2020-01-15 05:01:06
问题 I have a Visual Studio 2010 solution, that needs to include 4 different third party libraries and headers. These third party dependencies are installed separately before being included. So the include paths for headers and libraries are different on different machines. Now, what I want to have is to have my solution built by different developers on different machines to have the dependencies included with these tools' path include with minimum work and more smoothly. I have come across the

c# - How can I programmatically check that a reference is configured correctly in a solution

丶灬走出姿态 提交于 2020-01-15 03:41:08
问题 We are having some build errors and we need to manually fix the references. I would like to programmatically check that project references are defined instead of dll references: Thus go over all the references in a solution and for each project, check that the references are defined correctly. This way the relevant dependencies will be configured correctly. Does anybody know of an existing solution? I would like a validation tool that will run before the gated check-in. 回答1: I have written

MSBuild cannot find reference when executed through TFS build service

点点圈 提交于 2020-01-15 02:34:27
问题 I have a solution with reference to Telerik assemblies. The referenced version has been installed on the build server. The issue is that the continuous integration build always succeeded until I upgraded the Telerik assemblies in the solution and on my build server. The build now fails giving the classical: Could not resolve this reference. I checked my solution and everything is set to reference the specific version. The most suprising is that if I open the solution locally on the build