I am attempting to embed an unmanaged dll in my console project. The default namespace of the project is Company.Project1Exe
. The Assembly Name (output exe ) is named project1.exe
The dlls are added to the project using the Add as Link
option and are located in a Libsx86
subfolder
Company.Project1Exe
|
|--Program.cs
|--Libs
|--x86
|-My1st.dll
|-My2nd.dll
They have been added to the project using the Add as Link
option, thus are not physically locate in the Libs
subfolder.
I have set the Build Action of both these dlls to 'Embedded Resource'.
By default, MSBuild will embed these dlls using the DefaultNamspace.ExtendedNamespace.FileName
where the ExtendedNamespace
represents the directory structure of the project.
This results in resource being embedded as Company.Project1.Libs.x86.My1st.dll
and Company.Project1.Libs.x86.My2nd.dll
respectively.
I want these resources to embedded using the Assembly Name so that they are embedded as Project1.Libs.x86.My1st.dll
and Project1.Libs.x86.My2nd.dll
respectively.
How can I do this?
See Question&Answers more detail:os