Click here to Skip to main content
14,665,555 members
Rate this:
Please Sign up or sign in to vote.
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.
Posted
Updated 20-Sep-17 22:58pm

1 solution

Rate this:
Please Sign up or sign in to vote.

Solution 1

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.
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100