An easy-to-use collection of MS Build tasks to help improve your build process.
StartWebProjectTask: when you need to start some one of your web projects during the build process (useful to generate some client library for your web apis).
Resources2JSTask: serialize resource files with localized labels to JS files.
Follow the steps below to put EasyBuild on your solution. On Step 3 you can choose just the tasks you want to use.
Build the EasyBuild, put his assembly and dependencies assemblies in a folder on your solution, let me say "references\EasyBuild"
If you don't jhave a folder to your msbuild files, just create one "msbuilds" folder on your solution root folder.
Create a file called StartMyWebProject.targets on your msbuilds folder:
<Project ToolsVersion="4.0" DefaultTargets="BeforeBuild" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <UsingTask TaskName="StartWebProjectTask" AssemblyFile="..\references\EasyBuild\EasyBuild.dll"/> <Target Name="BeforeBuild"> <Message text="Starting MyWebProject..." /> <StartWebProjectTask projectFolderName="MyWebProject" port="8181" /> <Message text="MyWebProject started." /> </Target> </Project>
Create a file called .Resources2JSTask.targets on your msbuilds file folder (if you don't have one, create one "msbuilds" on your solution root dir):
<Project ToolsVersion="4.0" DefaultTargets="BeforeBuild" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <UsingTask TaskName="Resources2JSTask" AssemblyFile="..\references\EasyBuild\EasyBuild.dll"/> <Target Name="AfterBuild"> <Message text="Starting Resources2JSTask..." /> <Resources2JSTask assemblyFileName="..\<YOUR PROJECT WITH RESOURCE FILE>\bin\$(configuration)\<YOUR PROJECT WITH RESOURCE FILE>.dll" serializationFolder="..\<YOUR WEB PROJECT>Scripts\Framework\Globalization" serializationFilename="<YOUR DESIRED FILE NAME>" cultureCodes="pt,es,en" defaultCultureCode="en" /> <Message text="Resources2JSTask done." /> </Target> </Project>
Edit the target project file that you want use the task, and add the following line bellow the "Microsoft.CSharp.targets" one:
<Import Project="..\msbuilds\<your msbuild.targets file>" />
Build your target project to see the task in action.
- Ask on Stack Overflow
- Add others tasks.
- Publish a NuGet package.
How to improve it?
Licensed under the The MIT License (MIT). In others words, you can use this library for developement any kind of software: open source, commercial, proprietary and alien.