Mark this post . I am sure the one that I used when setting up our deployment process here.
We need to include non.net dll in the bin directory for our application in order to work, they are already built, so I do not have your "need to build again" problem. However, I am doing an "include" as part of the BeforePublish goal:
<Target Name="BeforePublish" DependsOnTargets="IncludeAdditionalPublishFiles; ReleaseModeUpdateConfig; ReleaseModeInsertDatabaseRecords " /> <ItemGroup> <AdditionalPublishFile Include="..\..\..\..\..\SharedDependencies\Leadtools\Leadtools.Codecs.J2k.dll"> <Visible>False</Visible> </AdditionalPublishFile> </ItemGroup> <Target Name="IncludeAdditionalPublishFiles" Condition=" '$(Configuration)' == 'Release' And Exists('@(IntermediateAssembly)') " > <Touch Files="@(IntermediateAssembly)" /> <CreateItem Include="@(AdditionalPublishFile)" AdditionalMetadata="TargetPath=%(FileName)%(Extension);IsDataFile=false"> <Output TaskParameter="Include" ItemName="_DeploymentManifestFiles" /> </CreateItem> </Target>
As you can see, IncludeAdditionalPublishFiles does the βenableβ job (check the blog post for βwhat's happening hereβ), I also update the configuration and set some values ββin SQL Compact Db.
It takes a little trial and error to fix this, but works in the end. Note that you can add as many additional documents as you want.
source share