cruise control build fails on nant task - cruisecontrol.net

I'm looking for advise on how to diagnose a problem with our build server since I don't have any experience doing so.
<message><![CDATA[External Program Failed: C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.com (return code was 1)]]></message>
<location>
<filename>C:\ContinuousIntegration\ProjectSource\apples\build\apples.build</filename>
<linenumber>14</linenumber>
<columnnumber>6</columnnumber>
</location>
line 14:
<exec basedir="${VSDir}" program="devenv.com" workingdir="..\">
<arg value="Marble.sln" />
<arg value="/Rebuild" />
<arg value="${BuildConfig}" />
</exec>
HOwever this line has been in there since the project was started many moons ago

Related

Android resource compilation failed, ic_launcher_background.xml: error: file failed to compile

This error happened to me recently when I try to build any project,
Android resource compilation failed
E:\Android Projects\BarcodReader\app\src\main\res\drawable\ic_launcher_background.xml:12: error: not well-formed (invalid token).
E:\Android Projects\BarcodReader\app\src\main\res\drawable\ic_launcher_background.xml: error: file failed to compile.
and here's the file ic_launcher_background.xml
<component name="libraryTable">
<library name="Gradle: junit:junit:4.12#jar">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/junit/junit/4.12/2973d150c0dc1fefe998f834810d68f278ea58ec/junit-4.12.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/junit/junit/4.12/a6c32b40bf3d76eca54e3c601e5d1470c86fcdfa/junit-4.12-sources.jar!/" />
</SOURCES>
</library>
</component>
when I hover over the file it shows this error
Attribute is missing the Android namespace prefix,
Inspection info:Most Android views have attributes in the Android namespace. When referencing these attributes you must include the namespace prefix, or your attribute will be interpreted by aapt as just a custom attribute. Similarly, in manifest files, nearly all attributes should be in the android: namespace. Issue id: MissingPrefix
what might be causing this error?.
That ic_launcher_background.xml is a IDEA file and not an Android resource file.
Just replace it with whatever valid Android resource XML file and it should build.

NLog MessageBox target not found

I am unable to use the NLog MessageBox target in a WinForm application. The config file indicates the xsi:type is invalid. When I run the program I get this error:
System.TypeInitializationException
HResult=0x80131534
Message=The type initializer for 'Catalog.Form2' threw an exception.
Source=Catalog
StackTrace:
at Catalog.Form2..ctor() in L:\SourceCode\Catalog\Catalog\Form2.cs:line 29
at Catalog.Program.Main() in L:\SourceCode\Catalog\Catalog\Program.cs:line 16
Inner Exception 1:
NLogConfigurationException: Exception when parsing L:\SourceCode\Catalog\Catalog\bin\Debug\NLog.config.
Inner Exception 2:
ArgumentException: Target cannot be found: 'MessageBox'
My config file contains this:
<targets>
<target name="errors" xsi:type="MessageBox" layout="${message}" />
</targets>
<rules>
<logger name="*" minlevel="Debug" writeTo="errors" />
</rules>
If I change the target to "Console" everything works. Why does MessageBox not work?
NLog 4.5.11,
NLog.Schema 4.5.11,
.NET Framwork 4.7.2,
VS 2017 Pro (15.9.7)
For the MessageBox target you need to install the NLog.Windows.Forms NuGet package.
See also: https://nlog-project.org/config/?tab=targets&search=messagebox

Wix installer fails to create application pools in IIS 10

We are having trouble creating our app pools using wix. This problem happens only on server 2016 or iis version >10.
This is the error with verbose log turned on.
Its complaining about path not found or trying to access a path that has not been created or does not have permissions. The installer fails with rollback.
"C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis.exe" -norestart -s W3SVC/1/ROOT/INFO-SUITE
CAQuietExec: Microsoft (R) ASP.NET RegIIS version 4.0.30319.0
CAQuietExec: Administration utility to install and uninstall ASP.NET on the local machine.
CAQuietExec: Copyright (C) Microsoft Corporation. All rights reserved.
CAQuietExec: Start registering ASP.NET (4.0.30319.0) recursively at W3SVC/1/ROOT/MyApplication.
CAQuietExec: Installation stopped because the specified path (W3SVC/1/ROOT/MyApplication) is invalid.
CAQuietExec: Error 0x80070001: Command line returned an error.
CAQuietExec: Error 0x80070001: CAQuietExec Failed
This is the wix xml which creates the app pool.The same installer msi works on windows 8. The IISMajorVersion is 10 according to the log. I also ran dsim enable feature IIS-ASPNET45 to make sure Asp.net is registered. I also checked the registry. THis is only when the wix creates the app pools. We don't have a problem when its an upgrade or we manaully create the app pools.
<Fragment>
<PropertyRef Id="IISMAJORVERSION" />
<Component Id="Component.WebServer.WebServices.IISSite.v10" Guid="F73DACBB-EF8B-4C8E-8B6A-6610670D991F" Directory="WEBSERVICES_INSTALLLOCATION">
<Condition><![CDATA[IISMAJORVERSION >= 10]]> </Condition>
<CreateFolder />
<iis:WebAppPool Id="WebAppPool.WebServices.IISSite.v10"
Name="[WEBSERVICESSERVERINFO_IISAPPNAME]"
ManagedRuntimeVersion="v4.0"
ManagedPipelineMode="integrated"
Identity="networkService"
IdleTimeout="0" />
<iis:WebVirtualDir Id="WebVirtualDir.WebServices.IISSite.v10"
Directory="WEBSERVICES_INSTALLLOCATION"
Alias="[WEBSERVICESSERVERINFO_IISAPPNAME]"
WebSite="WebSite">
<iis:WebDirProperties Id="WebDirProperties.WebServices.IISSite.v10"
Execute="yes"
Script="yes"
Read="yes"
WindowsAuthentication="yes"
AnonymousAccess="yes"
IIsControlledPassword="yes" />
<iis:WebApplication Id="WebApplication.WebServices.IISSite.v10"
Name="[WEBSERVICESSERVERINFO_IISAPPNAME]"
WebAppPool="WebAppPool.WebServices.IISSite.v10" />
</iis:WebVirtualDir>
</Component>
</Fragment>
<ComponentGroupRef Id="ComponentGroup.WebServer.WebServices.Files" />
<ComponentRef Id="Component.WebServer.WebServices.SetWebConfig" />
<ComponentRef Id="Component.WebServer.WebServices.Certificates" />
<ComponentRef Id="Component.WebServer.WebServices.IISSite.v10" />
I took care of my own problem. The condition had to be = "10"]]> instead of = 10]]>

Grunt command executed through Ant has slightly mangled output

I have the following Ant build.xml script, which runs npm install and then grunt (this is a proof of concept to check if we can integrate grunt into our product through Ant, as a stopgap until we can add integrated support):
<project name="GruntTest" default="buildGrunt">
<description>Run Grunt as a test</description>
<!-- ************************************************************** -->
<!-- buildDemo : define the sequence of programs to be executed -->
<!-- ************************************************************** -->
<target name="buildGrunt" depends="runNpm">
<exec executable="cmd">
<arg value="/c grunt"/>
</exec>
</target>
<target name="runNpm" depends="copySourceToTarget">
<exec executable="cmd">
<arg value="/c npm install"/>
</exec>
</target>
<!-- ************************************************************** -->
<!-- Copy all 'txt' files from the source to the target -->
<!-- end rename the extension to 'text' -->
<!-- ************************************************************** -->
<target name="copySourceToTarget">
<copy todir="${target}" includeEmptyDirs="true">
<fileset dir="${source}" includes="*.*"/>
</copy>
<copy todir="${target}/src/test" includeEmptyDirs="true">
<fileset dir="${source}/src/test" includes="*.*"/>
</copy>
<copy todir="${target}/src/server" includeEmptyDirs="true">
<fileset dir="${source}/src/server" includes="*.*"/>
</copy>
</target>
</project>
This is the Gruntfile.js script:
module.exports = function (grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
uglify: {
options: {
banner: '/*! <%= pkg.name %> <%= grunt.template.today("yyyy-mm-dd") %> */\n',
},
build: {
src: 'src/server/<%= pkg.name %>.js',
dest: 'build/<%= pkg.name %>.min.js'
}
},
nodeunit: {
all: ['src/test/*_test.js']
}
});
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-nodeunit');
grunt.loadNpmTasks('grunt-contrib-jshint');
// Default task(s).
grunt.registerTask('default', ['uglify', 'nodeunit']);
};
This provides the following output to the console when executed from the VScode Terminal:
copySourceToTarget:
[copy] Copying 8 files to E:\ikan\alm\webtest_environments\vs_code\CONTBUILD\BUILD\target\181
[copy] Copied 1 empty directory to 1 empty directory under E:\ikan\alm\webtest_environments\vs_code\CONTBUILD\BUILD\target\181
[copy] Copying 1 file to E:\ikan\alm\webtest_environments\vs_code\CONTBUILD\BUILD\target\181\src\test
[copy] Copying 1 file to E:\ikan\alm\webtest_environments\vs_code\CONTBUILD\BUILD\target\181\src\server
runNpm:
[exec] added 630 packages in 23.676s
[exec] npm WARN VSCode-Workspace#1.0.0 No repository field.
[exec]
buildGrunt:
[exec] Running "uglify:build" (uglify) task
[exec] >> 1 file created 293 B → 255 B
[exec]
[exec] Running "nodeunit:all" (nodeunit) task
[exec] Testing server_test.js..OK
[exec] >> 3 assertions passed (8ms)
[exec]
[exec] Done.
BUILD SUCCESSFUL
Total time: 27 seconds
If I run grunt directly, it gives the following output:
Running "uglify:build" (uglify) task
>> 1 file created 293 B → 255 B
Running "nodeunit:all" (nodeunit) task
Testing server_test.js..OK
>> 3 assertions passed (8ms)
Done.
As you can see, the uglify task has an arrow which displays properly in the grunt command, but when it's output to the ant output, it displays as B  which is not what I want. I'm not sure what causes this, probably something to do with my console encoding, but I don't know for sure.
Is there a way to make the arrow display properly?

Error while setting up local cluster with service fabric SDK version 2.1.150.X

While creating local cluster with latest service fabric SDK, I got following errors with Visual Studio 2013 Update 5 while it works fine with Visual Studio 2015 Update 3:
Cluster manifest validation failed with exception System.ArgumentException: Error occurs in section Federation, parameter System.
Fabric.Management.ServiceModel.SettingsOverridesTypeSectionParameter...
OR
Cluster manifest validation failed with exception System.ArgumentException: Section FaultAnalysisService found in cluster manifest but not Configurations.csv in system.fabric.management.dll
What I did to fix it?
If you closely look into error, you will find that following two files settings are not compatible.
C:\Program Files\Microsoft Service Fabric\bin\Fabric\Fabric.Code\Configurations.csv
and
C:\Program Files\Microsoft SDKs\Service Fabric\ClusterSetup\NonSecure\ClusterManifestTemplate.xml
Just disable following in ClusterManifestTemplate.xml:
<Section Name="Federation">
<Parameter Name="NodeIdGeneratorVersion" Value="V3" />
<!-- <Parameter Name="UnresponsiveDuration" Value="0" /> -->
</Section>
and
<!-- <Section Name="FaultAnalysisService">
<Parameter Name="TargetReplicaSetSize" Value="5" />
<Parameter Name="MinReplicaSetSize" Value="3" />
</Section> -->

Resources