<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-3751536522056277247</id><updated>2012-01-11T11:43:55.982Z</updated><category term='crm'/><category term='delphi'/><category term='IT'/><title type='text'>Jamie's Software Development Blog</title><subtitle type='html'>A blog about software development and stuff</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://jamie-rorrison.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3751536522056277247/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://jamie-rorrison.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Jamie</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>3</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-3751536522056277247.post-6224098899711593175</id><published>2012-01-03T21:15:00.002Z</published><updated>2012-01-10T20:30:31.916Z</updated><title type='text'>Setting up Automated Builds with TeamCity, MonoTouch and TestFlight</title><content type='html'>&lt;br /&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;We have recently entered the world of iOS development with MonoTouch and one of the first things I wanted to do was get a build process and Continuous Integration (CI) server up and running.&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;We already had CI setup for our existing Windows product which is integral to our development process so it was one of the first things we wanted to get working.&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;I might write a more complete post of our build process another time but for the moment here are the details on how I set it up.&lt;br /&gt;&lt;br /&gt;I'm going to assume you have some knowledge of TeamCity, although even if you don't have any &amp;nbsp;its pretty easy to use and worth learning. &amp;nbsp;I'm also if you use another build server it should be easy enough to apply the information here to it.&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="font-size: large;"&gt;Tools used&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://www.jetbrains.com/teamcity/" target="_blank"&gt;TeamCity&lt;/a&gt;. &amp;nbsp;We had an existing TeamCity server running on Windows that we wanted to reuse.&lt;/li&gt;&lt;li&gt;Mac Mini. A "clean" non-development one to be used as a TeamCity build agent for the existing TeamCity server.&lt;/li&gt;&lt;li&gt;&lt;a href="http://xamarin.com/monotouch" target="_blank"&gt;MonoTouch &lt;/a&gt;and &lt;a href="http://monodevelop.com/" target="_blank"&gt;MonoDevelop&lt;/a&gt;. Lots of reasons why we choose the Mono tools. I'll maybe write a full blog post on that another time.&lt;/li&gt;&lt;li&gt;&lt;a href="https://testflightapp.com/" target="_blank"&gt;TestFlight &lt;/a&gt;for automatic distribution of builds to beta testers&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="font-size: large;"&gt;Setting up the Mac as a Build Agent.&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;First thing you need to do is set up your Mac as &amp;nbsp;TeamCity build agent. &amp;nbsp;There is a guide in the TeamCity documentation for how to do this &lt;a href="http://confluence.jetbrains.net/display/TCD65/Setting+up+and+Running+Additional+Build+Agents#SettingupandRunningAdditionalBuildAgents-InstallingviaJavaWebStart" target="_blank"&gt;here&lt;/a&gt;. &amp;nbsp;My basic steps where:&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;/div&gt;&lt;ul&gt;&lt;li&gt;On the Mac install the agent from the &lt;link&gt;&lt;/link&gt; on the Agents section of TeamCity using the Java Web Start installer.&lt;/li&gt;&lt;li&gt;Accept all the defaults during the install.&lt;/li&gt;&lt;li&gt;Follow this&amp;nbsp;&lt;a href="http://confluence.jetbrains.net/display/TCD65/Setting+up+and+Running+Additional+Build+Agents#SettingupandRunningAdditionalBuildAgents-UsingLaunchDaemonsStartupFilesonMacOSx" target="_blank"&gt;section &lt;/a&gt;&lt;name&gt; of the TeamCity guide on how to start the build agent at Mac start up.&lt;/name&gt;&lt;/li&gt;&lt;/ul&gt;&lt;i&gt;Note I couldn't get the last step to work by copying to the Launch Daemons folder as there was an error in some Java wrapper. &amp;nbsp;I copied the file to the /Library/LaunchAgents folder instead. &amp;nbsp;The downside to this is the agent will not start until the user logs in. &amp;nbsp;Although the Apple code signing stuff needs a user to be logged in anyway, so no big deal.&lt;/i&gt;&lt;br /&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;Once you TeamyCity server can see the new build agent authorise it via the web interface as normal.&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="font-size: large;"&gt;Setting up the build process&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;The build process I initially set up consisted of 3 steps (excluding getting source from the VCS):&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;ol&gt;&lt;li&gt;Update the App Bundle version&lt;/li&gt;&lt;li&gt;Build a class library project and a MonoTouch App project&lt;/li&gt;&lt;li&gt;Upload the App Bundle to TestFlight&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="font-size: large;"&gt;Update the App Bundle version&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The version number of your app is stored in the info.plist file of your MonoTouch project. &amp;nbsp;I couldn't find a way to auto increment this in MonoDevelop so I had to move to an external tool. &amp;nbsp;I prefer this approach as I don't need to complicate my build process by checking in the latest version number once its been bumped up. &amp;nbsp;I let TeamCity track the next version number with its built in functionality.&lt;br /&gt;&lt;br /&gt;The Apple Development tools comes with a handy little utility called &lt;a href="http://developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPages/man8/PlistBuddy.8.html" target="_blank"&gt;PlistBuddy&lt;/a&gt;. &amp;nbsp;If you run the following command line it will update you App Bundle version.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;/usr/libexec/PlistBuddy -c "Set :CFBundleVersion %build.number%" Info.plist&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;In TeamCity I added a Command Line build step with that command.&lt;br /&gt;&lt;br /&gt;&lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-fp7RW1Q34po/Tww0AIz0G4I/AAAAAAAAAD4/3ayQu1QUcW4/s1600/Update+Build+Number.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"&gt;&lt;img border="0" height="235" src="http://2.bp.blogspot.com/-fp7RW1Q34po/Tww0AIz0G4I/AAAAAAAAAD4/3ayQu1QUcW4/s640/Update+Build+Number.png" width="640" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;Update build number step&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;You can use TeamCity's auto increment version number functionality to increase the version number each time.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;Build the Projects&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Next step was to build the class library and MonoTouch App projects.&lt;br /&gt;&lt;br /&gt;For this I used the &lt;a href="http://stackoverflow.com/questions/3536691/buildserver-for-monotouch-upon-os-x" target="_blank"&gt;mdtool &lt;/a&gt;command line utility which comes with MonoDevelop. &amp;nbsp;mdtool only lets you build one project at a time so you need to invoke it once for each project. &amp;nbsp;Luckily&amp;nbsp;TeamCity will let us do this in the one command line build step by changing the type to script.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-xI9ZoBVBkS0/Tww2CT4a1dI/AAAAAAAAAEA/Be06BEZ56JA/s1600/custom+script.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="90" src="http://1.bp.blogspot.com/-xI9ZoBVBkS0/Tww2CT4a1dI/AAAAAAAAAEA/Be06BEZ56JA/s400/custom+script.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;My script looked like this (I've split it over multiple lines to make it easier to read, in practice you would need to remove the line breaks):&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;/Applications/MonoDevelop.app/Contents/MacOS/mdtool build&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; "--project:YourProjectOne"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; "--configuration:%AppBuildType%"&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; "%teamcity.build.checkoutDir%/YourSolution.sln"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;/Applications/MonoDevelop.app/Contents/MacOS/mdtool build&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; "--project:YourProjectTwo"&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; "--configuration:%AppBuildType"&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; "%teamcity.build.checkoutDir%/YourSolution.sln"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: inherit; font-size: large;"&gt;Upload the builds to TestFlight&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;For this you need to do an Ad-Hoc distribution build. &amp;nbsp;This in itself could fill a few blog posts. &lt;br /&gt;&lt;br /&gt;These are the guides I followed:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.knowing.net/index.php/monotouch-ad-hoc-distribution-tutorial/" target="_blank"&gt;MonoTouch Ad Hoc Distribution Tutorial&lt;/a&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;a href="http://docs.xamarin.com/ios/tutorials/building_for_distribution" target="_blank"&gt;Building for Distribution&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Its worth getting these working and testing them out in MonoDevelop first before moving to TeamCity. &amp;nbsp;MonoDevelop has an &lt;a href="http://docs.xamarin.com/ios/tutorials/TestFlight_Support" target="_blank"&gt;upload to TestFlight command&lt;/a&gt; built in so you can make sure you are setup correctly before automating.&lt;br /&gt;&lt;br /&gt;TestFlight (once you have signed up) has an easy to use &lt;a href="https://testflightapp.com/api/doc/" target="_blank"&gt;upload API&lt;/a&gt;. &amp;nbsp;You can upload your build to it by using the built in &lt;a href="http://developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPages/man1/curl.1.html" target="_blank"&gt;curl &lt;/a&gt;utility.&amp;nbsp;Its also an idea to zip up you .dSYM file and upload it at the same time to get better crash reports.&lt;br /&gt;&lt;br /&gt;Again I added another Command Line build step and changed the run option to "Custom Script". &amp;nbsp;My script zips up the dSYM file and them uploads the App to TestFlight (again I've split it over multiple lines):&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;zip -r -b . MyApp.app.dSYM.zip MyApp.app.dSYM&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;curl https://testflightapp.com/api/builds.json &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; -F file=@MyApp.ipa &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; -F dsym=@MyApp.app.dSYM.zip&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; -F api_token=MyAPIToken&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; -F team_token=MyTeamToken&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; -F notes='Built from TeamCity. %env.TEAMCITY_BUILDCONF_NAME%'&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; -F notify=True &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; -F distribution_lists='%TestFlightDistList%'&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;Final notes&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;In reality I actually have one build template and 2 configurations that are linked to it.&lt;br /&gt;The base template just gets the files from the VCS and builds the projects. &amp;nbsp;My&amp;nbsp;continuous&amp;nbsp;integration configuration is based on this with no changes.&lt;br /&gt;&lt;br /&gt;I have another Ad-Hoc build configuration also based on this template that adds the two extra build steps for incrementing the build number and uploading to test flight (with the build projects step inbetween the two of them).&lt;br /&gt;&lt;br /&gt;At the moment the build process is just about&amp;nbsp;manageable in TeamCity. &amp;nbsp;If it got any bigger I would&amp;nbsp;definitely move the build steps out to something like Make or MSBuild\xBuild.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3751536522056277247-6224098899711593175?l=jamie-rorrison.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jamie-rorrison.blogspot.com/feeds/6224098899711593175/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3751536522056277247&amp;postID=6224098899711593175&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3751536522056277247/posts/default/6224098899711593175'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3751536522056277247/posts/default/6224098899711593175'/><link rel='alternate' type='text/html' href='http://jamie-rorrison.blogspot.com/2012/01/setting-up-automated-builds-with.html' title='Setting up Automated Builds with TeamCity, MonoTouch and TestFlight'/><author><name>Jamie</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/-fp7RW1Q34po/Tww0AIz0G4I/AAAAAAAAAD4/3ayQu1QUcW4/s72-c/Update+Build+Number.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3751536522056277247.post-3054357093343507054</id><published>2008-11-17T20:07:00.007Z</published><updated>2008-11-17T20:50:46.569Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='delphi'/><title type='text'>Delphi 2009 - How to treat warnings as errors</title><content type='html'>A long overdue addition to Delphi is the ability to treat compiler warnings as errors.  I could have done with this some years ago and have really missed it since moving from C# back to Delphi a few months ago.&lt;br /&gt;&lt;br /&gt;If you've had some trouble finding where to enable this option, I suggest you have read at &lt;a href="http://thedailywtf.com/Articles/What_Is_Truth_0x3f_.aspx"&gt;this&lt;/a&gt; classic Daily WTF article and then have another go at looking for it.&lt;br /&gt;&lt;br /&gt;Turns out that under the 'Hints and Warnings' section of the project options there is an option called 'Output Warnings'.  Next to it is a drop down list with the default value of '&lt;span style="font-family:courier new;"&gt;True&lt;/span&gt;'.  Now most sane people would expect there to be only one more option in that drop down list.  Turns it there is actually another two!  Dropping down the list reveals all 3 options: '&lt;span style="font-family:courier new;"&gt;True','False'&lt;/span&gt; and '&lt;span style="font-family:courier new;"&gt;As Errors&lt;/span&gt;'&lt;br /&gt;&lt;br /&gt;Hmmm. No wonder I couldn't find it.&lt;br /&gt;&lt;br /&gt;I posted a &lt;a href="http://stackoverflow.com/questions/268062/delphi-2009-where-is-the-treat-warnings-as-errors-option"&gt;question &lt;/a&gt;on Stack Overflow in case others are looking for it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3751536522056277247-3054357093343507054?l=jamie-rorrison.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jamie-rorrison.blogspot.com/feeds/3054357093343507054/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3751536522056277247&amp;postID=3054357093343507054&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3751536522056277247/posts/default/3054357093343507054'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3751536522056277247/posts/default/3054357093343507054'/><link rel='alternate' type='text/html' href='http://jamie-rorrison.blogspot.com/2008/11/delphi-2009-how-to-treat-warnings-as.html' title='Delphi 2009 - How to treat warnings as errors'/><author><name>Jamie</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3751536522056277247.post-6090821672376815599</id><published>2008-10-26T13:01:00.002Z</published><updated>2009-02-05T22:07:58.865Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='crm'/><category scheme='http://www.blogger.com/atom/ns#' term='IT'/><title type='text'>Dynamic CRM 4.0 Data Migration Manager validation error - Line breaks</title><content type='html'>My company are in the process of migrating from &lt;a href="http://office.microsoft.com/en-us/contactmanager/FX101674171033.aspx"&gt;Outlook Business Contacts Manager&lt;/a&gt; to &lt;a href="http://www.microsoft.com/dynamics/crm/default.mspx"&gt;Microsoft Dynamic &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;CRM&lt;/span&gt; 4.0&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;I've hit and overcame a few brick walls during this process, which is still ongoing.  I've decided to document my findings &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_1"&gt;in case&lt;/span&gt; anyone else comes up against the same problems.&lt;br /&gt;&lt;br /&gt;The first problem I came up against and probably the most common is line breaks in your field data causes the validation process of the data migration manager to fail.  It seems to see a line break as the start of a new field even when your data is surrounded by double quotes.&lt;br /&gt;&lt;br /&gt;To be more specific it's a carriage return (Cr) followed by a line feed (&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;Lf&lt;/span&gt;) that causes the problems.  The only solution that I know of is to replace the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;CrLf&lt;/span&gt; pairs with just a &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_4"&gt;Lf&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;This can be easily done in Excel with a macro that you run over your worksheet.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;Sub &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_5"&gt;repLF&lt;/span&gt;()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    Cells.Replace What:=&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_6"&gt;vbCrLf&lt;/span&gt;, Replacement:=&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_7"&gt;vbLf&lt;/span&gt;, &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_8"&gt;LookAt&lt;/span&gt;:=&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_9"&gt;xlPart&lt;/span&gt;, _&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_10"&gt;SearchOrder&lt;/span&gt;:=&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_11"&gt;xlByColumns&lt;/span&gt;, &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_12"&gt;MatchCase&lt;/span&gt;:=False, &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_13"&gt;SearchFormat&lt;/span&gt;:=False, _&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_14"&gt;ReplaceFormat&lt;/span&gt;:=False&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;End Sub&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;For me that seems to get rid of most validation errors.  I've looked at the imported data in the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_15"&gt;CRM&lt;/span&gt; and it seems to be &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_16"&gt;OK&lt;/span&gt; i.e. line break still appear properly.&lt;br /&gt;&lt;br /&gt;Hope that helps seem people who are facing the same problem.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3751536522056277247-6090821672376815599?l=jamie-rorrison.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jamie-rorrison.blogspot.com/feeds/6090821672376815599/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3751536522056277247&amp;postID=6090821672376815599&amp;isPopup=true' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3751536522056277247/posts/default/6090821672376815599'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3751536522056277247/posts/default/6090821672376815599'/><link rel='alternate' type='text/html' href='http://jamie-rorrison.blogspot.com/2008/08/dynamic-crm-40-data-migration-manager.html' title='Dynamic CRM 4.0 Data Migration Manager validation error - Line breaks'/><author><name>Jamie</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry></feed>
