[英]Visual Studio - how to mark file/folder in MVC project as Do Not Publish?
In my MVC project I have a folder called Documents and inside that are some .txt files. 在我的MVC项目中,我有一个名为Documents的文件夹,并且其中有一些.txt文件。 These have information relating to the inner workings of the website and one document has usernames & passwords (for the dev database, not live).
其中包含有关网站内部工作的信息,并且一个文档包含用户名和密码(对于开发数据库,不是实时的)。
When I publish to the server this folder gets copied up, which I do not want. 当我发布到服务器时,该文件夹将被复制,这是我不想要的。 In its properties, "Copy To Output Directory" is set to "Do not copy" but it still gets copied.
在其属性中,“复制到输出目录”设置为“不复制”,但仍会被复制。
In another project the Documents folder is in the Repository layer which compiles into a DLL and I don't see the folder or txt files on the server. 在另一个项目中,Documents文件夹位于Repository层中,该层可编译为DLL,但我在服务器上看不到该文件夹或txt文件。 The MVC project where I am having the issue doesn't have a layered architecture.
我遇到问题的MVC项目没有分层架构。 I could create a class library project for it but that seems silly.
我可以为此创建一个类库项目,但这似乎很愚蠢。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.