2010-01-12 6 views

Répondre

13

La meilleure solution consiste à résoudre les problèmes à l'origine des avertissements.

Si vous devez ignorer les avertissements (par exemple, vous avez hérité d'un projet avec tant que vous ne pouvez pas voir le bois pour les arbres), vous pouvez essayer de modifier la propriété WarningLevel, http://msdn.microsoft.com/en-us/library/13b90fz7.aspx

+0

Merci! C'est exactement ce qu'il s'est passé! En outre, la façon dont le logiciel est publié ici nécessite que les non-développeurs construisent à partir des référentiels de logiciels et je veux que les avertissements soient supprimés pour eux. Mais oui, quand le temps se présente, les problèmes seront résolus. –

56

msbuild/clp : errorsonly

 
    /consoleloggerparameters: 
        Parameters to console logger. (Short form: /clp) 
        The available parameters are: 
         PerformanceSummary--Show time spent in tasks, targets 
          and projects. 
         Summary--Show error and warning summary at the end. 
         NoSummary--Don't show error and warning summary at the 
          end. 
         **ErrorsOnly--Show only errors.** 
         WarningsOnly--Show only warnings. 
         NoItemAndPropertyList--Don't show list of items and 
          properties at the start of each project build. 
         ShowCommandLine--Show TaskCommandLineEvent messages 
         ShowTimestamp--Display the Timestamp as a prefix to any 
          message. 
         ShowEventId--Show eventId for started events, finished 
          events, and messages 
         ForceNoAlign--Does not align the text to the size of 
          the console buffer 
         DisableMPLogging-- Disable the multiprocessor 
          logging style of output when running in 
          non-multiprocessor mode. 
         EnableMPLogging--Enable the multiprocessor logging 
          style even when running in non-multiprocessor 
          mode. This logging style is on by default. 
         Verbosity--overrides the /verbosity setting for this 
          logger. 
+0

Cela peut ne pas fonctionner si vous souhaitez supprimer un avertissement spécifique. Par exemple. dans mon cas, je voudrais supprimer l'avertissement MSB3270. –

+0

Documentation étonnamment utile: https://msdn.microsoft.com/fr-fr/library/ms164311.aspx – Ben

5

Si vous souhaitez supprimer MSB3270 que vous pouvez définir dans le fichier de projet juste

<PropertyGroup> 
    <ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch> 
    None 
    </ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch> 
</PropertyGroup> 
Questions connexes