Before building C# app with mono compiler we need to change one .sln file: place additional <Reference> tag after exists. On non-production server this can be done via sed:
sed -i 's/<Reference Include="System" \/>/<Reference Include="System" \/> <Reference Include="Mono.Posix" \/>/' Infrastructure.Common/Infrastructure.Common.csproj
But when same code placed in bamboo task script, editor changes it into these strange text:
sed -i 's/<Reference Include="System" \></Reference>/<Reference Include="System" \></Reference> <Reference Include="Mono.Posix" \></Reference>/' Infrastructure.Common/Infrastructure.Common.csproj
As a result, build fails. Is there a way to change it's behavior, or we don't can use sed in build scripts?
Hello :)
If for some reason when you put your code on bamboo task script it complains about the "/", you could try to create a small script to do the changes on your .sln file and make bamboo call it, as workaround. For example:
#!/bin/bash sed -i 's/<Reference Include="System" \/>/<Reference Include="System" \/> <Reference Include="Mono.Posix" \/>/' Infrastructure.Common/Infrastructure.Common.csproj
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.