Doing an Ant Build on Android Studio - ant

Does Android Studio support Ant builds?
I want to run a before-compilation Ant target.
Android Studio is new, so it seems possible it's not supported in favor of Gradle.

[EDIT]
So it seems that Studio isn't meant to fully support Ant builds (see comments)
It worked fine for me until now, but I suppose there are specific configuration were it won't work as well.
InteliJ IDEA 13 EAP has all Studio features and supports Ant.
I would also like to point out that Gradle also support pre-build tasks, so you might want to consider switching to Gradle.
For those who will go will make that choice, you can generate a Gradle buil from your Eclipse project (Note : I haven't tested it, but it should take you less than minutes to try it out and see if it works for your project).
[ORIGINAL REPLY]
Android Studio definitively supports Ant builds. I have been using it on my company's project and it works fine.
But you are right that it strongly recommend Gradle, making it the default compiler for all new project created with Android Studio (but you could actually switch back to Ant).
Finally, as JoeHz pointed out, Android Studio is based on the open source version of IntelliJ, so you can also go download this version (which is currently much more stable than Android Studio).

Android Studio is based on Intellij IDEA which certainly supports Ant. It can also read the Android Studio project file.
If you can deal with the two Android Studio features that currently aren't in the IDEA 13 EAP yet, you can download that and create an Ant Build.
http://blogs.jetbrains.com/idea/2013/05/intellij-idea-13-early-preview-is-out/

Related

Visual Studio 2019 Test Explorer puts all tests under "Not Run Tests"

I have a ASP.Net Core 3 project with Visual Studio Professional 19.4.1 with xUnit 2.4.0. I have a couple of tests written there. My problem is that Visual Studio shows all the tests in this project always under "Not Run Tests". The same tests run well with command line (dotnet test) or another computer.
Repairing/Reinstalling Visual Studio did not help.
Any help is much needed!
UPDATE: I also realized that extension DotNet Extensions for Test Explorer is not present on this computer. This is present on other computer where these work. The problem, however, is how and where to get this extension from?
I already have xunit.runner.visualstudio 2.4.0 included in the project.
Any help is much valuable!!!
Upgrade the nuget package Microsoft.NET.Test.Sdk to version 16.4.0 (or newer).
When creating a new xunit project in vs2019, the version of Microsoft.NET.Test.Sdk installed is 16.2.0, which xunit.runner.visualstudio (v2.4.0 or newer) doesn't seem to work in.
Okay, got the same error where it simply did not run any of my tests despite obviously knowing about them (visible in test explorer in Test > Test Explorer). When I pressed Run or Run all tests, it just categorized them all as "not run". To fix this I lowered my .Net Core Target framework from 3.1 to 3.0 and that fixed it for me after a clean, rebuild of the unit test project.
This error may occur if you have cloned from a repository that used a different framework.
Installing both xunit.runner.visualstudio and xunit.runner.console worked for me.

Which Specflow Visual Studio Plugin version do I need to run SpecFlow 2.2.0?

I am not able to determine, which version of the SpecFlow Visual Studio plugin I need to run the old version 2.2.0 of SpecFlow
Due to administrative constraints, we cannot use any other SpecFlow version than 2.2.0
I have tried several older versions of the VS plugin, but with my existing Code (based on SpecFlow 2.2.0), all these result in the error:
Error CS1029 #error: 'Version conflict - SpecFlow Visual Studio extension
attempted to use SpecFlow code-behind
generator 1.9, but project 'XXXXXXX' references SpecFlow 2.2.'
I suppose that I need some plugin Version, that works internally with 2.2
I cannot use the SpecFlow.Tools.MsBuild.Generation package, as this is not yet supported with 2.2.0.
Anyone can help me out? The release history of the SpecFlow Visual Studio Plugins can be found here:
https://github.com/techtalk/SpecFlow.VisualStudio/releases
EDIT
I use Visual Studio 2017 (15.9.6)
In the "packages" folder there are SpecFlow-2.2.0 and SpecFlow.MsTest-2.2.0. I deleted them, I deleted the nuget package Cache and rebuild the solution.
Problem still exists.
The error you are seeing has nothing to do with the suggestions in the comments. It is an additional check we added to the extension.
For SpecFlow 2.2 you have to use an older version of the extension. You can find them at https://github.com/techtalk/SpecFlow.VisualStudio/releases
When I am remembering correctly v2017.2.7 should work for it.
Don't forget to turn off automatic updates of the extension. If you do, you will get again the latest version.
Blog post about how to do it is here: https://specflow.org/2018/vs-integration-breaking-changes-affects-all-users/
Full disclosure: I am one of the SpecFlow and SpecFlow+ developers.
make sure you install the right Specflow extension for your VS(try uninstall and reinstall as well) also make sure you set "Enable SpecflowSingleFileGenerator to false" in VS>Tools>Options>Specflow. you only need this to be true for version 3 onward I suppose.
I had this issue, and while It worked to some extend however, I just install VS 2015 and use specflow 2.2 under that. you should be able to make it work for VS 17 I guess.

Building VS2017 .net core apps that target the full .net framework

I have created a asp.net mvc core app targeting the .net framework (not the multi platform core) as I want to include standard .net framework libraries and running cross platform is irrelevant to me as I will be hosting in Azure.
The solution looks like this:
I am trying to get a VSTS build working with this project (which is part of a larger solution) but when building I get the following error:
Which seems to be a common error. What should my build definition look like to build these .csproj based projects? There seems to be a lot of information but no definitive answer. Hopefully that answer can be here and people can stop looking elsewhere for information on how to get a Continuous Integration build going.
On a side note at the solution level I find no packages folder containing my nuget packages, why is this? The project definitely contains nuget packages.
Your project is using the newest MSBuild based project files for .NET Core.
The extension is still .csproj, but the XML schema is different than the ordinary .csproj used in .NET46 (and previous versions).
You need appropriate tooling to build such .csproj file, for example:
Visual Studio 2017: install it on your private build agent; VSTS hosted build agent does not have VS2017 installed yet;
.NET Core SDK 1.0.0-preview4-004233 (or more recent): this SDK contains the command line tool 'dotnet' for MSBuild .NET Core based projects.
Note in your build log that the msbuild used is the one shipped with VS2015 (version 14.0) instead, that does not support such .csproj format file.
On the other hand, if you do not need multiplatform nor any other benefit of .NET Core, why are you using it? Just created an ordinary ASP.NET 4 web project targetting .NET 4.6.

Using GoogleTestRunner in our TFS Build

We are using the Google Test framework (version 1.7) for unit tests in C++ project (with Visual Studio 2012 and TFS 2012). By using GoogleTestRunner for VS2012 I am able to discover the tests written in Google Test within Visual Studio and run them. So far so good :)
Now I would like to run the tests with my CI build I have set up on our TFS. Therefore I have installed the GoogleTestRunner on my build server for the user that runs our build. If I run the build (and tests) on the build server directly in Visual Studio it works - but when the build is triggered by the TFS build definition I displays the following message in the log:
No test found. Make sure that installed test discoverers & executors,
platform & framework version settings are appropriate and try again.
Any suggestion what I am missing?
Is this working for anybody at all?
Your help is highly appreciated!
Christoph
I have been able to sort it out myself :)
There is a guide showing how to get it running for NUnit. Just follow that guide and adopt it to the GoogleTestRunner:
http://bartwullems.blogspot.de/2012/10/tfs-2012-build-configure-nunit-to-run.html
I extracted the DLLs from the GoogleTestRunner.vsix file with 7zip (I assume any other Zip program would work as well). I checked in all DLLs I found there (as described in the mentioned guide) - don't know if really all DLLs are needed.

Problems building a simple F# project in Xamarin Studio on Windows 8

I've had VS2013 installed on my windows 8 laptop and F# works fine.
I've since installed Xamarin Studio version 4.2.2 but unfortunately can't get any F# project to build even a very simple one.
I installed F# Version 3.0 from the Web Installer and have installed the F# addin in Xamarin Studio and restarted it. Compiling the simple Console Project just gives me the error:
Error: Build failed. See the build log for details.
With no other details anywhere.
In the fsproj file There is the following:
<Import Project="$(MSBuildExtensionsPath32)\..\Microsoft F#\v4.0\Microsoft.FSharp.Targets"
I'm not sure where the MSBuildExtensionPath32 is set or where it currently points to but if I update this to a hard-coded path that actually points at my file:
<Import Project="C:\Program Files (x86)\Microsoft SDKs\F#\3.1\Framework\v4.0\Microsoft.FSharp.Targets" />
Then when I build the project in xamarin it builds successfully.
Is there an easy way of setting the MSBuildExtensionsPath32 to my actual path for xamarin? I don't really want to resort to having to set up a .bat file to launch it but can't find an option in xamarin to configure it.
I feel I must be missing something.
Thanks
It looks like the F# project templates are using a path to an older version of F#. There is a discussion about this on the GitHub repository for the F# addin. Hopefully the project template can be updated to support different versions of F# being installed. For now you can modify your project file.
MSBuildExtensionsPath32 points to C:\Program Files (x86)\MSBuild
So you could try modifying the project template to use the following path, which should work on your machine:
<Import Project="$(MSBuildExtensionsPath32)\..\Microsoft SDKs\F#\3.1\Framework\v4.0\Microsoft.FSharp.Targets" />

Resources