0

I've switched my current WPF application to .NET Core 3.0. Everything works fine, except one thing! I added a project reference to my app, and set the "Copy Local" property to "No" (I want to use it as embedded). And now, my application is compiling, seems to be running, than stop. I created a new .NET Core 3.0 WPF project, linked only one also new project, set the reference and the Copy Local to No, and it is the same.

Is it a bug or need some extra parameter in the project file? Any idea?

Thanks, Zoltan

Tamakwa
  • 21
  • 4
  • Please clarify what you mean by "embedded"? You need to copy all required assemblies to the output folder. – mm8 Nov 18 '19 at 14:27
  • Not necessarily. I can hook to the current domain AssemblyResolve event to load the the dll from embedded resource when it's required. – Tamakwa Nov 18 '19 at 15:57
  • Please edit your question to include more about "seems to be running, than stop". For example, if the process crashes at startup, use tools to capture crash dumps and analyze them, https://michaelscodingspot.com/how-to-create-use-and-debug-net-application-crash-dumps-in-2019/ – Lex Li Nov 18 '19 at 17:08
  • @Tamakwa: What's your point? Your question makes no sense to me. What does "stop" mean? Of course it will break if and when it tries to execute code in an assembly that it can't find. – mm8 Nov 19 '19 at 14:08

1 Answers1

0

@mm8, trust me, it has sense. :) But never mind, I solved my problem. I replaced the ProjectReference with simple Reference + EmbeddedResource to the dll + AssemblyResolve, and it worked like in the .NET Framework project before.

Tamakwa
  • 21
  • 4