tag:help.appveyor.com,2012-11-13:/discussions/questions/900-additional-logger-to-msbuildAppVeyor: Discussion 2018-10-19T08:16:58Ztag:help.appveyor.com,2012-11-13:Comment/358600982015-01-23T11:52:35Z2015-02-06T23:49:09ZAdditional logger to MSBuild.<div><p>Can I upload our logger in some directory (e.g. in C:\loggers)
instead of adding to repository - i.e. upload file/s manually in
settings panel ?</p>
<h2><a name="why-it-39-s-needed-" href="#why-it-39-s-needed-"
class="anchor" id="why-it-39-s-needed-"></a>Why it's needed:</h2>
<p>I developer of X tool for Visual studio (build/events etc.), in
new version this tool should work also through msbuild for CI
support and any custom build steps.<br>
Also planned use CI for our project with AppVeyor. However, this
project also uses self assembly and needed our lib & script for
building...</p>
<p>On some our server with TeamCity(for example) of course we can
manually place a some tool, but for web CI services this possible
only with repository...</p>
<p>I already tested with AppVeyor - all works well :) especially
thanks for <strong>VSSDK references</strong> ! AppVeyor won with
this item... it's very easy for our project :)</p>
<p>so, for example:</p>
<ul>
<li>I added our library in cloned repo</li>
<li>In settings of AppVeyor I set next script for build with our
logger (CI.MSBuild.dll):</li>
</ul>
<p>_</p>
<pre>
<code>nuget restore vsSolutionBuildEvent_2013.sln
& "C:\Program Files (x86)\MSBuild\12.0\bin\msbuild.exe" "vsSolutionBuildEvent_2013.sln" /verbosity:detailed
/logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
/l:"C:\projects\ci-cfg-vssbe-naost\Build\bin\CI.MSBuild.dll" /m</code>
</pre>
<p>And... result:</p>
<pre>
<code>Build started
git clone -q --branch=ci https://bitbucket.org/3F/ci_cfg_vssbe.git C:\projects\ci-cfg-vssbe-naost
git checkout -qf b71f4a57f682082e1072ee9515fca103b979ae34
nuget restore vsSolutionBuildEvent_2013.sln & "C:\Program Files (x86)\MSBuild\12.0\bin\msbuild.exe" "vsSolutionBuildEvent_2013.sln" /verbosity:detailed /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" /l:"C:\projects\ci-cfg-vssbe-naost\Build\bin\CI.MSBuild.dll" /m
Installing 'UDE.CSharp 1.1.0'.
Installing 'AvalonEdit 5.0.2'.
Installing 'Newtonsoft.Json 6.0.6'.
Installing 'Moq 4.2.1409.1722'.
Installing 'NLog 3.1.0.0'.
Successfully installed 'AvalonEdit 5.0.2'.
Successfully installed 'Moq 4.2.1409.1722'.
Successfully installed 'UDE.CSharp 1.1.0'.
Successfully installed 'NLog 3.1.0.0'.
Successfully installed 'Newtonsoft.Json 6.0.6'.
Microsoft (R) Build Engine version 12.0.31101.0
[Microsoft .NET Framework, version 4.0.30319.34209]
Copyright (C) Microsoft Corporation. All rights reserved.
============================================================
[[ vsSolutionBuildEvent CI.MSBuild ]] Welcomes You!
============================================================
Feedback: entry.reg@gmail.com
____________________________________________________________
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
Build started 1/23/2015 10:29:27 AM.
1/23/2015 10:29:43 AM [WARN]: Context of build action: Disabled for current Environment.
Library: loaded from 'C:\projects\ci-cfg-vssbe-naost\Build\bin\' :: v0.10.1.288593 [1cdb39b] /'develop':170
1/23/2015 10:29:45 AM [INFO]: Loaded settings (v0.9): 'C:\projects\ci-cfg-vssbe-naost\'
Ready:
1 / 1] Pre-Build :: [!]
0 / 1] Post-Build :: [X]
0 / 1] Cancel-Build :: [X]
0 / 1] Warnings-Build :: [X]
0 / 1] Errors-Build :: [X]
0 / 1] Output-Build :: [X]
0 / 1] Transmitter :: [X]
---
1/23/2015 10:29:46 AM [INFO]: vsSBE tool pane: View -> Other Windows -> Solution Build-Events
1/23/2015 10:29:46 AM [INFO]: Launching action 'Updating version' :: Configuration - 'Debug|Mixed Platforms'
1/23/2015 10:29:46 AM [INFO]: Use Script Mode
1/23/2015 10:30:04 AM [INFO]: [Pre] finished SBE: Updating version
Project "C:\projects\ci-cfg-vssbe-naost\vsSolutionBuildEvent_2013.sln" on node 1 (default targets).
....
Build succeeded.
"C:\projects\ci-cfg-vssbe-naost\vsSolutionBuildEvent_2013.sln" (default target) (1) ->
"C:\projects\ci-cfg-vssbe-naost\vsSolutionBuildEventTest\vsSolutionBuildEventTest_2013.csproj" (default target) (8) ->
(ResolveAssemblyReferences target) ->
C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets(1697,5): warning MSB3277: Found conflicts between different versions of the same dependent assembly that could not be resolved. These reference conflicts are listed in the build log when log verbosity is set to detailed. [C:\projects\ci-cfg-vssbe-naost\vsSolutionBuildEventTest\vsSolutionBuildEventTest_2013.csproj]
1 Warning(s)
0 Error(s)
Time Elapsed 00:01:46.64
Discovering tests...OK
vstest.console /logger:Appveyor "C:\projects\ci-cfg-vssbe-naost\vsSolutionBuildEventTest\bin\Debug\vsSolutionBuildEventTest.dll"
Microsoft (R) Test Execution Command Line Tool Version 12.0.30723.0
Copyright (c) Microsoft Corporation. All rights reserved.
Starting test execution, please wait...
...
Total tests: 233. Passed: 233. Failed: 0. Skipped: 0.
Test Run Successful.
Test execution time: 5.9147 Seconds
Build success</code>
</pre>
<p>so, all works... but i not planned store this lib with
sources... because CI it's additional story</p>
<p>If this feature not available at this time - please add any
variants for simple adding any files in some directory for a custom
build. I think it will be helpful for any cases...<br>
or i can access to vm with shell ? where to look ? maybe also
exists ftp access ?</p>
<p>i think later i'll also test variants with your webservice ~
submodules/subtree/subprojects... need to think, but</p>
<p>Anyway, Thanks for your great service.</p>
<p>ah yes., key to msbuild - '/m' probably not working, i have a
notice:</p>
<pre>
<code>Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.</code>
</pre>
<p>o_O</p></div>regtag:help.appveyor.com,2012-11-13:Comment/358600982015-01-23T21:13:02Z2015-01-23T21:13:02ZAdditional logger to MSBuild.<div><p>Great, thanks for the detailed use case!</p>
<p>I think NuGet is what you need! :) Really, it's an "official"
way to wrap any binaries into packages and use as dependencies.</p>
<p>And provided you have packaged your logger into NuGet package
you can upload it to <a href=
"http://www.appveyor.com/docs/nuget">AppVeyor account NuGet
feed</a> and use it from there.</p>
<p>Let me know if you have any questions.</p></div>Feodor Fitsnertag:help.appveyor.com,2012-11-13:Comment/358600982015-01-24T16:36:41Z2015-02-06T23:49:09ZAdditional logger to MSBuild.<div><p>hmm, I see :) AppVeyor also provides the NuGet private
hosting... great news!</p>
<p>I already tested, all works well! for example:</p>
<pre>
<code>nuget install CI.MSBuild -OutputDirectory C:\projects\ci-cfg-vssbe-naost\Build\bin\ -Source https://ci.appveyor.com/nuget/<id>
& nuget restore vsSolutionBuildEvent_2013.sln
& "C:\Program Files (x86)\MSBuild\12.0\bin\msbuild.exe"
"vsSolutionBuildEvent_2013.sln" /verbosity:detailed
/logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
/l:"C:\projects\ci-cfg-vssbe-naost\Build\bin\CI.MSBuild.1.0.0\lib\CI.MSBuild.dll" /m</code>
</pre>
<p>Thanks for really great service!</p>
<p>Also, will be helpful if you add the simple web-shell for
executing command to test of the AppVeyor settings etc. i.e. really
not convenient a wait ~5-15 min if we in process of configuring,
especially for non-standard configurations (as our lib above
:))</p>
<p>Thanks,</p></div>regtag:help.appveyor.com,2012-11-13:Comment/358600982015-01-24T20:08:25Z2015-01-24T20:08:25ZAdditional logger to MSBuild.<div><p>OK, great!</p>
<p>Web-shell is nice idea. Will add a new item for that.</p></div>Feodor Fitsnertag:help.appveyor.com,2012-11-13:Comment/358600982015-01-24T21:36:45Z2015-02-06T23:49:10ZAdditional logger to MSBuild.<div><blockquote>
<p>Web-shell is nice idea. Will add a new item for that.</p>
</blockquote>
<p>cool :) Thanks!</p></div>reg