How can I copy the embedded resource into output directory as well?

倾然丶 夕夏残阳落幕 提交于 2019-12-13 03:33:43

问题


I have a rules file for workflow within my solution and its properties are

Build Action = Embedded Resource,

Copy to Output Directory = Copy always

I can't change the build action to Content, otherwise the workflow compilation won't work. However, I need the file to be deployed to the output folder and it seems not to work. Is there anything I'm missing ?


回答1:


If the file is set as an embedded resource, it should be embedded directly into the EXE as far as I know.

Regardless, you can add a post-build action which just copies the file into the output folder if that's the way it needs to work: right-click the project in Solution Explorer and click Properties, then in the Build Events tab you can specify what files you want to be copied where.



来源:https://stackoverflow.com/questions/2236867/how-can-i-copy-the-embedded-resource-into-output-directory-as-well

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!