Include files from Team build output folder into XAP

前端 未结 2 1180
萌比男神i
萌比男神i 2021-01-20 16:00

I\'m trying to do Continuous Integration using TFS 2010 for a Windows Phone 7.1 project. There are 2 resource projects (Win32 Project for localisation) and the main Windows

相关标签:
2条回答
  • 2021-01-20 16:28

    This is how I solved it using SlowCheetah.


    Tested on:

    Locations

    • Locally
    • Build servers (TFS 2012)

    Visual Studio versions

    • Visual Studio 2010
    • Visual Studio 2012

    Silverlight versions

    • Silverlight 4

    Process

    • Use SlowCheetah to create the transformations
    • Update the Visual Studio project with the following information at the end of the project:

      <PropertyGroup>
          <XapPackagerDependsOn>
            TransformAllFiles;
            IncludeTransformedFileInXapFile;
            $(XapPackagerDependsOn);
          </XapPackagerDependsOn>
      </PropertyGroup>
      <Target Name="IncludeTransformedFileInXapFile">
          <ItemGroup>
            <XapFilesInputCollection Include="$(OutDir)YOUR-FILES.CONFIG" />
          </ItemGroup>
      </Target>
      
      • Make sure the config files and the transformation files do not get copied to the output folder:

        enter image description here

    0 讨论(0)
  • 2021-01-20 16:34

    Solved the problem by setting the output path of the resources project to the output path of the WP7 project and then used XapFilesInputCollection to include them in the xap.

    Also changed the referred paths in WMAppManifest.xml for application title .

    Changes made :

    a. Added/Replaced the OutDir tag in each of the resource projects files .

    <OutDir>$(SolutionDir)$(SolutionName)\bin\Debug</OutDir>
    

    This copies the resource project output to main project output AppResLib.dll and AppResLib.dll.040b.mui

    b. Then in the main Windows Phone project file (.csproj) added

          <Target Name="AfterCompile">
             <ItemGroup>
               <XapFilesInputCollection Include="$(OutDir)\AppResLib.dll"/>
               <XapFilesInputCollection Include="$(OutDir)\AppResLib.dll.040b.mui"/>
             </ItemGroup>
       </Target>
    

    This works in both VS 2010 build as well as TFS 2010 Build system.

    Referring to Silverlight MSBuild Task - execute command line after Xap copied to ClientBin

    0 讨论(0)
提交回复
热议问题