question

GrantYu-0562 avatar image
0 Votes"
GrantYu-0562 asked GrantYu-0562 commented

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

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?











dotnet-csharpwindows-wpf
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

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

updata

0 Votes 0 ·

1 Answer

JackJJun-MSFT avatar image
0 Votes"
JackJJun-MSFT answered GrantYu-0562 commented

@GrantYu-0562, 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.




image.png (7.8 KiB)
image.png (17.4 KiB)
image.png (29.0 KiB)
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thank you for your example.
I tried it once, and now I've found out why.

My .dll project is <TargetFrameworks>net461;netcoreapp3.1</TargetFrameworks>
My .exe project is a traditional wpf project instead of Microsoft.NET.Sdk.WindowsDesktop
So even if I click show all files,
The folder .dll items is also not displayed.
I have upgraded my .exe project to Microsoft.NET.Sdk.WindowsDesktop,

0 Votes 0 ·