remove msbuild console warning but keep warning in log file - msbuild

I am building VC++ project using msbuild in batch file. I get about 1500 of same type of warnings (C4554). When running on a build server, i want that warning not be displayed on console window but they be logged in log file.
I have tried couple of methods like
call %MSBuildToolsPathVS%/msbuild %SolFilePath% /p:configuration=debug;WarningLevel=0;Platform=x64^
/flp:LogFile=%MSBuildLogPath%;Verbosity=normal^
or even this
call %MSBuildToolsPathVS%/msbuild %SolFilePath% /p:configuration=debug;WarningLevel=0;Platform=x64^
/clp:Summary^
/flp:LogFile=%MSBuildLogPath%;Verbosity=normal^
or
call %MSBuildToolsPathVS%/msbuild %SolFilePath% /p:configuration=debug;Platform=x64;WarningLevel=0;RunCodeAnalysis=false^
/clp:Summary^
/flp:LogFile=%MSBuildLogPath%;Verbosity=normal^
still displays the warning on console.
call %MSBuildToolsPathVS%/msbuild %SolFilePath% /p:configuration=debug;Platform=x64^
/clp:ErrorsOnly^
/flp:LogFile=%MSBuildLogPath%;Verbosity=normal^
/t:rebuild
causes log file to display warnings correctly but the console now hides the warnings but it also dosn't show usual steps of what configuration is being build, the target that is built etc, which is the information I want.
Any solutions?
sedy

Related

Microsoft.CppCommon.targets(171,5): error MSB6006: "cmd.exe" exited with code -1073741515

I am trying to build QGIS open source application in Windows. I used this link for it -> link
But I am getting the error "Microsoft.CppCommon.targets(171,5): error MSB6006: "cmd.exe" exited with code -1073741515". I think it is about some missing dlls. Also, the error is related(opinion) about crssync.exe because building fails after running that exe file. Additionally, when i tried debug start new instace from Visual studio 2015 it shows me (on console) not loaded 3 dlls but two of them are system one is about OSGeo4W. Then shows a missing dll error on the screen about gdal301.dll and proj_6_3.dll.
I tried to execute crsyync.exe directly. It gave me lots of dll missing error two of them is same with above. I add their locations on the path variable then tried again, problems solved no errors. However when i builded again it gave me same error. When i clicked the error it shows me "Microsoft.CppCommon.targets" file.
<CustomBuild
Sources ="#(CustomBuild)"
BuildSuffix ="$(_BuildSuffix)"
TrackerLogDirectory ="%(CustomBuild.TrackerLogDirectory)"
MinimalRebuildFromTracking ="%(CustomBuild.MinimalRebuildFromTracking)"
TLogReadFiles ="#(CustomBuildTLogReadFiles)"
TLogWriteFiles ="#(CustomBuildTLogWriteFiles)"
TrackFileAccess ="$(TrackFileAccess)"
ToolArchitecture ="$(CustomBuildToolArchitecture)"
TrackerFrameworkPath ="$(CustomBuildTrackerFrameworkPath)"
TrackerSdkPath ="$(CustomBuildTrackerSdkPath)"
AcceptableNonZeroExitCodes ="%(CustomBuild.AcceptableNonZeroExitCodes)"
>
</CustomBuild>
The problem is it can not find the gdal301.dll and proj_6_3.dll in the apps folder. Because it looks at the OSGeo4W\bin folder. When i copied and pasted them into that folder it worked and run the qgis.

Failure writing debug information: Unable to load DLL 'Microsoft.DiaSymReader.Native.amd64.dll'

I installed a VS2017, tried to develop a first app in VS2017.
File > New Project > Visual Basic > Windows Desktop > Windows Forms App (.NET Framework)
simply tried to run an app with only one label on form, but build error comes up, I clicked on "Yes" then dialogue box appears (image).
Error Code- BC37225
Error Message- Failure writing debug information: Unable to load DLL <br>'Microsoft.DiaSymReader.Native.amd64.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
Then searched SO, read and tried solutions, but not worked.
What I tried from SO is-
Error while building C# Console Application: Error CS0041 Cannot find a module
(1) installed Microsoft.NETCore.Platforms (nuget package)
(2) installed Microsoft.DiaSymReader.Native.amd64.dll (nuget package)
(3) Unable to load DLL 'Microsoft.DiaSymReader.Native.amd64.dll
in this, solution is available (accepted answer), but I don't know from where to delete these lines of code.
<PropertyGroup>
<Deterministic> true </Deterministic>
</PropertyGroup>
what could be the solution?
When the build errors dialog comes up it asks if you want to run a previous build because the current build will not compile (won't make a new .exe file) Since this is the first run of your program there was no previous build, no .exe. What you need to resolve are the build errors.

Suppress warnings in teamcity not working with msbuild

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...
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

Adobe Air Application-sandbox content cannot access this feature

Error #3207: Application-sandbox content cannot access this feature.: SecurityError: Error #3207: Application-sandbox content cannot access this feature.
at flash.system::Security$/allowDomain()
Hi all,
I have an air project that I am trying to run via a terminal using run-air command. If I run it in flash builder it seems to run with no errors, but after using a makefile to build the project and then run the code via run-air in the terminal I get the above error. Before I Was getting the same error and put a try catch around the code, however, I can't do that in this part of the code and don't want to put a try catch everywhere I get this error. I would rather just fix it. It seems to get called whenever my code is trying to access a class via a swc or import.
Anyone have suggestions?
I have tried:
Security.allowDomain("*");
which through the same error, so I put a try catch around it and now it moves on and I Get the above error when I Try to load a swc.
Also we are adding the src folder to the class that is throwing the error above via the compiler properties (we are doing unit tests) and using a makefile to build the project. If we didn't put it in compiler properties the class never seems to get picked up.

Could not copy the file "resources.dll" because it was not found

I'm getting this error after clicked for the first time in TEST-> Debug -> All Tests
I've been looking and seen something to add Pre build events but it didn't worked out, the error code:
Error 1 Could not copy the file "obj\Debug\qps-ploc\Bigbuilder.resources.dll" because it was not found. Bigbuilder
The program doesn't debug at the first try but when it asks "there was build errors. Would you like to run the last successfull build?" if i click no and retry to execute it will say nothing but the error will mantain in the error list
Uninstall the Multilingual App Toolkit from Programs and Features, download the latest version, and re-install. This fixes the build issues.
Encountered the same problem with building a console application using the Multilingual App Toolkit in a Portable Class Library, and now it is working.