Skip to main content
Answer

Anyone else getting CS0219 & CS0414 warnings when publishing customization package?

  • September 24, 2022
  • 2 replies
  • 150 views

chris49
Varsity II
Forum|alt.badge.img
Good day,This isn’t causing any particular issues per-say, but ever since we’ve upgraded to 22R1, we get the following warnings when publishing customizations.
\Controls\PageTitle.ascx.cs(877): warning CS0219: The variable 'webItem' is assigned but its value is never used
\Controls\PageTitle.ascx.cs(1105): warning CS0414: The field 'User_PageTitle.auditMenuEnabled' is assigned but its value is never used
Customization Log Sample

I’m more just curious where this might have crept in, and whether it’s specifc to our instance, or if more people are seeing this one.

If anyone is aware of a solve for this warning, that’d be great too.

Best answer by Nayan Vadher

If anyone is aware of a solve for this warning, that’d be great too.

These warnings come from out-of-the-box system page whenever customization engine decides to rebuild directories, and best is to just ignore them.  And if you absolutely cant stand them, then modify the said code file to include #pragma statement e.g.

#pragma warning disable CS0219
PXMenuItem webItem = null;
#pragma warning restore CS0219

 

2 replies

Forum|alt.badge.img+7
  • Captain II
  • September 24, 2022

I’ve seen these two messages for a while now.


Nayan Vadher
Community Manager
Forum|alt.badge.img+2
  • Acumatica Developer Support
  • Answer
  • September 26, 2022
If anyone is aware of a solve for this warning, that’d be great too.

These warnings come from out-of-the-box system page whenever customization engine decides to rebuild directories, and best is to just ignore them.  And if you absolutely cant stand them, then modify the said code file to include #pragma statement e.g.

#pragma warning disable CS0219
PXMenuItem webItem = null;
#pragma warning restore CS0219