0

In short we have teamcity set up with a build project that contains an Umbraco web site. The build step is pretty basic and setup as a Visual Studio runner type. Everything works and builds fine. The problem is the build process is VERY slow, and after some digging I found out its because it spends times logging hundreds of the exact same warning (also teamcity never uses the full computer resources available, odd). Here is one such warning logged:

[AspNetCompiler] d:\TeamCity\buildAgent\work\213321ddb3a6b826\eSignaturUmbracoMVC\umbraco\Dialogs\insertMacro.aspx(99, 0): warning CS0618: 'umbraco.ui' is obsolete: 'Use the ILocalizedTextService instead which is the ApplicationContext.Services'

Its only Umbracos pages making that error. So I thought I could suppress that warning using "/p:nowarn=0618" as a command line parameter in the build step. But it doesnt work. I have tried just about any method I could find but the warning is still not suppressed.

Any suggestions? I am pretty lost here...

Frederik T
  • 533
  • 2
  • 10
  • 30

1 Answers1

0

How to suppress specific MSBuild warning

  msbuild.exe MySolution.sln /t:Rebuild /p:WarningLevel=0 /p:Configuration=Release
                                  ^^^^^^^^^^^^^^^^^
  Warning  
  Level    Meaning
  -------- -------------------------------------------
  0  Turns off emission of all warning messages.

  1  Displays severe warning messages

  2  Displays level 1 warnings plus certain, less-severe warnings, such
     as warnings about hiding class members

  3  Displays level 2 warnings plus certain, less-severe warnings, such 
     as warnings about expressions that always evaluate to true or false

  4  (the default) Displays all level 3 warnings plus informational warnings
Community
  • 1
  • 1
unickq
  • 1,497
  • 12
  • 18
  • Thank you for your reply but this suppresses all warnings of a specific level. I need something like "/p:nowarn=0618" to work. But if suppressing an entire warning level is the ONLY way, then I guess thats what I need to use. – Frederik T Mar 16 '16 at 13:17