Publishing attempting to build all projects

Hi,

I am trying out Rider on Linux and am running into issues when trying to publish a project. 

It appears that when I try to publish the project, Rider attempts to build every single project in my solution which fails since some target Windows. The publish then stops. However, the project I am trying to publish has no dependencies on or references to any of those projects. I can build, run, and debug the project fine. But I cannot publish it. 

When building the project, only the dependency projects are built:

CONSOLE: Use build tool: /usr/lib/dotnet/sdk/9.0.108/MSBuild.dll
7:38:47 PM Building /home/matt/[private]
7:38:47 PM Building /home/matt/[private]
7:38:47 PM Building /home/matt/[private]
7:38:47 PM Building /home/matt/[private]
7:38:47 PM Building /home/matt/[private]
7:38:47 PM Building /home/matt/[private]
7:38:47 PM Building /home/matt/[private]
7:38:47 PM Building /home/matt/[private]
[successful build output]

 

When publishing the project, all projects including the unrelated ones are listed:

CONSOLE: Use build tool: /usr/lib/dotnet/sdk/9.0.108/MSBuild.dll
7:42:03 PM Building /home/matt/[private]
7:42:03 PM Building /home/matt/[private]
7:42:03 PM Building /home/matt/[private]
7:42:03 PM Building /home/matt/[private]
7:42:03 PM Building /home/matt/[private]
7:42:03 PM Building /home/matt/[private]
7:42:03 PM Building /home/matt/[private]
7:42:03 PM Building /home/matt/[private]
7:42:03 PM Building /home/matt/[private]
7:42:03 PM Building /home/matt/[private]
7:42:03 PM Building /home/matt/[private]
7:42:03 PM Building /home/matt/[private]
7:42:03 PM Building /home/matt/[private]
7:42:03 PM Building /home/matt/[private]
7:42:03 PM Building /home/matt/[private]
7:42:03 PM Building /home/matt/[private]
7:42:03 PM Building /home/matt/[private]
7:42:03 PM Building /home/matt/[private]
7:42:03 PM Building /home/matt/[private]
7:42:03 PM Building /home/matt/[private]
7:42:03 PM Building /home/matt/[private]
Determining projects to restore...
1>Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(90,5): Error NETSDK1100 : To build a project targeting Windows on this operating system, set the EnableWindowsTargeting property to true.

 

I have searched the documentation but cannot seem to understand why publish is building all projects. Is there a way to disable this functionality? 

Thank you! 

0
1 comment

Hello mprov,

Thank you for contacting JetBrains Support. I'm glad to work with you on this ticket. 

I suggest you first check if you have added "Build Solution" task in "Before launch" section:

If not, please:

  • Provide the screenshot of your publish run configuration. 
  • Reproduce the issue and collect Rider logs via Help | Collect Logs and Diagnostic Data;

You can upload the files to our Upload Service and share the Upload ID.

Thanks,

Tom

 

0

Please sign in to leave a comment.