I have installed Resharper command line in my build server, and I added command line task in my VSTS build profile like below:
Build profile
In my project, we are using xUnit test project, so here my main concern is with target executable path. I tried installing xUnit as it is VS extension. But how can I use xUnit as target executable?
Following is the command line I want to use:
dotcover analyse /TargetExecutable={Path to Xunit}" /TargetArguments= $(Build.SourcesDirectory)+"\xxxxxx.AD.UnitTest\bin\Release\VonExpy.AD.UnitTest.dll" /Output="AppCoverageReport.html" /ReportType="HTML"
Regarding unable to find the TargetArguments path issue, the value of TargetArguments parameter is incorrect, change it to
/TargetArguments="$(Build.SourcesDirectory)\xxxxxx.AD.UnitTest\bin\Release\VonExpy.AD.UnitTest.dll"
Regarding xUnit test, based on this thread: Error encountered when running dotcover console runner using xunit as the target executable, you need to use xunit.console.exe in xunit.runner.console package.
Related
I'm using Atom as a latex editor, with packages build, language-latex, and latextools installed. Now when I try and build using Ctrl-Alt-B, the latex file compiles and gives a pdf output, but when I build using f9, an error is thrown that says:
No eligible build target.
No configuration to build this project exists.
Also, when I press f7 to show the build targets, it says "no targets found."
Could someone enlighten me as to what I'm missing in the setup for latex?
The build package is an unopinionated base package that requires the installation of separate service providers. In the case of LaTeX, you likely want to use build-latex.
you need a base branch or a template theme to include hot keys for your specific thread or template...
I recommend using sphinx
https://www.sphinx-doc.org/en/master/contents.html
https://www.sphinx-doc.org/en/master/py-modindex.html
I am using intellij to create a Kotlin Multiplatform Project for Android and iOS. I have not done any changes to the generated template but when opening the iOS Project in xcode and running it, it shows Build Failed with this logs.
/Users/archie.quinones/Library/Developer/Xcode/DerivedData/iosApp-bwuvtubwlwgrwofszlveznlcosbj/Build/Intermediates.noindex/iosApp.build/Debug-iphonesimulator/app.build/Script-F861D812207FA4320085E80D.sh: line 2: /Users/archie.quinones/IdeaProjects/MppApplication/iosApp/../gradlew: No such file or directory
Command PhaseScriptExecution failed with a nonzero exit code
Can some guide me how to make this work?
Thank you very much.
There is a small confusion here. AFAIK, there should be a note in your Gradle script, with something like
//Before opening the project from iosApp directory in Xcode,
// make sure all Gradle infrastructure exists (gradle.wrapper, gradlew).
So please, open the project directory in Terminal and execute gradle wrapper task manually.
This is a known issue of the Kotlin/MPP wizard, here is the ticket. It is not a problem, as you can produce the wrapper by yourself, but I agree, that it might be unobvious.
I am trying to build my project from the command line targeting iOS.
When I build this from the editor, everything works! I have a PostProcess build script that I use.
When I try to build form the command line using the following command:
/Applications/Unity/Unity.app/Contents/MacOS/Unity -quit -batchmode -executeMethod BuildScript.BuildIOS -nographics -buildTarget iOS
I am getting an error from my PostProcess build script saying:
Assets/Editor/MyBuildPostprocessor.cs(9,23): error CS0234: The type or namespace name Xcode' does not exist in the namespaceUnityEditor.iOS'. Are you missing an assembly reference?
The line that generates the error is a simple using clause:
using UnityEditor.iOS.Xcode;
So it seems that for some reason, the command line build mechanism does not recognise the UnityEditor.iOS.Xcode assembly, and my PostProcess build script cannot run.
Any ideas?
This is a known case when iOS project is built manually in Unity without errors and fails building on build-server (Unity cloud, Jenkins, TeamCity and others). I think that your case is similar with it. Because if you take a look at the build-server process of building Unity app you'll see that it also uses command line command
/Applications/Unity/Unity.app/Contents/MacOS/Unity -quit -batchmode -executeMethod BuildScript.BuildIOS -nographics -buildTarget iOS
As for build-server issue, the solution is to put all your post-process scripts inside #if UNITY_IOS condition. And it's possible that you've misunderstood the error you get. Unity says that it doesn't understand XCode namespace while trying to include your post-process script inside your build. And of course, Unity can't include XCode namespace because it's available in Unity Editor only.
So try adding #if UNITY_IOS at the very beginning of your post-process source, even before using section and #endif the the very end of the source. In this case Unity won't compile post-process script during building phase, but will call your post-process script after XCode project will be created.
Unfortunately, I couldn't find any information why manual and command line build processes differ.
We have implemented Continuous Integration with Jenkins to help perform our builds for faster deployment. We have reviewed the documentation provided through the Xamarin website, and have come to an issue. In the walkthrough it describes how to use various plugins to perform the process, we use build scripts to perform our builds because we have some post-actions that we execute after the build, such as submitting the ipa to the TestFlight. The problem is that for iOS it is has been documented that we need to use xbuild instead of mdtool when building from the terminal/command line.
We followed this portion of the guide to construct our xbuild within the build script. It appears that the xbuild command works and creates the project reference dlls and even generates an exe, but does not generate an ipa file even if we set this /p:BuildIpa=true on the xbuild to ensure the ipa generation. We also have provided a location for the ipa to be generated within to ensure we are not missing the file with this /p:IpaPackageDir=$BUILD_PATH. Here is the whole xbuild command that we are currently using, is there something that is incorrect or we are missing?
/Library/Frameworks/Mono.framework/Commands/xbuild $PROJECT_FILE / t:Build /p:BuildIpa=true /p:IpaPackageDir=$BUILD_PATH /p:Configuration=”Release” /p:Platform=”iPhone” /p:OutputPath=$BUILD_PATH
($BUILD_PATH) -- The build path is just “%WORKSPACE%\bin\iPhone\Release\”
I did find this resource as well, which states that xbuild requires the solution file for iOS to build correctly, is that correct?
If this is correct, how do we resolve these errors because I have not been able to find any documentation that explains how to properly define the solution and project files for xbuild deployment, or even how to exclude particular projects during the build:
/Users/developer/.jenkins/workspace/Mobile3_Branch_3.20/ServicePro/iOS/Mobile3.Forms.UWP/Mobile3.Forms.UWP.csproj: warning : Could not find project file /Library/Frameworks/Mono.framework/External/xbuild/Microsoft/WindowsXaml/v14.0/Microsoft.Windows.UI.Xaml.CSharp.targets, to import. Ignoring.
/Users/developer/.jenkins/workspace/Mobile3_Branch_3.20/ServicePro/iOS/Mobile3.ServicePro.UWP/Mobile3.ServicePro.UWP.csproj: warning : Could not find project file /Library/Frameworks/Mono.framework/External/xbuild/Microsoft/WindowsXaml/v14.0/Microsoft.Windows.UI.Xaml.CSharp.targets, to import. Ignoring.
Project "/Users/developer/.jenkins/workspace/Mobile3_Branch_3.20/ServicePro/iOS/Mobile3.sln" (Mobile3.ServicePro.iOS target(s)):
Target ValidateSolutionConfiguration:
/Users/developer/.jenkins/workspace/Mobile3_Branch_3.20/ServicePro/iOS/Mobile3.sln: error : Invalid solution configuration and platform: "“Release”|“iPhone”".
Task "Error" execution -- FAILED
Done building target "ValidateSolutionConfiguration" in project "/Users/developer/.jenkins/workspace/Mobile3_Branch_3.20/ServicePro/iOS/Mobile3.sln".-- FAILED
Done building project "/Users/developer/.jenkins/workspace/Mobile3_Branch_3.20/ServicePro/iOS/Mobile3.sln".-- FAILED
Here is the xbuild command we used to build the solution:
/Library/Frameworks/Mono.framework/Commands/xbuild /p:Configuration=”Release” /p:Platform=”iPhone” /p:OutputPath=$BUILD_PATH /p:BuildIpa=true /p:IpaPackageDir=$BUILD_PATH /t:Build $SOLUTION_FILE
We are not concerned with building the UWP projects when building the iOS project because we have a separate build script that generates the appxbundle file correctly.
You can build an "individual project/app" by setting the SolutionDir and building a .csproj, all the referenced projects will be built and an .ipa created, something like:
xbuild
/p:SolutionDir="./src"
/p:OutputPath="$PWD/artifacts/"
/p:IpaPackageDir="$PWD/artifacts/"
/p:Configuration=Release
/p:Platform=iPhone
/target:Build
src/iOS/XamarinForms.iOS.csproj
Note: This assumes your provisioning profiles are setup on this Mac.
I try to use Realm database(version 0.74.1) in Xamarin.Android project. When I do build all is ok, but when I try to run project i get error
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets: Error: Error executing task BuildApk: /{SolutionPath} /packages/Realm.0.74.1/lib/MonoAndroid44/arm64-v8a/libwrappers.so.
what I can do in this situation?
The APK is not built during the default build phase so you only get verification that libraries are in the right place when you run the debugger, or explicitly build an APK.
Can you check if the libwrappers.so file is actually in that location in the packages directory? It should have been put there by NuGet.
Also, is there just one Android target in the solution or have you created a PCL and Android target. The NuGet needs installing into both.