Will Xamarin 15.2.2 roll out this weekend, and will it fix SDK-style csproj?

xamarin
#22

I’d say the best would be to create a #feature-request, just for tracking purposes - if you create one you’ll be auto notified when we reply there with an update.

0 Likes

#23

@ch_kent I’ll vote on that feature request, I’ve been fighting trying to get Humanizer resource assemblies into our Xamarin.iOS app, which works great with VS4Mac, since it uses MSBuild.

0 Likes

#24

Did you try to build it in Xamarin Studio with MSBuild? There’s an option in Xamarin Studio preferences to use msbuild instead of xbuild.

Asking because we’ll add this option to the xamarin steps this week, so that you’ll be able to choose whether you want to build with msbuild or xbuild, but the stacks will have Xamarin Studio and not VS for Mac for now.

0 Likes

#25

Yes, having Xamarin Studio use msbuild works as well. Adding msbuild as an option with Xamarin Studio will be great for us. Thank you Viktor!

1 Like

#26

xamarin-archive 1.4.1 was just released, and the new version now has a tool option where you can set msbuild: https://github.com/bitrise-steplib/steps-xamarin-archive/releases/tag/1.4.1

P.S.: due to caching on bitrise.io it might take some time for the new version to show up. If you use the local workflow editor or set the version in bitrise.yml directly, 1.4.1 is available now. On the website it should be available in ~10-30 mins; if you’d still not see it after that, please reload the page/editor a couple of times to refresh the browser’s cache.

0 Likes

#27

Sorry I dropped off this thread - I had personal stuff come up.

I’ll look at using MSBuild from XS too, though I use FAKE to run my build, so not sure yet of the exact process yet.

0 Likes

#28

If we can help with anything just let us know @ch_kent! :wink:

0 Likes

#29

I plan on getting to this tomorrow, so I’ve just been digging into the Go code trying to figure out what it actually means to invoke MSBuild versus xBuild. I don’t know Go, so am struggling a bit. I found this and this, which I believe are the heart of the matter. But I still can’t see the actual command it’s executing.

Is it just a case of executing an MSBuild executable instead of an xBuild executable? I’d check on my Mac, but I haven’t upgraded to latest Xamarin yet (and won’t be until probably next week).

0 Likes

#30

This is now supported directly in the Xamarin Archive step, see above

Or do you mean another step?

0 Likes

#31

The xamarin-archive step is where I started. I’m trying to understand what it looks like to invoke MSBuild rather than xBuild. Understand that I’m not using a Bitrise step here. I have a FAKE build script that is responsible for running my build. It is (presumably) currently running xBuild, so I want to change it to invoke MSBuild. However, just not sure what that will look like…

0 Likes

#32

OK, I think I’ve made progress by using the latest FAKE (I was using 4.41.6, but now 4.61.3). I’ve tracked down the relevant FAKE code here. As you can see, it now searches for the correct binary, preferring msbuild on mono >= 5. Fortunately, it also logs what it finds here.

Looking in my (failing) build log I see:

Building project: Src/XXX.Core.sln
  /Library/Frameworks/Mono.framework/Versions/Current/Commands/msbuild  Src/XXX.Core.sln /t:Clean  /v:d  /p:RestorePackages="False" /p:Configuration="Release" /logger:Fake.MsBuildLogger+ErrorLogger,"/Users/vagrant/git/Src/packages/FAKE/tools/FakeLib.dll"

So it’s now correctly using msbuild, not xbuild. The errors are different now, and all look like this:

"/Users/vagrant/git/Src/Services.Connected.Droid/Services.Connected.Droid.csproj" (Clean target) (2) ->
  /Library/Frameworks/Mono.framework/Versions/5.0.1/lib/mono/msbuild/15.0/bin/Sdks/Microsoft.NET.Sdk/Sdk/Sdk.targets(40,3): error MSB4019: The imported project "/Library/Frameworks/Mono.framework/Versions/5.0.1/lib/mono/xbuild/MSBuild/Xamarin/Android/Xamarin.Android.CSharp.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk. [/Users/vagrant/git/Src/Services.Connected.Droid/Services.Connected.Droid.csproj]

Looking into it further…

1 Like

#33

I just upgraded my Mac to 15.2.2. When I do find . -name Xamarin.Android.CSharp.targets -print from within /Library, all I see is:

./Frameworks/Xamarin.Android.framework/Versions/5.1.0-100/lib/xbuild/Xamarin/Android/Xamarin.Android.CSharp.targets
./Frameworks/Xamarin.Android.framework/Versions/5.1.0-113/lib/xbuild/Xamarin/Android/Xamarin.Android.CSharp.targets
./Frameworks/Xamarin.Android.framework/Versions/5.1.0-129/lib/xbuild/Xamarin/Android/Xamarin.Android.CSharp.targets
./Frameworks/Xamarin.Android.framework/Versions/6.1.2-21/lib/xbuild/Xamarin/Android/Xamarin.Android.CSharp.targets
./Frameworks/Xamarin.Android.framework/Versions/7.0.0-18/lib/xbuild/Xamarin/Android/Xamarin.Android.CSharp.targets
./Frameworks/Xamarin.Android.framework/Versions/7.0.1-2/lib/xbuild/Xamarin/Android/Xamarin.Android.CSharp.targets
./Frameworks/Xamarin.Android.framework/Versions/7.0.1-3/lib/xbuild/Xamarin/Android/Xamarin.Android.CSharp.targets
./Frameworks/Xamarin.Android.framework/Versions/7.0.2-37/lib/xbuild/Xamarin/Android/Xamarin.Android.CSharp.targets
./Frameworks/Xamarin.Android.framework/Versions/7.0.2-42/lib/xbuild/Xamarin/Android/Xamarin.Android.CSharp.targets
./Frameworks/Xamarin.Android.framework/Versions/7.1.0-41/lib/xbuild/Xamarin/Android/Xamarin.Android.CSharp.targets
./Frameworks/Xamarin.Android.framework/Versions/7.1.0-43/lib/xbuild/Xamarin/Android/Xamarin.Android.CSharp.targets
./Frameworks/Xamarin.Android.framework/Versions/7.2.0-7/lib/xbuild/Xamarin/Android/Xamarin.Android.CSharp.targets
./Frameworks/Xamarin.Android.framework/Versions/7.3.1-2/lib/xbuild/Xamarin/Android/Xamarin.Android.CSharp.targets
./Frameworks/Xamarin.Android.framework/Versions/5.1.0-100/lib/xbuild/Xamarin/Android/Xamarin.Android.CSharp.targets
./Frameworks/Xamarin.Android.framework/Versions/5.1.0-113/lib/xbuild/Xamarin/Android/Xamarin.Android.CSharp.targets
./Frameworks/Xamarin.Android.framework/Versions/5.1.0-129/lib/xbuild/Xamarin/Android/Xamarin.Android.CSharp.targets
./Frameworks/Xamarin.Android.framework/Versions/6.1.2-21/lib/xbuild/Xamarin/Android/Xamarin.Android.CSharp.targets
./Frameworks/Xamarin.Android.framework/Versions/7.0.0-18/lib/xbuild/Xamarin/Android/Xamarin.Android.CSharp.targets
./Frameworks/Xamarin.Android.framework/Versions/7.0.1-2/lib/xbuild/Xamarin/Android/Xamarin.Android.CSharp.targets
./Frameworks/Xamarin.Android.framework/Versions/7.0.1-3/lib/xbuild/Xamarin/Android/Xamarin.Android.CSharp.targets
./Frameworks/Xamarin.Android.framework/Versions/7.0.2-37/lib/xbuild/Xamarin/Android/Xamarin.Android.CSharp.targets
./Frameworks/Xamarin.Android.framework/Versions/7.0.2-42/lib/xbuild/Xamarin/Android/Xamarin.Android.CSharp.targets
./Frameworks/Xamarin.Android.framework/Versions/7.1.0-41/lib/xbuild/Xamarin/Android/Xamarin.Android.CSharp.targets
./Frameworks/Xamarin.Android.framework/Versions/7.1.0-43/lib/xbuild/Xamarin/Android/Xamarin.Android.CSharp.targets
./Frameworks/Xamarin.Android.framework/Versions/7.2.0-7/lib/xbuild/Xamarin/Android/Xamarin.Android.CSharp.targets
./Frameworks/Xamarin.Android.framework/Versions/7.3.1-2/lib/xbuild/Xamarin/Android/Xamarin.Android.CSharp.targets

So I continue to be confused…

0 Likes

#34

This is so painful.

I got my Android project building on my Mac with VS4M. That is, netstandard + SDK style projects all working locally.

But in Bitrise I get hundreds of errors like this:

Properties/AssemblyInfo.cs(3,12): error CS0246: The type or namespace name 'AssemblyTitleAttribute' could not be found (are you missing a using directive or an assembly reference?) [/Users/vagrant/git/Src/Utility/Utility.csproj]
/Users/vagrant/git/Src/AssemblyInfoCommon.cs(5,37): error CS0518: Predefined type 'System.String' is not defined or imported [/Users/vagrant/git/Src/Utility/Utility.csproj]
DisposableBase.cs(6,44): error CS0246: The type or namespace name 'IDisposable' could not be found (are you missing a using directive or an assembly reference?) [/Users/vagrant/git/Src/Utility/Utility.csproj]

@viktorbenei Could it be that VS4M is required after all?

PS. this happens regardless of whether .NET core is installed or not

1 Like

#35

I don’t think this would be related to VS4Mac, rather to Mono/.Net version maybe, or some kind of package.

These seem like a missing assembly reference / dependency.

Did you try to run the project with Xamarin Studio on your Mac?

0 Likes

#36

XS can’t even load the projects because they’re an “unknown type”, which is expected because they’re SDK-style projects now.

0 Likes

#37

@viktorbenei Would it help if I shared my project in its entirety with you? Happy to do that (privately, of course).

0 Likes

#38

Definitely, although if the issue is indeed VS4Mac <-> Xam Studio, then all we can say is that the VS4Mac stack will come soon.

Actually, I think you should rather just ping us through the onsite chat, enable Support Access to the app, and we’ll let you know as soon as the VS4Mac stack is in “preview” mode (in that mode the stack is not available publicly, but with a “beta” tag we can enable access to it on a per-user basis).

We could even try to enable it for you right now, as the stack is already in “preview” mode (https://github.com/bitrise-io/bitrise.io/blob/master/system_reports/osx-vs4mac-stable.log) but there are still a couple of rough edges and things we should figure out. Our standard Xamarin cross platform project does compile on it without any issue or modification, so I guess it should be usable for most projects, but until it’s out of the “preview” mode we can’t guarantee anything; preinstalled tools might change any time, etc.

0 Likes

#39

Hmm, with the VS4M image, my build fails very quickly (1.5m) and there is no log loading. It just says Full logs will be available once this build is finished and the logs are available in the archive.

0 Likes

#40

Ah, I take that back. It eventually loaded. Seems the xamarin-user-management step is failing:

+------------------------------------------------------------------------------+
| (7) xamarin-user-management@1.0.3                                            |
+------------------------------------------------------------------------------+
| id: xamarin-user-management                                                  |
| version: 1.0.3                                                               |
| collection: https://github.com/bitrise-io/bitrise-steplib.git                |
| toolkit: bash                                                                |
| time: 2017-06-17T04:10:31-07:00                                              |
+------------------------------------------------------------------------------+
|                                                                              |
cat: /Applications/Xamarin Studio.app/Contents/Resources/lib/monodevelop/bin/buildinfo: No such file or directory
e[34mGathering Xamarin License requirementse[0m
Downloading license files for Xamarin.iOS, Xamarin.Android
warning MT0061: No Xcode.app specified (using --sdkroot), using the system Xcode as reported by 'xcode-select --print-path': /Applications/Xcode.app/Contents/Developer
error MT0025: No SDK version was provided. Please add --sdk=X.Y to specify which iOS SDK should be used to build your application.
e[31mMissing data.e[0m
0 Likes

#41

Please upgrade it.

0 Likes