C# Make standalone or place output files in a SubFolder

So i want to build my project as standalone .exe or place all the files it comes with it in a sub folder.

Build Info: C# .Net Framework with visual studio 2019 community edition

So when i build my project it outputs the next files:

Myapp.exe (of course)
Myapp.exe.config (i know this needs to be with the .exe)
Ookii.Dialogs.Wpf.dll
Ookii.Dialogs.Wpf.xml

I know i can build it with fody Costura to integrate the Ookii.Dialogs.Wpf.dll and that works but it still got .exe.config and the Ookii.Dialogs.Wpf.xml.

Maybe i dont need both there isnt much going on in the config file but do i need the Ookii.Dialogs.Wpf.xml?
If so is it possible to add the Ookii.Dialogs.Wpf.xml and the .exe.config in the .exe also?

If its not possible to make 1 single .exe with no extra files i thought that it would be handy to place all the files in a subfolder like (/Config) except myapp.exe.

It would like this then:

 /Config   
  - Myapp.exe.config   
  - Ookii.Dialogs.Wpf.dll   
  - Ookii.Dialogs.Wpf.xml 
 Myapp.exe

Hope someone can help me with this problem.

.exe.config code(removed token and appname):

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
    <configSections>
        <sectionGroup name="myappnamehere" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=tokenhere" >           
            <section name="myapp.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=tokenhere" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
            <section name="myappnamehere.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=tokenhere" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
        </sectionGroup>
    </configSections>
    <startup> 
        <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
    </startup>
    <userSettings>
    </userSettings>
</configuration>

Ookii.Dialogs.Wpf.xml code a piece from it its very huge:

<?xml version="1.0"?>
<doc>
    <assembly>
        <name>Ookii.Dialogs.Wpf</name>
    </assembly>
    <members>
        <member name="T:Ookii.Dialogs.Wpf.TaskDialogItemCollection`1">
            <summary>
            Represents a list of <see cref="T:Ookii.Dialogs.Wpf.TaskDialogItem"/> objects.
            </summary>
            <typeparam name="T">The type of the task dialog item.</typeparam>
            <threadsafety instance="false" static="true"/>
        </member>
        <member name="M:Ookii.Dialogs.Wpf.TaskDialogItemCollection`1.ClearItems">
            <summary>
            Overrides the <see cref="M:System.Collections.ObjectModel.Collection`1.ClearItems"/> method.
            </summary>
        </member>
        <member name="M:Ookii.Dialogs.Wpf.TaskDialogItemCollection`1.InsertItem(System.Int32,`0)">
            <summary>
            Overrides the <see cref="M:System.Collections.ObjectModel.Collection`1.InsertItem(System.Int32,`0)"/> method.
            </summary>
            <param name="index">The zero-based index at which <paramref name="item"/> should be inserted.</param>
            <param name="item">The object to insert. May not be <see langword="null"/>.</param>
            <exception cref="T:System.ArgumentNullException"><paramref name="item"/> is <see langword="null"/>.</exception>
            <exception cref="T:System.ArgumentException">The <see cref="T:Ookii.Dialogs.Wpf.TaskDialogItem"/> specified in <paramref name="item"/> is already associated with a different task dialog.</exception>
            <exception cref="T:System.InvalidOperationException">The <see cref="T:Ookii.Dialogs.Wpf.TaskDialogItem"/> specified in <paramref name="item"/> has a duplicate id or button type.</exception>
            <exception cref="T:System.ArgumentOutOfRangeException">
            <para>
              <paramref name="index"/> is less than zero.
            </para>
            <para>
              -or-
            </para>
            <para>
              <paramref name="index"/> is equal to or greater than <see cref="P:System.Collections.ObjectModel.Collection`1.Count"/>.
            </para>
            </exception>
        </member>
        <member name="M:Ookii.Dialogs.Wpf.TaskDialogItemCollection`1.RemoveItem(System.Int32)">
            <summary>
            Overrides the <see cref="M:System.Collections.ObjectModel.Collection`1.RemoveItem(System.Int32)"/> method.
            </summary>
            <param name="index">The zero-based index of the element to remove.</param>
            <exception cref="T:System.ArgumentOutOfRangeException">
            <para>
              <paramref name="index"/> is less than zero.
            </para>
            <para>
              -or-
            </para>
            <para>
              <paramref name="index"/> is equal to or greater than <see cref="P:System.Collections.ObjectModel.Collection`1.Count"/>.
            </para>
            </exception>
        </member>
        <member name="M:Ookii.Dialogs.Wpf.TaskDialogItemCollection`1.SetItem(System.Int32,`0)">
            <summary>
            Overrides the <see cref="M:System.Collections.ObjectModel.Collection`1.SetItem(System.Int32,`0)"/> method.
            </summary>
            <param name="index">The zero-based index of the element to replace.</param>
            <param name="item">The new value for the element at the specified index. May not be <see langword="null"/>.</param>
            <exception cref="T:System.ArgumentNullException"><paramref name="item"/> is <see langword="null"/>.</exception>
            <exception cref="T:System.ArgumentException">The <see cref="T:Ookii.Dialogs.Wpf.TaskDialogItem"/> specified in <paramref name="item"/> is already associated with a different task dialog.</exception>
            <exception cref="T:System.InvalidOperationException">The <see cref="T:Ookii.Dialogs.Wpf.TaskDialogItem"/> specified in <paramref name="item"/> has a duplicate id or button type.</exception>
            <exception cref="T:System.ArgumentOutOfRangeException">
            <para>
              <paramref name="index"/> is less than zero.
            </para>
            <para>
              -or-
            </para>
            <para>
              <paramref name="index"/> is equal to or greater than <see cref="P:System.Collections.ObjectModel.Collection`1.Count"/>.
            </para>
            </exception>
        </member>
        <member name="T:Ookii.Dialogs.Wpf.Properties.Resources">
            <summary>
              A strongly-typed resource class, for looking up localized strings, etc.
            </summary>
        </member>
        <member name="P:Ookii.Dialogs.Wpf.Properties.Resources.ResourceManager">
            <summary>
              Returns the cached ResourceManager instance used by this class.
            </summary>
        </member>
        <member name="P:Ookii.Dialogs.Wpf.Properties.Resources.Culture">
            <summary>
              Overrides the current thread's CurrentUICulture property for all
              resource lookups using this strongly typed resource class.
            </summary>
        </member>
        <member name="P:Ookii.Dialogs.Wpf.Properties.Resources.AnimationLoadErrorFormat">
            <summary>
              Looks up a localized string similar to Unable to load the progress dialog animation: {0}.
            </summary>
        </member>
        <member name="P:Ookii.Dialogs.Wpf.Properties.Resources.CredentialEmptyTargetError">
            <summary>
              Looks up a localized string similar to The credential target may not be an empty string..
            </summary>
        </member>
        <member name="P:Ookii.Dialogs.Wpf.Properties.Resources.CredentialError">
            <summary>
              Looks up a localized string similar to An error occurred acquiring credentials..
            </summary>
        </member>
        <member name="P:Ookii.Dialogs.Wpf.Properties.Resources.CredentialPromptNotCalled">
            <summary>
              Looks up a localized string similar to PromptForCredentialsWithSave has not been called or the credentials were modified after the call..
            </summary>
        </member>
        <member name="P:Ookii.Dialogs.Wpf.Properties.Resources.DuplicateButtonTypeError">
            <summary>
              Looks up a localized string similar to The task dialog already has a non-custom button with the same type..
            </summary>
        </member>
        <member name="P:Ookii.Dialogs.Wpf.Properties.Resources.DuplicateItemIdError">
            <summary>
              Looks up a localized string similar to The task dialog already has an item with the same id..
            </summary>
        </member>
        <member name="P:Ookii.Dialogs.Wpf.Properties.Resources.FileNotFoundFormat">
            <summary>
              Looks up a localized string similar to The file "{0}" could not be found..
            </summary>
        </member>
        <member name="P:Ookii.Dialogs.Wpf.Properties.Resources.FolderBrowserDialogNoRootFolder">
            <summary>
              Looks up a localized string similar to Unable to retrieve the root folder..
            </summary>
        </member>

What i already did in short:

Fody Costura for the Ookii.Dialogs.Wpf.dll, it works but still got the other files.

To place the dll in a sub folder this code also works but only for dll files…:

<runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
        <probing privatePath="Config" />
    </assemblyBinding>
</runtime>

New contributor

NIxz is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật