I need to use external DLL not referenced in my main project. I've made some tests and it's working but now, I need to do it automatically.
So, in my "Post Build" event of my main web project, I put this :
Call c:\mybat.bat $(SolutionDir) $(TargetName) $(Configuration)
And in c:\mybat.bat, I've this :
set solution=%~1
set target=%~2
set configuration=%~3
set appli=Project1
rem : MSBuild...
cd "%solution%%appli%" && "C:\Windows\Microsoft.NET\Framework64\v4.0.30319\MsBuild.exe" "%solution%%appli%\%appli%.csproj" /p:Configuration=%configuration% /p:Platform="AnyCPU"
rem copy DLL generate by build
xcopy /Y /R "%solution%%appli%\bin\%appli%.dll" "%solution%%target%\bin\%appli%.dll*"
rem copy views...
xcopy /Y /R /S "%solution%%appli%\Views\*.*" "%solution%%target%\Views\"
And it's did the trick.
But, when I publish my website, the DLL 'Project1.dll' is not in my 'website\bin' folder. Only in my Bin project solution.
How can I add my *.dll and my view folder in the publish files ?