嗨,如果从ASP.NET执行批处理文件,则无法从批处理文件构建visual studio解决方案 [英] Hi, unable to build visual studio solution from batch file if batch file is executed from ASP.NET

查看:81
本文介绍了嗨,如果从ASP.NET执行批处理文件,则无法从批处理文件构建visual studio解决方案的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果使用下面的行执行批处理文件,那么我的解决方案正在构建。如果从asp.net执行相同的批处理文件,则没有任何反应。



SET PATH =%PATH%; C:\Program Files(x86)\ Microsoft Visual Studio 14.0 \ Common7 \IDE



devenv C:\ XXX \XXX.sln / rebuild发布



我尝试了什么:



如果在调试模式下执行相同的操作,那么这个工作正常。

If a batch file is executed with below line, then my solution is getting build. If the same batch file is executed from a asp.net then nothing happens.

SET PATH=%PATH%;C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE

devenv C:\XXX\XXX.sln /rebuild Release

What I have tried:

If the same is executed in debug mode then this is working fine.

推荐答案

权限。

您的ASP.NET代码可能在不同的用户ID下运行,该用户ID无权访问包含解决方案文件的文件夹。检查整个路径,确认用户有权阅读,编写和修改文件。



同时检查计算机上是否安装了正确版本的Visual Studio运行批处理文件:如果从网站上的C#代码执行它,它将在服务器上运行,因此VS和解决方案文件必须存在于服务器上,而不是客户端。
Permissions.
Your "ASP.NET" code is probably running under a different user ID, who doesn't have access to the folder containing the solution file. Check the whole path, and confirm what users do have permission to read, write and modify files.

Also check that the right version of Visual studio is installed on the computer running the batch file: if you are executing it from C# code on a website, it runs at the server, so both VS and the solution file must be present on the server, not the client.


这篇关于嗨,如果从ASP.NET执行批处理文件,则无法从批处理文件构建visual studio解决方案的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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