我想一些額外的文件從一個模塊到IIS server.I've複製讀取和重新閱讀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>
< _CustomFiles包括= 「.. \模塊***」/> %(RecursiveDir)%(文件名)%(分機) CustomCollectFiles; $(CopyAllFilesToSingleFolderForPackageDependsOn);
<CopyAllFilesToSingleFolderForMsdeployDependsOn>
CustomCollectFiles;
$(CopyAllFilesToSingleFolderForPackageDependsOn);
</CopyAllFilesToSingleFolderForMsdeployDependsOn>
我使用VS2015,我的模塊文件夾,正確的是(.. \模塊)
你看到任何特定相關的錯誤?
這將不會在我的情況下工作,因爲該文件放在modules文件夾,因爲模塊文件夾在生成時填充模塊項目我建立然後我複製.dll&.pdb文件與後製作動作 – advapi
這使得更有意義。添加了另一個選項,我的答案應該有所幫助。 – chief7