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>
NIxz is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.