如何使用aspnet_compiler.exe发布网站 [英] how to publish site using aspnet_compiler.exe

查看:97
本文介绍了如何使用aspnet_compiler.exe发布网站的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,
我正在尝试将本地计算机上的站点发布到其他计算机上.我能够发布,但是经过一番研究和发布,资源文件在发布后丢失了. d我通过为aspnet_compiler.exe添加apply ="=" all属性来了解,我们也将能够获取资源文件.但是在批处理脚本的帮助下,我无法添加该属性.谁能帮助我如何将该属性添加到aspnet_compiler.exe.这是我的示例批处理脚本

Hi Everybody,
I am trying to publish a site from my local machine to other machine. I am able to publish but the resource files are missing after publishing after a little bit of r & d i got to know with help of adding applies to="all" attribute for aspnet_compiler.exe we will be able to get the resource files also. But with help of batch script I am not able to add that attribute. Can anybody help me how to add that attribute to aspnet_compiler.exe. Here is my sample batch script

 @ECHO OFF
 set PROJECT_ROOT=%CD%
 set WEB_ROOT=D:\New folder
 echo Publishing site %PROJECT_ROOT% to %WEB_ROOT%
 pause
::aspnet_compiler 
 %windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_compiler.exe -nologo -v / -p "%PROJECT_ROOT%" -u -d -f 

"%WEB_ROOT%" || goto Error 
pause
 goto Success
 :Error
 echo Site was not published 
pause
 goto End
 :Success
echo Site published successfully 
:End


如何将资源文件发布到另一台计算机或服务器.

谢谢&问候,
贾纳尔丹

[edit]添加了代码块[/edit]


How can i publish the resource files to antoher machine or to server.

Thanks & Regards,
Janardhan

[edit]code block added[/edit]

推荐答案

您可以复制整个文件.不需要做任何比使用FTP程序还要花哨的事情了.
You can just copy the files across. No need to do anything more fancy than use an FTP program.


所以,您是在说我要手动将文件复制到其他计算机或服务器上吗?我认为这不是正确的方法,那为什么我们应该将其应用于全部".我希望每件事都实现自动化,因此如何通过该批处理脚本实现这一目标.

问候,
Janardhan
So you are saying me to manually copy the files into other machine or server right? I think this is not the correct way then why should we have that appliesto="all". I want every thing to be automated so how can I achieve this via that batch script.

regards,
Janardhan


这篇关于如何使用aspnet_compiler.exe发布网站的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆