Solved

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

  • 24 September 2022
  • 2 replies
  • 103 views

Userlevel 4
Badge
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.

icon

Best answer by Nayan Mansinha 26 September 2022, 23:02

View original

2 replies

Userlevel 7
Badge +5

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

Userlevel 4
Badge +2
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

 

Reply


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2024  Acumatica, Inc. All rights reserved