I have created a C# CustomActions project to use in wix to create an installer. All I have is the sample project and a sample wix project that references it. And I created an app.manifest in the C# project.
Example simple program
What I get is:
1>------ Build started: Project: SetupProject1, Configuration: Debug x86 ------
1> C:\Program Files (x86)\WiX Toolset v3.11\bin\candle.exe -dDebug -d"DevEnvDir=C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Common7\IDE\\" -dSolutionDir=C:\src\WixTest\ -dSolutionExt=.sln -dSolutionFileName=WixTest.sln -dSolutionName=WixTest -dSolutionPath=C:\src\WixTest\WixTest.sln -dConfiguration=Debug -dOutDir=bin\Debug\ -dPlatform=x86 -dProjectDir=C:\src\SetupProject1\ -dProjectExt=.wixproj -dProjectFileName=SetupProject1.wixproj -dProjectName=SetupProject1 -dProjectPath=C:\src\SetupProject1\SetupProject1.wixproj -dTargetDir=C:\src\SetupProject1\bin\Debug\ -dTargetExt=.msi -dTargetFileName=SetupProject1.msi -dTargetName=SetupProject1 -dTargetPath=C:\src\SetupProject1\bin\Debug\SetupProject1.msi -out obj\Debug\ -arch x86 -ext ..\WixTest\bin\Debug\WixTest.CA.dll Product.wxs
1>candle.exe(0,0): error CNDL0144: The extension '..\WixTest\bin\Debug\WixTest.CA.dll' could not be loaded because of the following reason: Could not load file or assembly 'file:///C:\src\WixTest\bin\Debug\WixTest.CA.dll' or one of its dependencies. The module was expected to contain an assembly manifest.
1>Done building project "SetupProject1.wixproj" -- FAILED.
1>
========== Build: 0 succeeded, 1 failed, 1 up-to-date, 0 skipped ==========
Any idea what else I need to do?
Yes, I had a look - please try this:
Please remove the reference to WixTestCA, leave WixTest in there. You don't need a direct reference to the WixTestCA file. You need a project reference instead.
Add your company name or something (anything will do) to the attribute Manufacturer.
Add After='InstallInitialize' to the Custom element to indicate scheduling inside the InstallExecuteSequence for the custom action in question.
Here are the snippets with injected changes:
The Product element:
<Product Id="*" Name="SetupProject1" Language="1033" Version="1.0.0.0" Manufacturer="Add Company Name here" UpgradeCode="ADD-VALID-GUID-HERE">
The Custom element (custom action):
<Custom Action='LicenseInfoCustomAction' After='InstallInitialize'>NOT Installed</Custom>
Related
I wanted to Publish a WinForm (.Net framework) as an executable (JUST 1 File). I had tested different ways of doing it.
I had tried
dotnet publish -r win-x64 /p:PublishSingleFile=true /p:IncludeNativeLibrariesForSelfExtract=true --output ../result
Error: C:\Program
Files\dotnet\sdk\5.0.302\Microsoft.Common.CurrentVersion.targets(3746,5):
error MSB4062: The "Microsoft.Build.Tasks.AL" task could not be loaded
from the assembly Microsoft.Build.Tasks.Core, Version=15.1.0.0,
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a. Confirm that the
declaration is correct, that the assembly and all its
dependencies are available, and that the task contains a public class
that implements Microsoft.Build.Framework.ITask.
[C:\RPIC\PICDashboard\PICDashboard\PICDashboard\PICDashboard.csproj]
and
msbuild /t:Publish /p:PublishSingleFile=True /p:IncludeNativeLibrariesForSelfExtract=True /p:SelfContained=True /p:Configuration=Release /p:Platform="Any CPU" /p:RuntimeIdentifier=win-x64 /p:OutputPath=../result
msbuild works without error but it produces many files as what's in the Debug and Release folder. It also give me a warning
C:\RPIC\PICDashboard\PICDashboard\PICDashboardSetup\PICDashboardSetup.vdproj.metaproj : warning MSB4078: The project file "PICDashboardSet
up\PICDashboardSetup.vdproj" is not supported by MSBuild and cannot be built.
I had also tried
dotnet msbuild -target:Publish -property:PublishSingleFile=True -property:IncludeNativeLibrariesForSelfExtract=True -property:SelfContained=True -property:Configuration=Release -property:RuntimeIdentifier=win-x64 -property:Platform="Any CPU" -property:OutDir=../result
Error: C:\Program
Files\dotnet\sdk\5.0.302\Microsoft.Common.CurrentVersion.targets(3746,5):
error MSB4062: The "Microsoft.Build.Tasks.AL" task could not be loaded
from the assembly Microsoft.Build.Tasks.Core, Version=15.1.0.0,
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a. Confirm that the
declaration is correct, that the assembly and all its
dependencies are available, and that the task contains a public class
that implements Microsoft.Build.Framework.ITask.
[C:\RPIC\PICDashboard\PICDashboard\PICDashboard\PICDashboard.csproj]
Is there any way that allows me to publish WinForms as a single exe?
"Any way" - yes, though I can't say "always"/"for all" applications and its dependencies.
Also, the following is done in Visual Studio (not dotnet cli - I haven't tried) with a trivial "Hello World" Windows Forms app (no external dependencies)
In your Application Build properties -> Release Configuration set Debugging information to None
In your Publish Settings
Result (in the bin\Release\net5.0-windows\publish\ folder set above):
Running an awesome app :)
Hth...
Which IDE version are u using. You cam choose produce single file in publish setting (1click publish method for vs2019)
Application Stack
Jenkins
.NET 4.7
SonarQube 7.4
Bitbucket (Source control)
VS 2015 Update 3
VsTest to execute UnitTest
Path of Msbuid in Global Tools Configuration is
C:\Program Files (x86)\MSBuild\14.0\Bin\Msbuild.exe
Also tried with C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Msbuild.exe
We have created sample project and configured all in one server.
We can see multiple kind of errors in log files like
Generation of the sonar-properties file failed. Unable to complete SonarQube analysis.
WARNING: File 'C:\Program Files (x86)\Jenkins\workspace\CICD\UnitTestProject1\Properties\AssemblyInfo.cs' is not located under the root directory 'C:\Program Files (x86)\Jenkins\workspace\CICD.sonarqube\out' and will not be analyzed
No analysable projects were found. SonarQube analysis will not be performed
This only comes when i use msbuild from "Program files" An instance of analyzer SonarAnalyzer.Rules.CSharp.FieldsShouldNotBePublic cannot be created from C:\Users\manish.joisar\AppData\Local\Temp.sonarqube\resources\0\SonarAnalyzer.CSharp.dll : Could not load file or assembly 'Microsoft.CodeAnalysis, Version=1.3.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies
I can see message with build succeeded.
I can also see successful test run message
Total tests: 1. Passed: 1. Failed: 0. Skipped: 0.
Test Run Successful.
Sonar configuration is done in build configuration under "Execute Sonar scanner" step
I am not sure what is missing here, wrong configuration, wrong msbuild ??
I suppose you have gone through this documentation https://docs.sonarqube.org/display/SCAN/Analyzing+with+SonarQube+Scanner+for+MSBuild for getting all the dependencies information and the command required to run the analysis.
I was getting some of the error mentioned above when i was trying to analyse c# files but i require more information to understand your case so please provide the o/p of each steps mentioned below:
SonarScanner.MSBuild.exe begin /k:"project-key"
MSBuild.exe <path to solution.sln> /t:Rebuild
SonarScanner.MSBuild.exe end
If you are running through jenkins MSBuild plugin, then please provide the verbose output of the same.
I solved all above issues with below configuration in Jenkins
SonarQube configuration
Jenkin Global tool configuration
Freestyle project configuration
I am attempting to upgrade my application like so:
It fails with the following error:
Error details:
2>Test-ServiceFabricApplicationPackage : The BuildLayout of the application in
2>C:\Users\me\AppData\Local\Temp\TestApplicationPackage_2205895293421\4myc2vpp.bdq\Debug is invalid. Code is
2>missing for service MyServicePkg.
2>At C:\Program Files\Microsoft SDKs\Service
2>Fabric\Tools\PSModule\ServiceFabricSDK\Publish-UpgradedServiceFabricApplication.ps1:135 char:38
2>+ ... nSuccess = (Test-ServiceFabricApplicationPackage $AppPkgPathToUse -Im ...
2>+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2> + CategoryInfo : InvalidOperation: (:) [Test-ServiceFabricApplicationPackage], FabricImageBuilderValidati
2> onException
2> + FullyQualifiedErrorId : TestApplicationPackageErrorId,Microsoft.ServiceFabric.Powershell.TestApplicationPackage
2>
2>Finished executing script 'Deploy-FabricApplication.ps1'.
2>Time elapsed: 00:00:40.4035177
2>The PowerShell script failed to execute.
========== Build: 1 succeeded, 0 failed, 46 up-to-date, 0 skipped ==========
========== Publish: 0 succeeded, 1 failed, 0 skipped ==========
Here are my properties for that specific project:
What am I doing wrong? What does this exception mean?
I would go with Hans Passant's comment:
The most basic mishap is that the name you used in the
ServiceManifest.xml file does not match the name of the .exe that your
project generates
It is also visible in your debug output as the build succeeded but the publish failed.
========== Build: 1 succeeded, 0 failed, 46 up-to-date, 0 skipped ==========
========== Publish: 0 succeeded, 1 failed, 0 skipped ==========
It can happen in a number of ways and most probably due to renaming of the project or renaming of the Assembly Name. If you rename the project or the Assembly Name of your project, your build executable will be according to that name. Consider the following case.
I renamed the Assembly Name from "MyService" to "MyRenamedService". So the build executable will be MyRenamedService.exe. So you have to set this in your ServiceManifest.xml.
<CodePackage Name="Code" Version="1.0.0">
<EntryPoint>
<ExeHost>
<Program>MyRenamedService.exe</Program>
<WorkingFolder>CodePackage</WorkingFolder>
</ExeHost>
</EntryPoint>
</CodePackage>
The best way to be sure of the build executable path is to build the solution. It will show the full path of the executable in Output window.
1>------ Build started: Project: Web1, Configuration: Debug Any CPU ------
1>Web1 -> C:\.....\Application2\Web1\bin\Debug\net461\win7-x64\MyRenamedService.exe
2>------ Build started: Project: Application2, Configuration: Debug x64 ------
========== Build: 2 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
Here Web1 is the Project Name I started with, MyRenamedService.exe is the build executable name (because I renamed the Assembly Name), it should be set in the ServiceManifest.xml as shown above.
At a higher level, this error happens when the folder named "Code" is missing under the ServiceFabric Project Folder during Publish (after build shows as successfully completed).
Build is the culprit here, not Publish, as Publish is expected to look for assets under
Folder Path: {{SFProjectFolder}}\pkg\Release\{{ServiceName}}
Please note that the {{ServiceName}} and "Code" is taken from the ServiceManifest.xml of the corresponding project referenced in the SF application.
ServiceManifest.xml
<ServiceManifest xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" Name="{{ServiceName}}" Version="1.0.0" xmlns="http://schemas.microsoft.com/2011/01/fabric">
<ServiceTypes>
<StatelessServiceType ServiceTypeName="{{ServiceType}}" />
</ServiceTypes>
<CodePackage Name="Code" Version="1.0.0">
<EntryPoint>
<ExeHost>
<Program>{{ServiceName}}.exe</Program>
</ExeHost>
</EntryPoint>
</CodePackage>
<ConfigPackage
What caused the issue:
From other answers, it looks like the Build not copying the compiled assets into the right path/folder, could happen due to multiple issues.
In our case, we had changed the Configuration Manager settings for Release Configuration from AnyCPU to x64 and deleted the AnyCPU Platform setting from the solution. And for some reason, the Services.csproj still had the AnyCPU Platform setting. We ended up having the build showing as successful, but "Code" folder not being generated under Release folder.
Fix:
To fix this, we had to manually edit the .csproj and remove the PropertyGroup sections that still used "AnyCPU" like the one below:
PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "
After this change, Build correctly placed the contents in the right path and Publish worked as expected.
This issue occurs when your service's executable .exe path is wrong in ServiceManifest.xml.
<CodePackage> contains .exe path in <Program> just check it out first:
<CodePackage Name="Code" Version="1.0.0">
<EntryPoint>
<ExeHost>
<Program>MyServicePkgHost.exe</Program> // Important
<WorkingFolder>CodePackage</WorkingFolder>
</ExeHost>
</EntryPoint>
</CodePackage>
Important References:
Code is missing for service error Service Fabric
https://stackoverflow.com/a/47291969/5377037
https://stackoverflow.com/a/48729871/5377037
For confirming you are not missing anything look at below two tutorials:
Service Fabric application upgrade tutorial using Visual Studio
Service Fabric application upgrade using PowerShell
Edit 1:-
Your package layout of application directory structure should be:
PS D:\temp> tree /f .\MyServicePkg
D:\TEMP\MYSERVICEPKG
│ ApplicationManifest.xml
│
└───MyServicePkgManifest
│ ServiceManifest.xml
│
├───MyServicePkg
│ MyServicePkgHost.exe
│
├───MyServicePkgConfig
│ Settings.xml
│
└───MyServicePkgData
init.dat
Error:
Why the "Code is missing for service package" occurs?
Reason:
In above directory there is missing a .bat code file from you application directory:
│
├───MyServicePkg
│ MyServicePkgHost.exe
│ MyServicePkgSetup.bat
|
So you have to add that missing file MyServicePkgSetup.bat. And following is a simple service manifest ServiceManifest.xml example that shows the SetupEntryPoint and the main EntryPoint for the service.
<?xml version="1.0" encoding="utf-8" ?>
<ServiceManifest Name="MyServiceManifest" Version="SvcManifestVersion1" xmlns="http://schemas.microsoft.com/2011/01/fabric" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Description>An example service manifest</Description>
<ServiceTypes>
<StatelessServiceType ServiceTypeName="MyServiceType" />
</ServiceTypes>
<CodePackage Name="Code" Version="1.0.0">
<SetupEntryPoint>
<ExeHost>
<Program>MyServicePkgSetup.bat</Program> // important
<WorkingFolder>CodePackage</WorkingFolder>
</ExeHost>
</SetupEntryPoint>
<EntryPoint>
<ExeHost>
<Program>MyServicePkgHost.exe</Program> // important
</ExeHost>
</EntryPoint>
</CodePackage>
<ConfigPackage Name="Config" Version="1.0.0" />
</ServiceManifest>
Configure the policy by using a local account
After you configure the service to have a setup entry point, you can change the security permissions that it runs under in the application manifest:
Under the <ServiceManifestImport> section, configure a policy to apply this principal to <SetupEntryPoint>. This tells Service Fabric that when the MyServicePkgSetup.bat file is run, it should be RunAs with administrator privileges. Given that you have not applied a policy to the main entry point, the code in MyServicePkgHost.exe runs under the system NetworkService account. This is the default account that all service entry points are run as.
<?xml version="1.0" encoding="utf-8"?>
<ApplicationManifest xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ApplicationTypeName="MyApplicationType" ApplicationTypeVersion="1.0.0" xmlns="http://schemas.microsoft.com/2011/01/fabric">
<ServiceManifestImport>
<ServiceManifestRef ServiceManifestName="MyServiceTypePkg" ServiceManifestVersion="1.0.0" />
<ConfigOverrides />
<Policies>
<RunAsPolicy CodePackageRef="Code" UserRef="SetupAdminUser" EntryPointType="Setup" />
</Policies>
</ServiceManifestImport>
<Principals>
<Users>
<User Name="SetupAdminUser">
<MemberOf>
<SystemGroup Name="Administrators" />
</MemberOf>
</User>
</Users>
</Principals>
</ApplicationManifest>
PS: You can verify the package structure locally through PowerShell by using the Test-ServiceFabricApplicationPackage command.
Workaround to add missing file MyServicePkgSetup.bat:
Let's now add the file MyServicePkgSetup.bat to the Visual Studio project to test the administrator privileges. In Visual Studio, right-click the service project and add a new file called MyServicePkgSetup.bat.
Next, ensure that the MyServicePkgSetup.bat file is included in the service package. By default, it is not. Select the file, right-click to get the context menu, and choose Properties. In the Properties dialog box, ensure that Copy to Output Directory is set to Copy if newer. See the following screenshot:
**File Path: ** C:\..\YourApplication\
Now open the MyServicePkgSetup.bat file and add the following commands:
REM Set a system environment variable. This requires administrator privilege
setx -m TestVariable "MyValue"
echo System TestVariable set to > out.txt
echo %TestVariable% >> out.txt
REM To delete this system variable us
REM REG delete "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" /v TestVariable /f
Next, build and deploy the solution to a local development cluster. After the service has started, as shown in Service Fabric Explorer, you can see that the MySetup.bat file was successful in a two ways. Open a PowerShell command prompt and type:
PS C:\ [Environment]::GetEnvironmentVariable("TestVariable","Machine")
MyValue
Then, note the name of the node where the service was deployed and started in Service Fabric Explorer--for example, Node 2. Next, navigate to the application instance work folder to find the out.txt file that shows the value of TestVariable. For example, if this service was deployed to Node 2, then you can go to this path for the MyApplicationType:
C:\SfDevCluster\Data\_App\Node.2\MyApplicationType_App\work\out.txt
Since I needed its capability, I forked a NuGet package that was supposed to be able to enable me to process regular expressions in my build, the goal of which is to transform the .NET Framework version number into an environment variable, so that, for example, 4.7 becomes NET47. I am more than sufficiently familiar with regular expressions to make that happen, and the task runs perfectly when I call the assembly from a console program. It finds and loads the assembly, runs its Execute method, and sets the expected property values. However, when I try to run the task in a build, MSBuild reports as follows.
The "RegularExpressionMatching" task could not be loaded from the assembly RegexMatch.MSBuildTask, Version=1.0.0.7, Culture=neutral, PublicKeyToken=659f28f508fc4cd9, processorArchitecture=MSIL. Confirm that the declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask. C:\Users\DAVE\Documents\Visual Studio 2013\Projects\WizardWrx_Libs\DLLServices2\ConsoleStreamsLab\ConsoleStreamsLab_4.7\ConsoleStreamsLab_4.7.csproj 81 5 ConsoleStreamsLab_4.7
My UsingTask element is as follows.
<UsingTask TaskName="RegularExpressionMatching"
AssemblyName="RegexMatch.MSBuildTask, Version=1.0.0.7, Culture=neutral, PublicKeyToken=659f28f508fc4cd9, processorArchitecture=MSIL" />
My Target block follows.
<Target Name="SecondMatch" AfterTargets="BeforeBuild">
<Message Text="TargetFrameworkVersion = $(TargetFrameworkVersion)" Importance="high" />
<Message Text="DefineConstants = $(DefineConstants)" Importance="high" />
<RegularExpressionMatching Input="$(DefineConstants)" Pattern="^(.*)(*;NET\d{1,2})(;*.*)*$" >
<Output TaskParameter="IsMatch"
PropertyName="IsMatchJiro" />
<Output TaskParameter="Match"
PropertyName="MatchJiro" />
<Output TaskParameter="Replacement"
PropertyName="ReplacementJiro" />
</RegularExpressionMatching>
The first two messages appear in the build log, exactly as expected, and shown, next.
------ Build started: Project: ConsoleStreamsLab_4.7, Configuration: Debug Any CPU ------
Build started 2017/07/24 15:14:29.
SecondMatch:
TargetFrameworkVersion = v4.7
DefineConstants = DEBUG;TRACE
C:\Users\DAVE\Documents\Visual Studio 2013\Projects\WizardWrx_Libs\DLLServices2\ConsoleStreamsLab\ConsoleStreamsLab_4.7\ConsoleStreamsLab_4.7.csproj(81,5): error MSB4062: The "RegularExpressionMatching" task could not be loaded from the assembly RegexMatch.MSBuildTask, Version=1.0.0.7, Culture=neutral, PublicKeyToken=659f28f508fc4cd9, processorArchitecture=MSIL. Confirm that the <UsingTask> declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask.
Build FAILED.
Time Elapsed 00:00:00.00
========== Build: 0 succeeded, 1 failed, 1 up-to-date, 0 skipped ==========
Diagnostic Level Build Log is a previous attempt, run with the logging level set to Diagnostic. Though it gives a great deal more information, none of it sheds any light on the matter, so far as I can tell.
The assembly in question has a strong name, is installed into the GAC on the machine on which the build ran, and has no unusual dependencies, other than the three MSBuild assemblies.
I suspect the solution might be in the assembly references listed in the RegExMatch Solution, specifically Microsoft.Build.Utilities.v4.0, since I am unsure how that correlates with the build engine that runs in Visual Studio 2013, which reports itself as version 12 (although that may refer only to the version of Visual Studio with which it ships).
I would really like to get this working, so that I can do this task the data driven way, and eliminate hard coded settings. Once I have a proof of concept, I'll be delighted as well to submit a pull request to the original author.
I'll have my eyes open for good suggestions.
Did you import the project of the extensions? I haven't used the specific extensions you used, but when I used the MSBuildExtensions I had to add a set of lines to the effect of:
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" Condition="false" />
Only after this line was present was I able to acess the targets and use the extensions.
So I'm trying to get a VS2010 C# project to go cross-platform. First goal is build it in Mono 2.10.5 for Windows. I have not touched any code yet - I'm starting with xbuild's recent ability to build sln files. (Incidentally I use Jenkins to trigger builds, not that it matters as I get the same result at the command-line.)
I get "error CS1548: Error during assembly signing. The specified key file `AlphaBeta.pfx' has incorrect format". There's not much google juice on this error. Does anyone know what would cause this? Thanks in advance!
Full output below:
C:\Program Files\Jenkins\jobs\AlphaBeta\...\AlphaSolution>"C:\Program Files\Mono-2.10.5\bin\xbuild" AlphaSolution.sln
XBuild Engine Version 2.10.5.0
Mono, Version 2.10.5.0
Copyright (C) Marek Sieradzki 2005-2008, Novell 2008-2011.
Build started 9/20/2011 3:54:14 PM.
C:\Program Files\Jenkins\jobs\AlphaBeta\...\AlphaSolution\AlphaSolution.sln: warning : Ignoring vcproj 'ZBM'.
C:\Program Files\Jenkins\jobs\AlphaBeta\...\AlphaSolution\AlphaSolution.sln: warning : Don't know how to handle GlobalSection TestCaseManagementSettings, Ignoring.
C:\Program Files\Jenkins\jobs\AlphaBeta\...\AlphaSolution\AlphaSolution.sln: warning : Failed to find project d393406d-3397-4907-a536-2a4b77512bc6
Project "C:\Program Files\Jenkins\jobs\AlphaBeta\...\AlphaSolution\AlphaSolution.sln" (default target(s)):
Target ValidateSolutionConfiguration:
Building solution configuration "Debug|Mixed Platforms".
Target Build:
Project "C:\Program Files\Jenkins\jobs\AlphaBeta\...\AlphaSolution\AlphaCommon\AlphaCommon.csproj" (default target(s)):
Target PrepareForBuild:
Configuration: Debug Platform: AnyCPU
Target GenerateSatelliteAssemblies:
No input files were specified for target GenerateSatelliteAssemblies, skipping.
Target CoreCompile:
Tool C:\PROGRA~1\MONO-2~1.5\bin\dmcs.bat execution started with arguments: /noconfig /debug:full /debug+ /keyfile:AlphaBeta.pfx /optimize- /out:obj\Debug\AlphaCommon.dll AlphaCommon.cs Properties\AssemblyInfo.cs /target:library /define:"DEBUG;TRACE" /reference:C:\PROGRA~1\MONO-2~1.5\lib\mono\xbuild-frameworks\.NETFramework\v4.0\RedistList\..\..\..\..\4.0\System.dll /reference:C:\PROGRA~1\MONO-2~1.5\lib\mono\xbuild-frameworks\.NETFramework\v4.0\RedistList\..\..\..\..\4.0\System.Xml.Linq.dll /reference:C:\PROGRA~1\MONO-2~1.5\lib\mono\xbuild-frameworks\.NETFramework\v4.0\RedistList\..\..\..\..\4.0\System.Data.DataSetExtensions.dll /reference:C:\PROGRA~1\MONO-2~1.5\lib\mono\xbuild-frameworks\.NETFramework\v4.0\RedistList\..\..\..\..\4.0\Microsoft.CSharp.dll /reference:C:\PROGRA~1\MONO-2~1.5\lib\mono\xbuild-frameworks\.NETFramework\v4.0\RedistList\..\..\..\..\4.0\System.Data.dll /reference:C:\PROGRA~1\MONO-2~1.5\lib\mono\xbuild-frameworks\.NETFramework\v4.0\RedistList\..\..\..\..\4.0\System.Xml.dll /reference:C:\PROGRA~1\MONO-2~1.5\lib\mono\xbuild-frameworks\.NETFramework\v4.0\RedistList\..\..\..\..\4.0\System.Core.dll /warn:4
: error CS1548: Error during assembly signing. The specified key file `AlphaBeta.pfx' has incorrect format
Task "Csc" execution -- FAILED
Done building target "CoreCompile" in project "C:\Program Files\Jenkins\jobs\AlphaBeta\...\AlphaSolution\AlphaCommon\AlphaCommon.csproj".-- FAILED
Mono does not support using PKCS#12 (.pfx) files to store keys used for strongnaming assemblies. This is a known issue and tracked on Xamarin's bugzilla #725.
A workaround is to export your key into a .snk file and use this when building your project.
The answers here provide examples of how to generate an .snk from a .pfx.