Gabriele Del Giovine asked 2025-08-20 14:41:23 UTC
There is a way to check at design time the version of Wisej.NET (designer or referenced assembly).
A # directive like Wisej3 or Wisej4 can be very handy.
The best solution i have found is this definition into the .csproj
40
$(DefineConstants);WISEJ35
$(DefineConstants);WISEJ40
and into the code editor
private void Window1_Load(object sender, EventArgs e)
{
#if WISEJ40
MessageBox.Show("This is Wisej,NET 4.0.");
#endif
#if WISEJ35
MessageBox.Show("This is Wisej.NET 3.5.");
#endif
}
}
Thank you.
Gabriele Del Giovine asked 2025-08-20 14:41:23 UTC
There is a way to check at design time the version of Wisej.NET (designer or referenced assembly).
A # directive like Wisej3 or Wisej4 can be very handy.
The best solution i have found is this definition into the .csproj
40 $(DefineConstants);WISEJ35 $(DefineConstants);WISEJ40and into the code editor
private void Window1_Load(object sender, EventArgs e)
{
#if WISEJ40
MessageBox.Show("This is Wisej,NET 4.0.");
#endif
#if WISEJ35
MessageBox.Show("This is Wisej.NET 3.5.");
#endif
}
}
Thank you.