Last post Jun 01, 2017 10:23 AM by AngelinaJolie
May 27, 2017 11:21 AM|Bernie Camus|LINK
We have an interesting issue where after upgrading to Visual studio 2017, a dotnet core application we have only works when using the build/debug feature in visual studio.
On clicking the arrow, the program successfully launches dotnet.exe and runs the program. If I use dotnet run, outside of visual studio, then dotnet.exe crashes and tries to open a debugger.
I have checked all versions (we are explicitly specifying the use of 1.1.1) and they are installed and correct. I have attempted both x86 and x64.
Does anyone know what settings might exist that allow dotnet core to function only within visual studio but not when run independently?
May 29, 2017 02:39 AM|AngelinaJolie|LINK
Now, could you run dotnet directly?
And if you run dotnet run ,you need under path just like this : C:\Users\**\Documents\Visual Studio 2017\Projects\WebApplication1\WebApplication1
May 30, 2017 07:52 AM|Edward Z|LINK
What is your dotnet command? Could you share us detailed steps to reproduce your issue?
After opening a cmd.exe window, will you get any error by “dotnet” which will output dotnet version and useage?
I made a test with below steps, it works correctly at my side.
1. Open cmd.exe windows, by Windows+R and then enter cmd
2. Enter dotnet, it would be better if you could share us a screen shot about this
3. Find your project path, and navigate by “cd path”
4. Run Command “dotnet run”
5. Access the site by "http://localhost:5000/"
May 30, 2017 08:15 AM|Bernie Camus|LINK
Thanks for your reply, and yes that is at the heart of the issue: the process you describe does not work, however it does work from within visual studio when using the debug button.
When using the command line, it crashes, because we think it may be using the wrong version, however both visual studio and dotnet from command line return 1.0.4 as the version number.
May 30, 2017 08:32 AM|Bernie Camus|LINK
Thanks for the reply! Dotnet doesn't run directly when running the app, though it does run in general (for instance if I have a helloworld app I make). What is odd here is that dotnet only works under visual studio for the project in question but not from
the command line, where it crashes.
I think visual studio must be injecting some kind of setting or additional file that makes this project run.
Jun 01, 2017 10:23 AM|AngelinaJolie|LINK
Hi Bernie Camus,
If you could, please show us your path which display at console and the dotnet command.and show us your project path .