如何使用aspnet编译器发布到服务器
目前我正在尝试使用批处理文件
start /b C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_compiler.exe -p "C:\cc\titr\code\" TargetPath=" 来发布 usinf aspnet 编译器C:\cc\titr\code\deploy\" Force="true" Debug="true"
给我错误 1010 文件路径无效。 知道我哪里做错了。 因为路径是正确的
Currenlty I am trying to publish usinf aspnet compiler using a batch file
start /b C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_compiler.exe -p "C:\cc\titr\code\" TargetPath="C:\cc\titr\code\deploy\" Force="true" Debug="true"
Giving me error 1010 file path not valid. Any idea where I am doing wrong. as the paths are correct
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在这里查看 Rick Strahl 管理预编译过程的实用程序:http://www. west-wind.com/tools/aspnetcompiler.asp。 我不得不说,获得正确的命令行参数以使 aspnet_compiler 满意并不容易。 将所有斜杠和空格放在正确的位置非常重要! 使用“西风 ASP.NET 2.0 编译实用程序”肯定会让您轻松完成这项任务!
另请参阅我的文章系列,了解如何构建受 StackOverflow 启发的知识交换。 在该系列中,我详细介绍了本地构建流程和持续集成。 CI 文章也直接涉及到这个主题(即将推出!)。 http://dotnetslackers.com/projects/StackOverflowInspiredKnowledgeExchange/
可以尝试:
在您的情况下,您 编译器特别不喜欢的尾部斜杠。 我还将您的 TargetPath 替换为 -v 参数。 我不认为 TargetPath 是一个论点。
Take a look at Rick Strahl's utility to manage the precompilation process here: http://www.west-wind.com/tools/aspnetcompiler.asp. I have to say that getting the command line arguments just right to make the aspnet_compiler happy is not easy. It is very important that you have all your slashes and spaces in just the right place! Using the "West Wind ASP.NET 2.0 Compiler Utility" will certainly make this task a breeze for you!
Also take a look at my article series on how to build a StackOverflow inspired Knowledge Exchange. In that series I detail local build processes and continuous integration. The CI article directly touches on this subject too (coming soon!). http://dotnetslackers.com/projects/StackOverflowInspiredKnowledgeExchange/
In your case you might try :
You had trailing slashes which the compiler specifically doesn't like. I also swapped out your TargetPath for the -v argument. I don't think TargetPath is an argument.