Forum Discussion

Rod-F's avatar
Rod-F
Iron Contributor
Jun 19, 2024

Is it possible for the dotnet command to not publish some files?

I've received an unusual request from some users of an http://asp.net/ Core app. I'm using the dotnet command to clean and publish the solution, to a server in our network, using a GitHub self-hosted runner on another server. They don't want the dotnet command to publish the "appsettings.json" and "appsettings.Developer.json" files. Is there a way of preventing dotnet from publishing some files?

 

Here's the code snippet I'm using from the YAML file:

 

 

    - name: Clean build
      run: dotnet clean $env:Solution_Name
    - name: Publish app
      run: dotnet publish -c Release $env:Solution_Name /p:PublishProfile=VaccineRegDevProfile

 

No RepliesBe the first to reply

Resources