Search code examples
.netmsbuildclickoncemanifestnant

Missing manifest file in ApplicationFiles folder with msbuild in NANT task


I have an application that is deployed via ClickOnce deployment.

I have used NANT in order to automate the publish process.

This is the Build part:

<target name="Build Client" depends="Clean" description="Build">
  <echo message="Building..." />    
  <exec program="${msbuildExe}" workingdir="." verbose="true">
    <arg value="${projectFile}" />
    <arg value="/target:Clean;Publish" />
    <arg value="/p:PublishDir=${testPublishFolder}" />
    <arg value="/p:ApplicationVersion=${version}" />
    <arg value="/p:Publisher=&quot;${publisherName}&quot;" />
    <arg value="/p:Product=&quot;${productName}&quot;" />
    </exec>
  <echo message="Built" />
</target>

Why is this creating Client.application (manifest file) only on root of the deployment folder, while publishing from VisuaStudio (clickOnce) creates identical file in the ApplicationFiles subfolder.

Thanks.


Solution

  • Since nobody answered ...

       <!--COPY APPLICATION MANIFEST TO APPLICATIONFILES FOLDER-->
          <target name="CopyTestApplicationManifestToApplicationFilesFolder"     depends="Dependency target name" description="Update">
          <echo message="Copying..." />
          <copy 
            file="source file"
            tofile="target file" />
           <echo message="Copied" />
         </target>
    

    I just copied it.