ClickOnce 无法查看在 PostBuild 事件期间复制的文件
Nuget 包添加了构建后事件:
if not exist "$(TargetDir)x86" md "$(TargetDir)x86"
xcopy /s /y "$(SolutionDir)packages\SqlServerCompact.4.0.8482.1\NativeBinaries\x86\*.*" "$(TargetDir)x86"
if not exist "$(TargetDir)amd64" md "$(TargetDir)amd64"
xcopy /s /y "$(SolutionDir)packages\SqlServerCompact.4.0.8482.1\NativeBinaries\amd64\*.*" "$(TargetDir)amd64"
当我刚刚编译时它就可以工作。
当我想发布时 - 这些目录(x86、amd64)不会出现在应用程序文件中。我不想复制现有文件,因为 nuget 包将更新并且现有副本将更改,因此我必须记住我需要重新添加它们。如何通过 clickonce 使用文件部署这些确切的目录(嵌入式 sqlce 需要完全相同的结构)并使该过程不依赖于包版本?
Nuget package added postbuild event:
if not exist "$(TargetDir)x86" md "$(TargetDir)x86"
xcopy /s /y "$(SolutionDir)packages\SqlServerCompact.4.0.8482.1\NativeBinaries\x86\*.*" "$(TargetDir)x86"
if not exist "$(TargetDir)amd64" md "$(TargetDir)amd64"
xcopy /s /y "$(SolutionDir)packages\SqlServerCompact.4.0.8482.1\NativeBinaries\amd64\*.*" "$(TargetDir)amd64"
and it works when i just compile.
When i want to publish - these directories(x86, amd64) do not appear in Application Files. I dont want to copy existing files, because nuget package will be updated and existing copies will change, so that i will have to remember that i need to re-add them. How to deploy these exact directories(embedded sqlce needs exactly such structure) with files via clickonce and make that process not dependent on package version?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在这里找到答案:
https://stackoverflow.com/a/2514027/47672
就我而言,代码是:
Found answer here:
https://stackoverflow.com/a/2514027/47672
In my case the code was: