msbuild publish .deploy extension
When using the publish wizard in visual studio there is an option to append .deploy to files. The reason for this is here:
http://msdn.microsoft.com/en-us/library/ms228998.aspx
开发者_C百科But for us who like to have full control i'm building an deploy script (.msbuild)
heres a snippet:
<MSBuild Projects="$(SolutionFile)" Targets="Clean;ReBuild" Properties="Configuration=$(Configuration);" />
<MSBuild Projects="$(SolutionFile)"
Targets="Publish"
Properties="PublishUrl=$(PublishLocation);
InstallUrl=$(InstallUrl);
Configuration=$(Configuration);
GenerateManifests=$(GenerateManifests);
BootstrapperEnabled=$(BootstrapperEnabled);
IsWebBootstrapper=$(IsWebBootstrapper);
ApplicationVersion=$(ApplicationVersion);
UpdateEnabled=$(UpdateEnabled);
UpdateMode=$(UpdateMode);
UpdateUrl=$(UpdateUrl)" />
I wanted to know if there is a property on the Publish target that will do this or is this just some voodoo that the visual studio wizard provides.
if there isn't i'm going to have to write something into my script to rename the files which is hacky imo.
Mike
A quick look in Microsoft.Common.targets indicates that this file renaming is controlled by setting $(MapFileExtensions) to true. Try adding this to your Properties list:
MapFileExtensions=true
this alters the value of the internal property $(_DeploymentFileMappingExtension) to be ".deploy" which is then appended to the deployment files when they are copied in the _CopyFilesToPublishFolder target.
精彩评论