I have various dll's that I am not directly referencing in a ASP.NET website I am attempting to publish via the "Package/Publish Web" feature in Visual Studio 2010.
How can I tell the publishing feature that it needs to include these certain files?
Note that I do not want to directly reference these dll's (the solution has specifically been setup in a way so that these specific dll's are not directly referenced).
I've found a <ExcludeFilesFromDeployment/>
but I can't find a way to specifically include files.
One of the things I did miss was a clear direction on how to reference a . NET dll directly (and of course still enjoy the benefits of intellisense), basically the same thing as doing Project > Add Reference > Browse in Visual Studio. And that's it!
Using DLL File Step 1 - Open Visual Studio then select "File" -> "New" -> "Project..." then select "Visual C#" -> "Windows Forms application". Step 2 - Design the form as in the following image: Step 3 - Add a reference for the dll file, "calculation. dll", that we created earlier.
In Solution Explorer, double-click the My Project node for the project. In the Project Designer, click the References tab. Click the Add button to open the Add Reference dialog box.
If you want to include files through the Publish method you could use "FilesForPackagingFromProject" elements in the MSbuild file (.*proj)
Usefull link : http://sedodream.com/2010/05/01/WebDeploymentToolMSDeployBuildPackageIncludingExtraFilesOrExcludingSpecificFiles.aspx
You can add them to the project (just like you add an image) and change the property Copy To Output Directory to Copy if Newer. Then when you build they should be placed into the bin. That should work when you publish too.
It will only publish from the folders in your website. I have always just had the website reference those files so when I built it they were then local to the site and would be published along with everything else.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With