Problem to build VS-project with DCOM-refs under GitHub Actions - c#

One of the C# projects in my solution has references to 2 DCOM apps (win32, quite an old DCOM apps).
To successfully build my VS project on PC it is enough to copy 2 exe files and run 2 commands:
XObjectsEx.exe -regserver
SfGbVars.exe -regserver
And then I can run a command to build it:
msbuild SfR2.sln -p:Configuration=Release
Build is successful.
Thus, to successfully build my solution it is enough to do only these steps:
take a new clean PC install (for example: clean VM install with Windows 10/2012/2019 - just any, I tried all of these)
install MS Build Tools 2019
copy 2 exe files + run 2 mentioned commands
run mentioned build command
But(!)...
When I try to do the same under GitHub Actions it reports errors like these:
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2827,5): warning MSB3284: Cannot get the file path for type library "d6ed8d7e-1780-4747-b41b-a685526cb19b" version 1.0. Library not registered. (Exception from HRESULT: 0x8002801D (TYPE_E_LIBNOTREGISTERED)) [D:\a\spectrum-abz-scm-sw-cust\spectrum-abz-scm-sw-cust\Modules\SfManagement\SfR2\assemblies\Sf.OleOp\source\Sf.OleOp.csproj]
CoreCompile:
[...]
D:\a\spectrum-abz-scm-sw-cust\spectrum-abz-scm-sw-cust\Modules\SfManagement\SfR2\assemblies\Sf.OleOp\source\OprGbVar.cs(23,7): error CS0246: The type or namespace name 'SFGlobalVars' could not be found (are you missing a using directive or an assembly reference?) [D:\a\spectrum-abz-scm-sw-cust\spectrum-abz-scm-sw-cust\Modules\SfManagement\SfR2\assemblies\Sf.OleOp\source\Sf.OleOp.csproj]
D:\a\spectrum-abz-scm-sw-cust\spectrum-abz-scm-sw-cust\Modules\SfManagement\SfR2\assemblies\Sf.OleOp\source\OprGbVar.cs(744,17): error CS0246: The type or namespace name 'SFGlobalVars' could not be found (are you missing a using directive or an assembly reference?) [D:\a\spectrum-abz-scm-sw-cust\spectrum-abz-scm-sw-cust\Modules\SfManagement\SfR2\assemblies\Sf.OleOp\source\Sf.OleOp.csproj]
CompilerServer: server - server processed compilation - 93f84f1f-193a-4dcc-9b12-98452dca1411
In attempt to resolve this problem I added a step to YML file (a step before calling the build itself):
- name: Restore artifacts (SF)
run: build-tools\scripts\InstallArtifacts.ps1 ${{ env.RepoRoot }}/${{ env.OpcPackages_Path }}
working-directory: ${{ env.RepoRoot }}
Where InstallArtifacts.ps1 script executing also following commands:
XObjectsEx.exe -regserver
SfGbVars.exe -regserver
rem ===== .NET registration =====
set NetHome=C:\Windows\Microsoft.NET\Framework\v4.0.30319
set SdkHome=C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.7.2 Tools
"%SdkHome%\TlbImp.exe" SfGbVars.exe /out:SfGbVars_Net.dll
"%SdkHome%\TlbImp.exe" XObjectsEx.exe /out:XObjectsEx_Net.dll
"%NetHome%\RegAsm.exe" SfGbVars_Net.dll
"%NetHome%\RegAsm.exe" XObjectsEx_Net.dll
In GitHub Actions output I clearly see that all these commands were correctly executed. In output it writes "Types registered successfully" and so on.
Also I checked generated SfGbVars_Net.dll and XObjectsEx_Net.dll with Reflector and confirms - there is a valid .NET wrappers for these DCOM objects.
However that does not affect the build result. It is still reporting the same errors! :-\
Could you please advise - how to resolve this problem?
Why there is such a strange difference in behavior between normal PC and virtual PC under GitHub Actions? So, on PC it is enough to run {app} -regserver command but under GitHub Actions that does not work.
Note:
here example of my YML file - https://drive.google.com/file/d/1Id-sMWT7BrGj-TBGvmVEpPIVe_kH9IJq/view?usp=share_link

Related

"dotnet build" command fails with error MSB6006: "csc.exe" exited with code 1

I'm trying to get a Xamarin Forms solution to build from the command line as part of a build script using the command dotnet build <solution.sln>. Most of the projects in the solution build; however, two projects fail with this error message: error MSB6006: "csc.exe" exited with code 1.(on Ubuntu) and error MSB6006: "csc.exe" exited with code 8. (on Mac).
I have running Ubuntu 18.04 (using Windows subsystem for Linux) and MacOS 10.13.6 on separate machines.
I have also tried to run dotnet build <solution.sln> from the windows command line which prints out this error message instead:
error MSB4062: The "XamarinLive.Build.XamarinLiveTask" task could not be loaded from the assembly C:\Users\Jason.nuget\packages\livexaml\2.1.22\build\XamarinLive.Build.dll. Could not load file or assembly 'Microsoft.Build.Utilities.v4.0, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the file specified. 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.
However, the solution works and builds fine from within VS2017 (Version 15.9.7). I've tried scouring the binary log that is generated but I can't make much sense of it and there doesn't seem to be any obvious errors (on Ubuntu & Mac). Could the windows error message be related in some way?
The projects that are failing target netstandard 2.0 (The same as the projects that do build). The version returned by dotnet --version on all 3 environments is 2.1.504.
Any help would be greatly appreciated.
You need to use msbuild.exe instead of dotnet
build
for this situation.
msbuild.exe runs on full framework while dotnet buildruns on .NET Core, and most of the build tasks don't support that.
When you build them in VS,it actually calls the msbuild.exe to build the solution.So you can build it well by developer command prompt since it also calls the msbuild.exe.
For vs2017, you can find it in C:\Program Files (x86)\Microsoft Visual Studio\2017\Edition\MSBuild\15.0\Bin.
More details see Martin's answer from this similar issue. Thanks to his detailed description!

Generation of the sonar-properties file failed. Unable to complete SonarQube analysis

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

Azure deployment failes due to missing assembly reference

So I have a simple C# Web API project that I'm attempting to get deployed into Azure. The project builds and runs fine locally (dont they always?!?) but in Azure it fails due to a missing Microsoft.ServiceBus assembly which is used.
The project structure is quite simple:
\
--\Common
----MyProj.common.dll << This uses Microsoft.ServiceBus and has its own packages.config with WindowsAzure.ServiceBus referenced
--\Web
----MyProj.Api << This has an assembly reference to MyProj.common.dll. It doesn't have a reference to WindowsAzure.ServiceBus itself (although I added one to see if it helped, but it didn't)
The output from the Azure deployment script is as follows:
Command: "D:\home\site\deployments\tools\deploy.cmd"
Handling ASP.NET Core Web Application deployment.
Restoring packages for D:\home\site\repository\MyProj\Web\MyProj.Api\MyProj.Api.csproj...
Installing WindowsAzure.ServiceBus 4.0.0.
Writing lock file to disk. Path: D:\home\site\repository\MyProj\Web\MyProj.Api\obj\project.assets.json
Restore completed in 12.73 sec for D:\home\site\repository\MyProj\Web\MyProj.Api\MyProj.Api.csproj.
NuGet Config files used:
D:\local\AppData\NuGet\NuGet.Config
Feeds used:
https://api.nuget.org/v3/index.json
Installed:
1 package(s) to D:\home\site\repository\MyProj\Web\MyProj.Api\MyProj.Api.csproj
Microsoft (R) Build Engine version 15.1.548.43366
Copyright (C) Microsoft Corporation. All rights reserved.
D:\Program Files (x86)\dotnet\sdk\1.0.1\Microsoft.Common.CurrentVersion.targets(1964,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "Microsoft.ServiceBus, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [D:\home\site\repository\MyProj\MyProj.Shared\MyProj.Common.csproj]
Azure\AQM.cs(7,17): error CS0234: The type or namespace name 'ServiceBus' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?) [D:\home\site\repository\MyProj\MyProj.Shared\MyProj.Common.csproj]
Azure\AQM.cs(8,17): error CS0234: The type or namespace name 'ServiceBus' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?) [D:\home\site\repository\MyProj\MyProj.Shared\MyProj.Common.csproj]
Azure\AQM.cs(14,17): error CS0246: The type or namespace name 'NamespaceManager' could not be found (are you missing a using directive or an assembly reference?) [D:\home\site\repository\MyProj\MyProj.Shared\MyProj.Common.csproj]
D:\Program Files (x86)\dotnet\sdk\1.0.1\Sdks\Microsoft.NET.Sdk\build\Microsoft.NET.Sdk.targets(92,5): error : Cannot find project info for 'D:\home\site\repository\MyProj\MyProj.Shared\MyProj.Common.csproj'. This can indicate a missing project reference. [D:\home\site\repository\MyProj\Web\MyProj.Api\MyProj.Api.csproj]
Failed exitCode=1, command=dotnet publish "MyProj\Web\MyProj.Api\MyProj.Api.csproj" --output "D:\local\Temp\8d493823074840c" --configuration Release
An error has occurred during web site deployment.
\r\nD:\Program Files (x86)\SiteExtensions\Kudu\62.60430.2807\bin\Scripts\starter.cmd "D:\home\site\deployments\tools\deploy.cmd"
I notice at no point does it attempt to restore the package for the Common assembly - how do I 'tell' Azure to do this? And is this even the issue?
Edit 1
Looking at the deployment script using Kudu, it seems to be doing a solution wide restore, so not sure how/why there is a missing assembly reference:
:: 1. Restore nuget packages
call :ExecuteCmd dotnet restore "MyProj\MyProj.sln"
IF !ERRORLEVEL! NEQ 0 goto error
Thanks
I notice at no point does it attempt to restore the package for the Common assembly - how do I 'tell' Azure to do this? And is this even the issue?
According to your description, your project is .net core project.
You mentioned Servicebus Libriary (WindowsAzure.ServiceBus 4.0.0) is not .NET Core compatible. And the new Libriary, that is a pre-release version, is 100% compatible. We can get more detail here.
We also can find it from another SO thread.
Edit:
According to your comment I update the answer:
I also try to create C# Web API project and deploy to Azure it works correctly on my side.
Please have a try to clean the build and rebuild the project again with a new WebApp.
The following is my detail steps:
1.Create a class libiary project named common and a public ServiceBusHelper class with function GetQueue
2.Create a WebApp project and reference Common.dll and Microsoft.ServiceBus.dll, then change the getvaules function to get queues
public List<QueueDescription> Get()
{
var queueList = Common.ServiceBusHelper.GetQueueList();
return queueList;
}
3.Remove the existed file from the Auzre WebApp during publish the WebApi to Azure
4.Test the WebApp

Unable to create a Package in Xamarin Studio 4.0.12

I have a code which is developed in Mono framework & I need to do some changes into it; I have made some & now I am trying to make a package so I can deploy it on Mac. But some how its giving me error & I am not able to create a package.
It gives error saying Solution could not be deployed: . An unspecified error occurred while running 'autogen.sh' (the error log is provided below)
ERROR LOG (Tool output):
Creating packages
Package: Tarball
Building Solution: WebDisk.Mono (Debug|x86)
Building: WebDisk.Mono (Debug|x86)
Performing main compilation...
/Library/Frameworks/Mono.framework/Versions/3.2.1/bin/mcs /noconfig "/r:/Library/Frameworks/Mono.framework/Versions/3.2.1/lib/mono/2.0/mscorlib.dll" -nostdlib "/out:/var/folders/n5/m2b64gg513q8r195mhv3kc6h0000gn/T/mdTmpDir1260862193/WebDisk.Mono/bin/Debug/WebDisk.Mono.exe" "/r:/Library/Frameworks/Mono.framework/Versions/3.2.1/lib/mono/2.0/System.dll" "/r:/Library/Frameworks/Mono.framework/Versions/3.2.1/lib/mono/gtk-sharp-2.0/gtk-sharp.dll" "/r:/Library/Frameworks/Mono.framework/Versions/3.2.1/lib/mono/gtk-sharp-2.0/glib-sharp.dll" "/r:/Library/Frameworks/Mono.framework/Versions/3.2.1/lib/mono/gtk-sharp-2.0/gdk-sharp.dll" "/r:/Library/Frameworks/Mono.framework/Versions/3.2.1/lib/mono/gtk-sharp-2.0/glade-sharp.dll" "/r:/Library/Frameworks/Mono.framework/Versions/3.2.1/lib/mono/gtk-sharp-2.0/pango-sharp.dll" "/r:/Library/Frameworks/Mono.framework/Versions/3.2.1/lib/mono/gtk-sharp-2.0/atk-sharp.dll" "/r:/Library/Frameworks/Mono.framework/Versions/3.2.1/lib/mono/2.0/System.Drawing.dll" "/r:/Library/Frameworks/Mono.framework/Versions/3.2.1/lib/mono/2.0/System.Drawing.Design.dll" "/r:/Library/Frameworks/Mono.framework/Versions/3.2.1/lib/mono/2.0/System.Data.dll" "/r:/Library/Frameworks/Mono.framework/Versions/3.2.1/lib/mono/2.0/System.Data.DataSetExtensions.dll" "/r:/Library/Frameworks/Mono.framework/Versions/3.2.1/lib/mono/2.0/System.Web.Services.dll" "/r:/Library/Frameworks/Mono.framework/Versions/3.2.1/lib/mono/2.0/System.Xml.dll" "/r:/Library/Frameworks/Mono.framework/Versions/3.2.1/lib/mono/2.0/Mono.Posix.dll" "/r:/Library/Frameworks/Mono.framework/Versions/3.2.1/lib/mono/2.0/Mono.Cairo.dll" "/r:/Library/Frameworks/Mono.framework/Versions/3.2.1/lib/mono/2.0/System.Configuration.dll" "/r:/Library/Frameworks/Mono.framework/Versions/3.2.1/lib/mono/2.0/System.Windows.Forms.dll" "/r:/var/folders/n5/m2b64gg513q8r195mhv3kc6h0000gn/T/mdTmpDir1260862193/WebDisk.Mono/Assets/WebDisk.Client.BusinessLogic.dll" "/r:/var/folders/n5/m2b64gg513q8r195mhv3kc6h0000gn/T/mdTmpDir1260862193/WebDisk.Mono/Assets/WebDisk.Client.ObjectModel.dll" "/r:/var/folders/n5/m2b64gg513q8r195mhv3kc6h0000gn/T/mdTmpDir1260862193/WebDisk.Mono/Assets/WebDisk.Common.dll" "/r:/var/folders/n5/m2b64gg513q8r195mhv3kc6h0000gn/T/mdTmpDir1260862193/WebDisk.Mono/Assets/WebDisk.Client.ServiceGateway.dll" "/r:/var/folders/n5/m2b64gg513q8r195mhv3kc6h0000gn/T/mdTmpDir1260862193/WebDisk.Mono/Assets/UpdateManager.dll" "/r:/Library/Frameworks/Mono.framework/Versions/3.2.1/lib/mono/2.0/ICSharpCode.SharpZipLib.dll" "/r:/Library/Frameworks/Mono.framework/Versions/3.2.1/lib/mono/2.0/System.Core.dll" /nologo /warn:4 /debug:full /optimize- /codepage:utf8 /platform:x86 "/define:DEBUG" /main:WebDisk.MainClass /t:winexe "/res:/var/folders/n5/m2b64gg513q8r195mhv3kc6h0000gn/T/mdTmpDir1260862193/WebDisk.Mono/gtk-gui/gui.stetic,gui.stetic" "/res:/var/folders/n5/m2b64gg513q8r195mhv3kc6h0000gn/T/mdTmpDir1260862193/WebDisk.Mono/Assets/FileCheckOut.png,WebDisk.Mono.Assets.FileCheckOut.png" "/res:/var/folders/n5/m2b64gg513q8r195mhv3kc6h0000gn/T/mdTmpDir1260862193/WebDisk.Mono/Assets/download.ico,WebDisk.Mono.Assets.download.ico" "/res:/var/folders/n5/m2b64gg513q8r195mhv3kc6h0000gn/T/mdTmpDir1260862193/WebDisk.Mono/ClientMessages.xml,WebDisk.Mono.ClientMessages.xml" "/res:/var/folders/n5/m2b64gg513q8r195mhv3kc6h0000gn/T/mdTmpDir1260862193/WebDisk.Mono/DefaultTheme/Theme.config,WebDisk.Mono.DefaultTheme.Theme.config" "/res:/var/folders/n5/m2b64gg513q8r195mhv3kc6h0000gn/T/mdTmpDir1260862193/WebDisk.Mono/DefaultTheme/images/AddNewFile.png,WebDisk.Mono.DefaultTheme.images.AddNewFile.png" "/res:/var/folders/n5/m2b64gg513q8r195mhv3kc6h0000gn/T/mdTmpDir1260862193/WebDisk.Mono/DefaultTheme/images/CancelCheckout.png,WebDisk.Mono.DefaultTheme.images.CancelCheckout.png" "/res:/var/folders/n5/m2b64gg513q8r195mhv3kc6h0000gn/T/mdTmpDir1260862193/WebDisk.Mono/DefaultTheme/images/CheckInFile.png,WebDisk.Mono.DefaultTheme.images.CheckInFile.png" "/res:/var/folders/n5/m2b64gg513q8r195mhv3kc6h0000gn/T/mdTmpDir1260862193/WebDisk.Mono/DefaultTheme/images/CheckOutFile.png,WebDisk.Mono.DefaultTheme.images.CheckOutFile.png" "/res:/var/folders/n5/m2b64gg513q8r195mhv3kc6h0000gn/T/mdTmpDir1260862193/WebDisk.Mono/DefaultTheme/images/CheckoutFileIcon.png,WebDisk.Mono.DefaultTheme.images.CheckoutFileIcon.png" "/res:/var/folders/n5/m2b64gg513q8r195mhv3kc6h0000gn/T/mdTmpDir1260862193/WebDisk.Mono/DefaultTheme/images/CheckoutList.png,WebDisk.Mono.DefaultTheme.images.CheckoutList.png" "/res:/var/folders/n5/m2b64gg513q8r195mhv3kc6h0000gn/T/mdTmpDir1260862193/WebDisk.Mono/DefaultTheme/images/DeleteFolder.png,WebDisk.Mono.DefaultTheme.images.DeleteFolder.png" "/res:/var/folders/n5/m2b64gg513q8r195mhv3kc6h0000gn/T/mdTmpDir1260862193/WebDisk.Mono/DefaultTheme/images/DeleteFolder1.png,WebDisk.Mono.DefaultTheme.images.DeleteFolder1.png" "/res:/var/folders/n5/m2b64gg513q8r195mhv3kc6h0000gn/T/mdTmpDir1260862193/WebDisk.Mono/DefaultTheme/images/DowloadFolder.png,WebDisk.Mono.DefaultTheme.images.DowloadFolder.png" "/res:/var/folders/n5/m2b64gg513q8r195mhv3kc6h0000gn/T/mdTmpDir1260862193/WebDisk.Mono/DefaultTheme/images/download.ico,WebDisk.Mono.DefaultTheme.images.download.ico" "/res:/var/folders/n5/m2b64gg513q8r195mhv3kc6h0000gn/T/mdTmpDir1260862193/WebDisk.Mono/DefaultTheme/images/DownloadFile.png,WebDisk.Mono.DefaultTheme.images.DownloadFile.png" "/res:/var/folders/n5/m2b64gg513q8r195mhv3kc6h0000gn/T/mdTmpDir1260862193/WebDisk.Mono/DefaultTheme/images/EditFileIcon.png,WebDisk.Mono.DefaultTheme.images.EditFileIcon.png" "/res:/var/folders/n5/m2b64gg513q8r195mhv3kc6h0000gn/T/mdTmpDir1260862193/WebDisk.Mono/DefaultTheme/images/FileCheckOut.png,WebDisk.Mono.DefaultTheme.images.FileCheckOut.png" "/res:/var/folders/n5/m2b64gg513q8r195mhv3kc6h0000gn/T/mdTmpDir1260862193/WebDisk.Mono/DefaultTheme/images/FileIcon.png,WebDisk.Mono.DefaultTheme.images.FileIcon.png" "/res:/var/folders/n5/m2b64gg513q8r195mhv3kc6h0000gn/T/mdTmpDir1260862193/WebDisk.Mono/DefaultTheme/images/FolderNormal.png,WebDisk.Mono.DefaultTheme.images.FolderNormal.png" "/res:/var/folders/n5/m2b64gg513q8r195mhv3kc6h0000gn/T/mdTmpDir1260862193/WebDisk.Mono/DefaultTheme/images/NewFolderAdd.png,WebDisk.Mono.DefaultTheme.images.NewFolderAdd.png" "/res:/var/folders/n5/m2b64gg513q8r195mhv3kc6h0000gn/T/mdTmpDir1260862193/WebDisk.Mono/DefaultTheme/images/permission.png,WebDisk.Mono.DefaultTheme.images.permission.png" "/res:/var/folders/n5/m2b64gg513q8r195mhv3kc6h0000gn/T/mdTmpDir1260862193/WebDisk.Mono/DefaultTheme/images/Property.png,WebDisk.Mono.DefaultTheme.images.Property.png" "/res:/var/folders/n5/m2b64gg513q8r195mhv3kc6h0000gn/T/mdTmpDir1260862193/WebDisk.Mono/DefaultTheme/images/Refresh.png,WebDisk.Mono.DefaultTheme.images.Refresh.png" "/res:/var/folders/n5/m2b64gg513q8r195mhv3kc6h0000gn/T/mdTmpDir1260862193/WebDisk.Mono/DefaultTheme/images/Rename.png,WebDisk.Mono.DefaultTheme.images.Rename.png" "/res:/var/folders/n5/m2b64gg513q8r195mhv3kc6h0000gn/T/mdTmpDir1260862193/WebDisk.Mono/DefaultTheme/images/SelectedFolder.png,WebDisk.Mono.DefaultTheme.images.SelectedFolder.png" "/res:/var/folders/n5/m2b64gg513q8r195mhv3kc6h0000gn/T/mdTmpDir1260862193/WebDisk.Mono/DefaultTheme/images/Thumbs.db,WebDisk.Mono.DefaultTheme.images.Thumbs.db" "/res:/var/folders/n5/m2b64gg513q8r195mhv3kc6h0000gn/T/mdTmpDir1260862193/WebDisk.Mono/DefaultTheme/images/View.png,WebDisk.Mono.DefaultTheme.images.View.png" "/res:/var/folders/n5/m2b64gg513q8r195mhv3kc6h0000gn/T/mdTmpDir1260862193/WebDisk.Mono/DefaultTheme/images/webdisk-connect.ico,WebDisk.Mono.DefaultTheme.images.webdisk-connect.ico" "/res:/var/folders/n5/m2b64gg513q8r195mhv3kc6h0000gn/T/mdTmpDir1260862193/WebDisk.Mono/DefaultTheme/images/webdisk-connection.png,WebDisk.Mono.DefaultTheme.images.webdisk-connection.png" "/res:/var/folders/n5/m2b64gg513q8r195mhv3kc6h0000gn/T/mdTmpDir1260862193/WebDisk.Mono/DefaultTheme/images/webdisk-disconnect.ico,WebDisk.Mono.DefaultTheme.images.webdisk-disconnect.ico" "/res:/var/folders/n5/m2b64gg513q8r195mhv3kc6h0000gn/T/mdTmpDir1260862193/WebDisk.Mono/DefaultTheme/images/webdisk-disconnection.png,WebDisk.Mono.DefaultTheme.images.webdisk-disconnection.png" "/res:/var/folders/n5/m2b64gg513q8r195mhv3kc6h0000gn/T/mdTmpDir1260862193/WebDisk.Mono/App.icns,WebDisk.Mono.App.icns" "/var/folders/n5/m2b64gg513q8r195mhv3kc6h0000gn/T/mdTmpDir1260862193/WebDisk.Mono/Classes/CommonUtility.cs" "/var/folders/n5/m2b64gg513q8r195mhv3kc6h0000gn/T/mdTmpDir1260862193/WebDisk.Mono/gtk-gui/generated.cs" "/var/folders/n5/m2b64gg513q8r195mhv3kc6h0000gn/T/mdTmpDir1260862193/WebDisk.Mono/MainWindow.cs" "/var/folders/n5/m2b64gg513q8r195mhv3kc6h0000gn/T/mdTmpDir1260862193/WebDisk.Mono/gtk-gui/MainWindow.cs" "/var/folders/n5/m2b64gg513q8r195mhv3kc6h0000gn/T/mdTmpDir1260862193/WebDisk.Mono/AssemblyInfo.cs" "/var/folders/n5/m2b64gg513q8r195mhv3kc6h0000gn/T/mdTmpDir1260862193/WebDisk.Mono/Classes/Menubar.cs" "/var/folders/n5/m2b64gg513q8r195mhv3kc6h0000gn/T/mdTmpDir1260862193/WebDisk.Mono/Classes/Toolbar.cs" "/var/folders/n5/m2b64gg513q8r195mhv3kc6h0000gn/T/mdTmpDir1260862193/WebDisk.Mono/MainClass.cs" "/var/folders/n5/m2b64gg513q8r195mhv3kc6h0000gn/T/mdTmpDir1260862193/WebDisk.Mono/Classes/WebDiskEvents.cs" "/var/folders/n5/m2b64gg513q8r195mhv3kc6h0000gn/T/mdTmpDir1260862193/WebDisk.Mono/MyCheckedOutFiles.cs" "/var/folders/n5/m2b64gg513q8r195mhv3kc6h0000gn/T/mdTmpDir1260862193/WebDisk.Mono/OpenFile.cs" "/var/folders/n5/m2b64gg513q8r195mhv3kc6h0000gn/T/mdTmpDir1260862193/WebDisk.Mono/gtk-gui/WebDisk.OpenFile.cs" "/var/folders/n5/m2b64gg513q8r195mhv3kc6h0000gn/T/mdTmpDir1260862193/WebDisk.Mono/Classes/ButtonData.cs" "/var/folders/n5/m2b64gg513q8r195mhv3kc6h0000gn/T/mdTmpDir1260862193/WebDisk.Mono/Classes/User.cs" "/var/folders/n5/m2b64gg513q8r195mhv3kc6h0000gn/T/mdTmpDir1260862193/WebDisk.Mono/OpenNewWebDisk.cs" "/var/folders/n5/m2b64gg513q8r195mhv3kc6h0000gn/T/mdTmpDir1260862193/WebDisk.Mono/gtk-gui/WebDisk.OpenNewWebDisk.cs" "/var/folders/n5/m2b64gg513q8r195mhv3kc6h0000gn/T/mdTmpDir1260862193/WebDisk.Mono/ClientConfiguration.cs" "/var/folders/n5/m2b64gg513q8r195mhv3kc6h0000gn/T/mdTmpDir1260862193/WebDisk.Mono/gtk-gui/WebDisk.ClientConfiguration.cs" "/var/folders/n5/m2b64gg513q8r195mhv3kc6h0000gn/T/mdTmpDir1260862193/WebDisk.Mono/FolderProperty.cs" "/var/folders/n5/m2b64gg513q8r195mhv3kc6h0000gn/T/mdTmpDir1260862193/WebDisk.Mono/Classes/FolderInfo.cs" "/var/folders/n5/m2b64gg513q8r195mhv3kc6h0000gn/T/mdTmpDir1260862193/WebDisk.Mono/gtk-gui/WebDisk.FolderProperty.cs" "/var/folders/n5/m2b64gg513q8r195mhv3kc6h0000gn/T/mdTmpDir1260862193/WebDisk.Mono/Classes/CustomViews.cs" "/var/folders/n5/m2b64gg513q8r195mhv3kc6h0000gn/T/mdTmpDir1260862193/WebDisk.Mono/RenameDialog.cs" "/var/folders/n5/m2b64gg513q8r195mhv3kc6h0000gn/T/mdTmpDir1260862193/WebDisk.Mono/gtk-gui/WebDisk.Mono.RenameDialog.cs" "/var/folders/n5/m2b64gg513q8r195mhv3kc6h0000gn/T/mdTmpDir1260862193/WebDisk.Mono/StatusBar.cs" "/var/folders/n5/m2b64gg513q8r195mhv3kc6h0000gn/T/mdTmpDir1260862193/WebDisk.Mono/gtk-gui/WebDisk.Mono.StatusBar.cs" "/var/folders/n5/m2b64gg513q8r195mhv3kc6h0000gn/T/mdTmpDir1260862193/WebDisk.Mono/gtk-gui/WebDisk.Mono.MyCheckedOutFiles.cs" "/var/folders/n5/m2b64gg513q8r195mhv3kc6h0000gn/T/mdTmpDir1260862193/WebDisk.Mono/Classes/UploadDownload.cs" "/var/folders/n5/m2b64gg513q8r195mhv3kc6h0000gn/T/mdTmpDir1260862193/WebDisk.Mono/UserListView.cs" "/var/folders/n5/m2b64gg513q8r195mhv3kc6h0000gn/T/mdTmpDir1260862193/WebDisk.Mono/gtk-gui/WebDisk.Mono.UserPermission.cs" "/var/folders/n5/m2b64gg513q8r195mhv3kc6h0000gn/T/mdTmpDir1260862193/WebDisk.Mono/UserPermission.cs" "/var/folders/n5/m2b64gg513q8r195mhv3kc6h0000gn/T/mdTmpDir1260862193/WebDisk.Mono/Classes/WebDiskStatusBar.cs" "/var/folders/n5/m2b64gg513q8r195mhv3kc6h0000gn/T/mdTmpDir1260862193/WebDisk.Mono/Classes/WebDiskTrayIcon.cs" "/var/folders/n5/m2b64gg513q8r195mhv3kc6h0000gn/T/mdTmpDir1260862193/WebDisk.Mono/Classes/CheckinFile.cs" "/var/folders/n5/m2b64gg513q8r195mhv3kc6h0000gn/T/mdTmpDir1260862193/WebDisk.Mono/Classes/OperationQueue.cs" "/var/folders/n5/m2b64gg513q8r195mhv3kc6h0000gn/T/mdTmpDir1260862193/WebDisk.Mono/About.cs" "/var/folders/n5/m2b64gg513q8r195mhv3kc6h0000gn/T/mdTmpDir1260862193/WebDisk.Mono/gtk-gui/WebDisk.Mono.About.cs"
Compilation succeeded - 22 warning(s)
Build complete -- 0 errors, 22 warnings
Generating Autotools files for Solution WebDisk.Mono
Creating Makefile.am for Solution WebDisk.Mono
Creating Makefile.am for Project WebDisk.Mono
Creating autogen.sh
Creating configure.ac
Creating Makefile.include
Adding variables to top-level Makefile
Deploying Solution to Tarball
You must have autoconf installed to compile WebDisk.Mono.
Download the appropriate package for your distribution,
or get the source tarball at ftp://ftp.gnu.org/pub/gnu/
You must have automake installed to compile WebDisk.Mono.
Get ftp://sourceware.cygnus.com/pub/automake/automake-1.4.tar.gz
(or a newer version if it is available)
Autotools files were successfully generated.
Solution could not be deployed: . An unspecified error occurred while running 'autogen.sh'
Any solution regarding this will help a lot... Thanks
CONFIGURATIONS:
Xamarin Studio 4.0.12
Mono 3.2.1

Mono xbuild error CS1548 - key file has incorrect format

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.

Categories

Resources