msbuild-task

MSBuild TFS Build Number

我怕爱的太早我们不能终老 提交于 2019-12-03 06:33:33
I have been using SVN for a little while now. recently on a project I am using TFS. With the builds I like to append/update the build version number on the project output. I do this on the masterpage so that it is clearly visible on the application. Since the application could be running on multiple machines, it is handy information on which verison are running. I achive this in SVN world as: <!-- Import of the MSBuildCommunityTask targets --> <Import Project="$(MSBuildExtensionsPath)\MSBuildCommunityTasks\MSBuild.Community.Tasks.Targets" /> <!-- to AssemblyInfo to include svn revision number

How can I use MSBuild Copy Task to Copy To Multiple Destination Folders?

蓝咒 提交于 2019-12-02 23:01:55
I'm trying to copy a folder recursively to multiple destination folders using MSBuild's Copy task. I've seen the following question which gave me a good start, but I must be missing something: Msbuild copy to several locations based on list of destination parameter? A snippet from my build file is below: <ItemGroup> <DeployPath Include="\\server1\path" /> <DeployPath Include="\\server2\path" /> </Item Group> <Target Name="Deploy"> <Message Text="%(DeployPath.Identity)" /> <Copy SourceFiles="@(ItemsToCopy)" DestinationFolder="%(DeployPath.Identity)\%(RecursiveDir)" /> </Target> When I run this,

MSBuild AfterBuild Step

假如想象 提交于 2019-12-02 10:02:56
I have added the following code to a VisualC++ 2010 .vcxproj file just inside the first <project> tag: <PropertyGroup> <PilotStationDirectory>\..\..\PilotStation\PilotStationApp\$(Configuration)</PilotStationDirectory> </PropertyGroup> <ItemGroup> <MySourceFiles Include="$(TargetName).dll;$(TargetName).lib;$(TargetName).pdb" /> </ItemGroup> <Target Name="AfterBuild"> <MakeDir Directories="$(PilotStationDirectory)" /> <Copy SourceFiles="@(MySourceFiles)" DestinationFolder="$(PilotStationDirectory)" /> <Message Text="###I AM HERE###" /> </Target> I have set the "MSBuild project build output/log

Build Error + Creating VSTO addin for excel 2010

你。 提交于 2019-12-01 05:32:37
问题 I try to create an excel add-in using VS 2010. When I create a new project Excel 2010 Addin, and try to compile the solution. I get an error which says. 'Error 1 The "FindRibbons" task could not be loaded from the assembly 'Microsoft.VisualStudio.Tools.Office.BuildTasks, 'Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a. Confirm that the '<UsingTask> declaration is correct, that the assembly and all its dependencies are 'available, and that the task contains a public class

MsBuild does not look in the good directory for custom task's second-level dependencies

你。 提交于 2019-11-30 20:59:39
I wrote a MsBuild Task : MyTask. In my solution, I have the Task project and others projects. MyTask references a project (say ProjA) which references third assemblies, say (dep1 and dep2). The projects all builds well and I have the outputs in one directory (Compil). In this directory i have all the dll's I want : MyTask.dll, ProjA.dll, dep1.dll, dep2.dll and others. In my MsBuild file i include the custom task assembly with : <UsingTask AssemblyFile="..\Compil\MyTask.dll" TaskName="CreateSitesCss" /> Then I call a task of the MyTask assembly. The call is well executed but MsBuild complains

How do you integrate ivy with MSbuild

大城市里の小女人 提交于 2019-11-30 20:04:10
What approach has worked well for you combining IVY + msbuild? Our goal is to integrate IVY into the C#/C++ build process for dependency resolution and publishing. We have tried adding it to custom tasks at the beginning and end of the build and we have tried wrapping the msbuild calls with ant+ apache-ant-dotnet. Other options might be gradle, buildr, rake. What do you use? Thanks Peter Most build technologies can use libraries found in a local directory. I'd suggest using the command-line ivy program to populate this, at the start of your build: java -jar ivy.jar -ivy ivy.xml -settings

MSBuild UsingTask Resolve References

﹥>﹥吖頭↗ 提交于 2019-11-30 17:05:58
I feel like I've fixed this before, but I can't remember how. I have a tasks file that looks like this (CustomTasks.tasks): <UsingTask AssemblyFile="CustomTasks.dll" TaskName="MyCustomTask"/> it references an assembly (namely Ionic.Zip.dll). Ionic.Zip.dll is not in the GAC (and I don't want it to be). It sits right next to my CustomTasks.dll. I have a directory called MSBuild one level up from my sln file which has CustomTasks.tasks, CustomTasks.dll and Ionic.Zip.dll in it. I have a csproj that references the tasks file and calls the custom task: <Import Project="$(ProjectDir)\..\MSBuild

MSBuild ITaskItem RecursiveDir metadata disappears

六月ゝ 毕业季﹏ 提交于 2019-11-30 15:50:25
问题 I have a custom MSBuild task, which processes a set of files and returns a modified subset of this. Basically, I just create a new ITaskItem array out of the input, skipping some items. However, the RecursiveDir metadata disappears when this result set is returned to MSBuild! It is still with the correct values at the end of my custom task's Execute() method but when I then try to use RecursiveDir in MSBuild, I find that it is empty! This is, of course, quite a problem! What should I do? Is

MSBuild, custom task to run custom tool to generate classes for linq to sql model?

穿精又带淫゛_ 提交于 2019-11-30 15:43:20
I have the following scenario. We use stored procedures to access the database and we use LiNQ 2 SQL to generate the classes or namely we use Unplugged LINQ to SQL Generator for this. It has been run as a custom tool but diffing the generated classes is a big pain in the neck. We would like to auto generate the classes but exclude it from version control so I set on the task of creating an msbuild task. Found this post and this post but I can't solve this one by myself. I added some code the task looks like the following: public class GenerateDesignerDC : Task { public ITaskItem[] InputFiles {

MSBuild ITaskItem RecursiveDir metadata disappears

一个人想着一个人 提交于 2019-11-30 15:33:37
I have a custom MSBuild task, which processes a set of files and returns a modified subset of this. Basically, I just create a new ITaskItem array out of the input, skipping some items. However, the RecursiveDir metadata disappears when this result set is returned to MSBuild! It is still with the correct values at the end of my custom task's Execute() method but when I then try to use RecursiveDir in MSBuild, I find that it is empty! This is, of course, quite a problem! What should I do? Is this normal? The other metadata such as Filename and Extension is still there. Identity also points to