0

Similar kind of question is there in here, but nothing seems to be exactly working with .Net4.0 and above.

This is pretty upvoted and working answer, but I am not able to understand where should he be put in WPF application? There is nothing like MSBuild.

http://www.digitallycreated.net/Blog/61/combining-multiple-assemblies-into-a-single-exe-for-a-wpf-application

Below is my directory structure, I have added reference to external .dll, and it is even added in References folder.

enter image description here

Where should this be added, which file?

<Target Name="AfterResolveReferences">
      <ItemGroup>
        <EmbeddedResource Include="@(ReferenceCopyLocalPaths)" Condition="'%(ReferenceCopyLocalPaths.Extension)' == '.dll'">
          <LogicalName>%(ReferenceCopyLocalPaths.DestinationSubDirectory)%(ReferenceCopyLocalPaths.Filename)%(ReferenceCopyLocalPaths.Extension)</LogicalName>
        </EmbeddedResource>
      </ItemGroup>
    </Target>

For the second part, as stated in the post i created a new class, with code and called my App class main method.

What I am trying to achieve is just move the WpfApplication2.exe to any location and it should be able to execute.

If I move the .exe file to some other location,Currently with just the C# code in my startup class, the application not even executing/starting, but if i remove the assemble c# code, and try to execute it would fail with .dll not found.

Please help me understand this issue.

NishantM
  • 141
  • 10
  • Possible duplicate: http://stackoverflow.com/questions/189549/embedding-dlls-in-a-compiled-executable – Ron Mar 05 '17 at 02:29
  • Possible duplicate of [Embedding DLLs in a compiled executable](http://stackoverflow.com/questions/189549/embedding-dlls-in-a-compiled-executable) – Ron Mar 05 '17 at 02:30

0 Answers0