ASP.NET 4.0 Deployment package include - visual-studio-2010

The build Deployment package feature of Visual Studio 2010 doesn't copy the App_GlobalResources directory from my ASP.NET 4.0 WebForms application.
I know I can use for example "ExcludeFoldersFromDeployment" to exclude folders from the deployment, but how can I include this folder with MSBUILD?

This: Web Deployment Tool (MSDeploy) : Build Package including extra files or excluding specific files might help.

Related

How can I include libvlc folder generated from published release build using extension Microsoft Visual Studio Installer Project?

I have a project that uses VideoLAN.LibVLC.Windows nuget pkg. When I build and compile application it generates a libvlc folder.
My program builds as it should, but when I try to compile an installer using the extension Microsoft Visual Studio Installer Project it won't include the libvlc folder that is created when I build a release.
I've included the 3 options:
Content Files,
Primary Output,
Publish Items
The folder is generated at build so I cannot include it with Resources Properties.
How can I get the extension to include the folder for the installer?
EDIT:
My workaround is adding files manually to point to the release folder, is that correct or is there a better way?

Create WebDeploy Zip Containing Web Project and Unreferenced Modules

We have a VS 2017 Solution with a main web project in it. We also have 3 other web projects - these are modules that depend on the main web project. However, the main web project doesn't reference or known anything about that modules. When the solution builds the modules copy their output to the bin folder of the primary web project. The modules must depend on the latest version of the main project, so it needs to build main first and then the modules. This all works great locally - the site loads the modules work etc.
We are currently using Octopus and its Octopack step runs after Solution and gets all the files. We are trying to move to just using VSTS and are having problems getting the module files into a standard web deploy zip.
When MSBbuild runs on Solution it creates a zip file per web project. The zip file for the main project doesn't contain the Dll files for the modules (even though they are in bin folder). Therefore when we deploy via VSTS site is missing the modules. How do we tell MSBuild to create a single webdeploy package for the solution including the built modules?
The MSBuild command is basically the out the box one from VSTS:
/p:DeployOnBuild=true
/p:WebPublishMethod=Package
/p:PackageAsSingleFile=true
/p:PackageLocation="C:\temp\web.zip"
As far as I can see MsBuild is making the webdeploy zip before the other solution items copy their contents into the bin folder. MSBuild is a bit of a mystery to me at the best of times.
Largely this is just a case of making MSBuild include extra files that aren't part of the project. The pack web project publish only cares about files that are included in the project.
I updated main web project Csproj file following the guide in this question How do you include additional files using VS2010 web deployment packages?. I ran MSBuild once to build Solution so module dll files were available and I then ran MSBuild again with main web project to create the WebDeploy output with the extra included files.
Not sure this is the best way - seems a bit convoluted just to add some files but it works.

WebDeployment is not

I am trying to deploy an web application that was created on VB with the .NET Framework 2.0 using the TFS 2017 continuous deploy. It doesn’t have a solution file inside like vbproj or csproj, so I needed to avoid all the suggestions to include extra information on the vbproj.In order to run the MSBuild even locally I need to change in my .sln this tag, so all my compiled code is also there
Debug.AspNetCompiler.TargetPath = "....\PrecompiledWeb\ARB\Debug\"
Unfortunately, I can’t deploy the application using the TFS. So far I tried to deploy it through my Visual Studio project, and is working fine with every option: I tried MSDeploy, Web Deploy Package, and FileSystem, and is working fine from the Visual Studio Publish Option
With that, even my transformation take place.
Now lets say I go to my TFS and I put this parameters on the MSBuild
/p:DeployOnBuild=true /p:WebPublishMethod=Package /p:PackageAsASingleFile=true /p:SkipInvalidConfigurations=true /p:PackageLocation="\\MyServer\Content"
My files are compiled but never stored in my Content folder. No one of them!!! I can’t figure out what is going on here.
From your screenshot, you are using a Web Site project, not a Web Application project. The output structure of a Web Site project in TFS is different from build in VS (you can see a PrecompiledWeb folder in your build source directory on build agent server). Instead of using MSBuild argument, you can consider add tasks below to copy the files you want to publish:
We strongly suggest you switch from Web Site projects to Web Application projects to avoid these issues.

MVC WebDeploy Includes Referenced Assembly Xml Documentation Files

I'm using WebDeploy to package my ASP .Net MVC3 project for deployment, but I'm finding that the package is being bloated by a number of xml files. These appear to be XML documentation, presumably used by VS2010 for intellisense.
For example, in my built package (and build dir) I have both NHibernate.dll and NHibernate.xml.
Do these xml doc files need to be deployed?
How can I exclude them from the build / webdeploy if not?
Thanks!
Two
things to check:
1) Are you using a debug build instead of a release build to build your package?
2) For information on excluding specific files or folders from a deployment, see the ASP.NET Web Application Project Deployment FAQ. There's also a blog post on customizing a deployment package that has information on how to use skip rules to exclude files or folders from a particular Web Deploy operation.

How to include custom files into Deployment Package for ASP.NET MVC 3 project

We are using msdeploy (from VS 2010) to build deployment package of our web project. The problem is that we'd like to include our custom file (for this scenario it is app_config.htm "template" file which will be used for maintenance mode) into that package.
Is it somehow possible to include such kind of custom file into the deployment package ??
In the project properties, section Package/Publish web -> Items to deploy we prefer the option Only files needed to run this application. We don't want to include all files only because of this one (app_offline.html.template) we want to have there.
EDIT solution found here: How do you include additional files using VS2010 web deployment packages?
You could have a look at KwateeSDCM. It's got a pretty good mechanism for overriding standard package (web applications) files with versions that can be customized according to the target server and/or version.

Resources