Rider publishes RELEASE profile as DEBUG

I have a demo winforms project linked below. If a simple folder publish profile is created using Visual Studio with a RELEASE build selected, it will publish as expected using VS. However, if the same profile is used with Rider 2023.1.2, it will publish as DEBUG.

Additionally, the profile was created as a folder publish, but it shows up in Rider as an IIS profile and shows other errors:

The publish profile .pubxml is also included: https://github.com/Mr-Technician/RiderWinformsPublish

 

<?xml version="1.0" encoding="utf-8"?>
<!--
https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project>
  <PropertyGroup>
    <Configuration>Release</Configuration>
    <Platform>Any CPU</Platform>
    <PublishDir>bin\Release\net6.0-windows\publish\</PublishDir>
    <PublishProtocol>FileSystem</PublishProtocol>
    <_TargetId>Folder</_TargetId>
  </PropertyGroup>
</Project>
0
3 comments

Hi Rnielsen

Could you please add some steps of how you publish this project? Thanks! 

0

Hi Alexandra Guk, certainly.

In Visual Studio:

  1. Open the Publish page
  2. Click new profile
  3.  Select the folder profile option and click through the options, providing a location
  4. Test that a release build is indeed published when clicking "Publish"
  5. Close the solution

In Rider:

  1. Open the solution
  2. In the run configurations option in the top right, select the publish profile created in VS
  3. Click Run
  4. Observe that the produced build is actually debug, not release.
0

Hi Rnielsen

Thank you for the details. It seems like you've faced a known issue. As a workaround, please, create a new publish profile. 

Sorry for the inconvenience. 

1

Please sign in to leave a comment.