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.
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.
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
/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....