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.
Below is my directory structure, I have added reference to external .dll, and it is even added in References folder.
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.