VS 2010 - 构建解决方案时复制 XSD
我在同一解决方案中有一个网站(MVC)和一些其他项目。 在这些单独的项目之一中,我有一些 XSD,我想在构建时将其复制到网站的 bin 文件夹中。
我已将 XSD 指定为内容并始终进行复制,但它们仅复制到该项目的 bin/debug 文件夹,而不是网站的 bin。
有什么办法可以将它们复制到网站的垃圾箱中吗?
是否可以编写构建后脚本来将这些文件部署到解决方案中标记为 StartUp 的项目中?
更大的图景 - 我只想根据这些 XSD 验证一些生成的 xml,但不想将这些 XSD 作为使用该项目的每个解决方案中的内容。
由于 XSD 中的导入语句相互引用,因此无法将 XSD 用作嵌入式资源。
I have a website (MVC) and some other projects in the same solution.
In one of those separate projects I have some XSDs that I want copied to the bin folder of the website on build.
I have specified the XSDs as content and copy always but they only get copied to that project's bin/debug folder not the bin of the website.
Is there any way of having them copied to the website's bin?
Is it possible to write a post-build script to deploy these files to the project flagged as StartUp in a solution?
The bigger picture - I just want to validate some generated xmls against these XSDs, but dont want to have these XSDs as content in every solution that uses this project.
Cannot use the XSDs as embedded resources because of import statements in the XSDs referencing each other.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我已将这些 XSD 标记为内容并始终复制到输出文件夹。
由于某种原因,当通过 VS 在我的本地计算机上构建/发布解决方案时,这不会复制它们,但在运行 TFS 构建时它可以工作。
我想已经足够好了...
I have flagged these XSDs as content and copy always to output folder.
For some reason this doesn't copy them when building/publish the solution on my local machine through VS, but it works when running a TFS build.
Good enough I guess...