- From your project, right click on your project and select 'Add Deployable Dependencies'
- Choose 'ASP.Net Web Pages with Razor Syntax' (You are using razor right?) and click OK.
- Visual Studio will add a folder called _bin_deployableAssemblies and put the proper .dlls in there for you
- Now, edit your .csproj file and add the following XML inside of the <Project></Project> tag:
<Target Name="CopyBinDeployableAssemblies" AfterTargets="CopyFilesToOutputDirectory" Condition="Exists('$(MSBuildProjectDirectory)\_bin_deployableAssemblies')"> <ItemGroup> <_binDeployableAssemblies Include="$(MSBuildProjectDirectory)\_bin_deployableAssemblies\**\*.*" /> <FilesForPackagingFromProject Include="%(_binDeployableAssemblies.Identity)"> <DestinationRelativePath>bin\%(RecursiveDir)%(Filename)%(Extension)</DestinationRelativePath> </FilesForPackagingFromProject> </ItemGroup> <Copy SourceFiles="@(_binDeployableAssemblies)" DestinationFolder="$(OutDir)%(RecursiveDir)" SkipUnchangedFiles="true" /> <Copy Condition="'$(WebProjectOutputDir)' != ''" SourceFiles="@(_binDeployableAssemblies)" DestinationFolder="$(WebProjectOutputDir)\bin\%(RecursiveDir)" SkipUnchangedFiles="true"/> </Target>
This XML will instruct the build server to copy the contents of the folder created by Visual Studio to the output folder. Check in your changes and check your drop folder for success.
thanks scott!
ReplyDeleteasp.net mvc training | MVC online training | MVC 5 Training | asp.net mvc online training | MVC Training | .net mvc training | C# mvc training | Online MVC Training | asp.net mvc training in chennai | MVC 6 Training | MVC 6 Online Training
Dot Net Training in Chennai |
.Net Online Training | ASP.NET MVC Training in Chennai