我正在尝试将一些其他文件从模块复制到IIS服务器。我已经阅读并重新阅读this post了很多时间,因为我试图在SS上关注答案,但我没有复制文件
这是我的pubxml
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<WebPublishMethod>MSDeploy</WebPublishMethod>
<LastUsedBuildConfiguration>XXX</LastUsedBuildConfiguration>
<LastUsedPlatform>Any CPU</LastUsedPlatform>
<SiteUrlToLaunchAfterPublish />
<LaunchSiteAfterPublish>True</LaunchSiteAfterPublish>
<ExcludeApp_Data>True</ExcludeApp_Data>
<MSDeployServiceURL>http://XXX</MSDeployServiceURL>
<DeployIisAppPath>XXX</DeployIisAppPath>
<RemoteSitePhysicalPath />
<SkipExtraFilesOnServer>True</SkipExtraFilesOnServer>
<MSDeployPublishMethod>RemoteAgent</MSDeployPublishMethod>
<EnableMSDeployBackup>True</EnableMSDeployBackup>
<UserName>ifinformatica\administrator</UserName>
<_SavePWD>True</_SavePWD>
<PublishDatabaseSettings>
<Objects xmlns="">
<ObjectGroup Name="default" Order="1" Enabled="False">
<Destination Path="" />
<Object Type="DbDacFx">
<PreSource Path="Data Source=XXX ;Initial Catalog=XXX ;User ID=XXX ;Password=XXX ;Application Name=XXX includeData="False" />
<Source Path="$(IntermediateOutputPath)AutoScripts\default_IncrementalSchemaOnly.dacpac" dacpacAction="Deploy" />
</Object>
<UpdateFrom Type="Web.Config">
<Source MatchValue="Data Source=XXX;Initial Catalog=XXX;User ID=XXX;Password=XXX;Application Name=XXX" MatchAttributes="$(UpdateFromConnectionStringAttributes)" />
</UpdateFrom>
</ObjectGroup>
</Objects>
</PublishDatabaseSettings>
<ADUsesOwinOrOpenIdConnect>False</ADUsesOwinOrOpenIdConnect>
&lt; _CustomFiles Include =“.. \ Modules ***”/&gt; %(RecursiveDir)%(文件名)%(扩展部分) CustomCollectFiles; $(CopyAllFilesToSingleFolderForPackageDependsOn);
<CopyAllFilesToSingleFolderForMsdeployDependsOn>
CustomCollectFiles;
$(CopyAllFilesToSingleFolderForPackageDependsOn);
</CopyAllFilesToSingleFolderForMsdeployDependsOn>
我正在使用VS2015,我的模块文件夹是正确的(.. \ Modules)
您是否看到任何特定的相关错误?
答案 0 :(得分:0)
除非我误解了您需要的所有问题,否则请将Copy to Output Directory
属性设置为Always
。
要添加不属于您的项目的文件,您可以{EN:“添加到VS2010中的CopyAllFilesToSingleFolderForPackageDependsOn
属性extend WebDeploy to include additional files via MSBuild。 this property name changed for VS2012到CopyAllFilesToSingleFolderForMsdeployDependsOn
。