Hi,
I am working on a MVC 4 application, and I am doing creation of package for each module. When I install the package in a different MVC application(this is the main application), all related files and content goes to Application's
Areas folder, but I need to deploy package's dll file in main application's bin folder.
I am not getting any clue regarding what I am missing in creation of package.
Can any body please help me.
Thanks,
VD Tripathi
Web Package Deployement
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.


Vishwakant TripathiRank #1,870 · 797 reputationPosted Aug 16, 2013, 1:53 PM EDT
I used XCopy command to place package's assembly file (.dll) in to main application's bin directory.
I have placed here my code...
System.Diagnostics.ProcessStartInfo startInfo = new System.Diagnostics.ProcessStartInfo();
startInfo.CreateNoWindow = true;
startInfo.UseShellExecute = false;
startInfo.FileName = "xcopy";
startInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;
startInfo.Arguments = "\"" + ApplicationBinDirectoryPath + "\"" + " " + "\"" + RootdirectoryPath+@"\Areas\"+PackageDirectory+@"\bin\" + "\"" + @"/I";
using (Process exeProcess = Process.Start(startInfo))
{
exeProcess.WaitForExit();
}
I am using here @"\Areas"+PackageDirectory+@"\bin\, please don't confuse with this line, It is basically used in MVC where Areas directory exists.(Simply we can give here any other path).
In last @"/I" is used that indicates install command.