2

I am trying to run a .NET Core Application in Visual Studio Code that was created in Visual Studio 2019. I'm having trouble with the dotnet run part, though. It keeps giving me this error:

Unable to run your project.
Ensure you have a runnable project type and ensure 'dotnet run' supports this project.
A runnable project should target a runnable TFM (for instance, netcoreapp2.0) and have OutputType 'Exe'.
The current OutputType is 'Exe'.

I have tried dotnet restore, dotnet build, dotnet clean, etc. Any suggestions on how to get this to run?

Terminal Output

  • Well, what TFM do you have? – mason Jan 13 '20 at 18:29
  • Have you ensured that the required .NET Core Packages are installed that are needed to build; these are required for the build assets. – Trevor Jan 13 '20 at 18:29
  • Have you changed something in the sln or csproj? Maybe define a startup project – Jesse de gans Jan 13 '20 at 19:21
  • Same problem here. I'm building a simple test Azure function, with a fresh start in both VS2019 and VSCode to compare the IDEs. Both work at first, but then copying code from the VS2019 project to the VSCode project causes this problem. – MartinDuo Jan 20 '20 at 16:48

1 Answers1

0

I am not sure if this is your problem, but I experienced something similar recently. Some applications coded in VS will not run in VS Code. VS 2019 utilizes IIS Express to run applcations on localhost. I do not believe VS Code has this ability as a text editor, compared to the power of VS 2019 as a IDE.

griffin_cosgrove
  • 419
  • 8
  • 16