NET Core 3.1 app clickonce publish include a folder(from library project)

Grant Yu 1 Reputation point
2021-09-26T14:37:02.377+00:00

WPF Prism desktop project

sln
module
folder
data.txt
module.cs
app
app.cs

app references module
module is a .dll project
app is .exe project

    <Content Include="folder\data.txt">
      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
    </Content>

i want clickonce publish app with folder/data.txt.
how do?

Windows Presentation Foundation
Windows Presentation Foundation
A part of the .NET Framework that provides a unified programming model for building line-of-business desktop applications on Windows.
2,681 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,310 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Jack J Jun 24,296 Reputation points Microsoft Vendor
    2021-09-27T07:02:16.537+00:00

    @Grant Yu , you could try the following steps to include a folder with a txt file in your clickonce app.

    First, Please set the txt file like the following:

    135378-image.png

    Second, Please right click your app and choose Publish.

    Third, Please choose clickonce and click Next until you see Settings page.

    135408-image.png

    Fourth, Please choose Application Files ->click show all files ->change Publish Status to Include->click ok.

    135388-image.png

    Finally, Please click finish to publish the app.


    If the response is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.