开发者

_copywebapplication, missing file

开发者 https://www.devze.com 2023-02-19 22:23 出处:网络
I have a webproject that has an PostBuildEvent like this: copy \"$(ProjectDir)......\\myfile.xml\" \"$(TargetDir)..开发者_C百科\"

I have a webproject that has an PostBuildEvent like this:

copy "$(ProjectDir)......\myfile.xml" "$(TargetDir)..开发者_C百科"

Everything works fine when I build locally. However when the TFS-server builds the project the copied file are not present in the PublishedWebSites folder.

I know it is not ideal to have a PostBuildEvent like this, but is there a simple workaround? I don't want to have the copied file as a content file in the project folder.


You can add it with relative path.

<Content Include="..\Common\myfile.xml">
  <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
0

精彩评论

暂无评论...
验证码 换一张
取 消