简体   繁体   English

在monodevelop中部署monorail Web应用程序

[英]Deploying monorail web apps in monodevelop

This question is specific to MonoDevelop I think. 我认为这个问题是针对MonoDevelop的。

I've got a test monorail solution that works fine when I run it from monodevelop but I'm having a problem when I use 'Deploy to web'. 我有一个测试的单轨解决方案,当我从monodevelop运行该解决方案时效果很好,但是当我使用“部署到Web”时遇到了问题。

I think the issue is that all of my NVelocity view files (inside a 'View/' directory) are being embedded into the assembly and xsp4 is expecting them to actually be copied to the deployment directory? 我认为问题是我的所有NVelocity视图文件(在“ View /”目录中)都被嵌入到程序集中,而xsp4期望它们实际上被复制到部署目录中吗?

Can I either tell Monorail/NVelocity to find the views inside of this assembly or is there an easier way to tell Monodevelop to copy all files under a top level directory (like Views) to the deployment directory? 我可以告诉Monorail / NVelocity在该程序集中查找视图吗,还是有一种更简单的方法告诉M​​onodevelop将顶层目录(如“视图”)下的所有文件复制到部署目录?

I see that I can explicitly set deployment properties for each file but I haven't been able to get that to work. 我看到我可以为每个文件显式设置部署属性,但是我无法使其正常工作。 When I set it to 'Include in deploy' and to 'Use project relative path' it puts them inside of "/bin/Views/". 当我将其设置为“包含在部署中”并设置为“使用项目相对路径”时,它将它们放置在“ / bin / Views /”内部。 Then when I run xsp4 from '' it is expecting Views to be relative to that directory. 然后,当我从''运行xsp4时,它期望View相对于该目录。

The easiest way is to right click the files in your view folder and select Build Action "Content" then they are copied to the same folder structure in your deployment directory when you do "Deploy to Web". 最简单的方法是右键单击视图文件夹中的文件,然后选择“构建操作”“内容”,然后在执行“部署到Web”时将它们复制到部署目录中的相同文件夹结构中。 However this might be a little tricky if they are in a referenced project, but then you can adjust your viewPathRoot in your monorail view engine configuration to point to the right place. 但是,如果它们在引用的项目中,这可能会有些棘手,但是您可以在单轨视图引擎配置中调整viewPathRoot以指向正确的位置。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM