Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / General MS InfoPath Questions / November 2007

Tip: Looking for answers? Try searching our database.

Building XSN file from source files using MSBuild

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Clayton - 19 Nov 2007 17:29 GMT
Has anybody built their infopath form in an MSBuild script that will compile
my source files and package it into an XSN?  Im trying to automate my build
process for Cruise Control.NET
Clayton - 19 Nov 2007 23:50 GMT
For anybody who wants to do this...

I first create an msbuild target that simply builds the solution, and then I
call a custom console app I wrote that simply searches the manifest.xsf
(using XPath) to find all the files that belong in the XSN document, and
then put them together using the CABSDK.  A gotcha I found is that after the
MSBuild of the project, I had to XCopy the contents of the template source
file into another directory (my Post Build event in visual studio) because I
wasnt able to access them directly from my console app (said the files were
already in use).

<PropertyGroup>
<SolutionFile>SharepointForms\SharepointForms.sln</SolutionFile>
</PropertyGroup>

<Target Name="Build"
DependsOnTargets="CompileInfoPathSolution;BuildInfoPathXSN" />

<Target Name="CompileInfoPathSolution">
     <Message Text="Building solution" />
     <MSBuild Projects="$(SolutionFile)" />
</Target>

<Target Name="BuildInfoPathXSN">
     <Message Text="Packaging the InfoPath source files up into the XSN
file." />
      <Exec
command="..\Utilities\InfoPathTemplateConverter\build\InfoPathSourcePackager
$(PermitApplicationSourceFiles) $(PermitApplicationXSNFileOutput)" />
 </Target>

See the "CreateFileFromXSN" portion of this document...
http://msdn2.microsoft.com/en-us/library/bb608315(office.11).aspx  I rewrote
that javascript in C# inside of a console application and it works great.

Good luck.

> Has anybody built their infopath form in an MSBuild script that will
> compile my source files and package it into an XSN?  Im trying to automate
> my build process for Cruise Control.NET
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.