Issue with Publish feature

Hi,

I have created a "Publish Profile" for my application using Visual Studio. It is a folder publish but I also added additonal ms build tasks to remove files from the output and to ZIP the entire folder to a custom location, etc.

This all works fine.

Now, in Radzen Balzor Studio, when I click on "Publish", I get a dialog allowing me to create new profiles using the wizard or to select my already existing profile. If I select my profile, I can (potentially) change the connection string on the next page of the wizard, but finally, if I run the publishing process, my profile file gets overwritten/modified.

How can I perform a publish from within Radzen Balzor Studio with a given profile, so that it does not change it but simply performs the configured publish process?

I also created a batch file that calls MSBUILD to do the publish but this does not work as long as Radzen Balzor Studio is open. So do to a publish, I always have to close Radzen and then either use VS or my batch file. This is not ideal.

Any ideas?

Indeed this would happen at the moment. We don't have a workaround.

Why? What is the error?

Well, it would be nice if one e.g. could just double click on the existing profile and make it run immediately without showing another wizard page and applying any changes to the profile.

Regarding the error: This is what I get if I try to publish manually with MSBUILD while the project is openen in Radzen (not running of course!):

"D:\My Projects\Sample\SampleApp.sln" (restore;Publish;Build;Clean Target) (1) ->
"D:\My Projects\Sample\SampleApp.csproj" (Publish Target) (2:6) ->
(_CopyResolvedFilesToPublishPreserveNewest Target) ->
C:\Program Files\dotnet\sdk\9.0.103\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Publish.targets(355,5): error MSB3030: Datei
"D:\My Projects\Sample\Publish\Publish\SampleApp.deps.json" konnte nicht kopiert werden,
da die Datei nicht gefunden wurde. [D:\My Projects\Sample\SampleApp.csproj]

Translation: "Could not copy file because it does not exist."

Having the project open in VS does not create this error when running the publish manually, only if it is opened in Radzen.

I don't think this would solve the problem because of the other issue that you have encountered.

Have you tried Radzen Blazor for Visual Studio? Does the publish issue happen with it too?

No, here it works fine, but this is the default publishing tool by Visual Studio, not a Radzen specific one. It also works if either a Razor file is opened in the designer or even if Radzen Balzor Studio is running in the background.

Maybe the external publish via MSBUILD failes with Radzen open due to the other targets that I also run: restore;Publish;Build;Clean Target

Could be the restore or the Clean target...

Yes, the issue was due to a problem with my MSBUILD command line. I made some adjustments and now it works even if Radzen is running:

MSBuild.exe" "MySolution.sln" /t:restore /t:Build;Clean /p:Configuration=Release /p:PublishProfile=MyProfile /p:DeployOnBuild=true

/p:DeployOnBuild=true was the important thing I needed to add to make it working.

So, there should be no problem with adding an option to the Radzen Studio Publish dialog that simply runs Publish for a selected profile without modifying it....

We will log your request however I am not sure if this could happen any time soon.