I have a solution which contains 3 projects (NetCoreWeb, NetFrameworkWeb, SharedLibrary)
- NetCoreWeb: .Net Core 2.2
- NetFrameworkWeb: Net Framework 4.5.2
- SharedLibrary: NetCoreApp 2.2 & Net Framework 4.5.2
This is the source code in MessageService.cs which is in SharedLibrary project:
public class MessageService
{
public string GetMessage()
{
#if NETFRAMEWORK
return "Net Framework";
#elif NETSTANDARD
return "Net Standard";
#else
return "Not supported";
#endif
}
}
Every time, only the source code in #elif NETSTANDARD is active and available for debugging, even I set NetFrameworkWeb as the active project:
How can I make the source code in #if NETFRAMEWORK block to be active when I set NetFrameworkWeb as an active project, and set the rest to be active when #elif NETSTANDARD is set as active ?
Thank you,