RunCommand/RunArguments support

Currently, we are trying to migrate old app (ASP.NET MVC 5) to a new project format.

Using several advices from this thread (https://github.com/dotnet/project-system/issues/2670) we were able to build and run app using VS.

However, we can not run/debug it using Rider, because it does not recognize RunCommand tag:

<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Library</OutputType>
<OutputPath>bin\</OutputPath>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<RunCommand>$(MSBuildExtensionsPath64)\..\IIS Express\iisexpress</RunCommand>
<RunArguments>/path:"$(MSBuildProjectDirectory)" /port:5001</RunArguments>
<TargetFramework>net472</TargetFramework>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<LangVersion>latest</LangVersion>
<DeployDefaultTargetFrameworkVersion>4.7.2</DeployDefaultTargetFrameworkVersion>
</PropertyGroup>
0
5 comments

Also, the entity framework menu disappears, but we can still add migrations using package manager console.

0

Hello! Currently, the support for RunCommand/RunArguments in Rider is limited. We're planning to fully support them in 2021.1. Feel free to watch over this issue: RIDER-54023.

For now, I would recommend you to take a look at launchSettings.json: "commandName": "Executable" in there should have all the features you use, and is also portable across Visual Studio and Rider.

0

@Ivan Migalev, debugging does not work with launchSettings.json:

Cannot send a DEBUG request to IIS Express (exception: An error occurred while sending the request., reason: System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a receive. ---> System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. ---> System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host
at System.Net.Sockets.Socket.EndReceive(IAsyncResult asyncResult)
at System.Net.Sockets.NetworkStream.EndRead(IAsyncResult asyncResult)
--- End of inner exception stack trace ---
at System.Net.Sockets.NetworkStream.EndRead(IAsyncResult asyncResult)
at System.Net.Connection.ReadCallback(IAsyncResult asyncResult)
--- End of inner exception stack trace ---
at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult... (show balloon)

 

You can use my project to test it yourself.

0

Please sign in to leave a comment.