Read a file compile-time in C#

前端 未结 6 1307
攒了一身酷
攒了一身酷 2021-01-05 13:37

I am writing some unit tests in which I need a fake xml file. I can create that file and require it to be deployed with the unit tests, but experience shows that at my offic

6条回答
  •  無奈伤痛
    2021-01-05 14:18

    If the contents are static, why can't you commit it to source control? Add it to your project and then it will always be exactly where you expect it to be.

提交回复
热议问题