Bug 41658 - Cannot compile old projects. Starting a new solution from scratch gives the same problem
Summary: Cannot compile old projects. Starting a new solution from scratch gives the s...
Status: VERIFIED FIXED
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Android Add-in (show other bugs)
Version: 6.0.0 (C7)
Hardware: PC Windows
: High blocker
Target Milestone: C7SR1
Assignee: Greg Munn
URL:
Depends on:
Blocks:
 
Reported: 2016-06-09 14:07 UTC by Rodolfo Redolfi
Modified: 2016-06-22 12:39 UTC (History)
3 users (show)

See Also:
Tags: BZSRC7
Is this bug a regression?: ---
Last known good build:


Attachments
Screenshot 1 of IDE errors (38.62 KB, image/png)
2016-06-10 10:48 UTC, Rodolfo Redolfi
Details
Screenshot 2 of IDE erorrs (13.80 KB, image/png)
2016-06-10 10:48 UTC, Rodolfo Redolfi
Details
Screenshot 3 of IDE errors (24.42 KB, image/png)
2016-06-10 10:48 UTC, Rodolfo Redolfi
Details
Screenshot 43 of IDE errors (17.95 KB, image/png)
2016-06-10 10:49 UTC, Rodolfo Redolfi
Details
Output log from manual build (551.45 KB, text/plain)
2016-06-10 10:50 UTC, Rodolfo Redolfi
Details
Ide log of last compile (147.35 KB, text/plain)
2016-06-11 13:49 UTC, Rodolfo Redolfi
Details
Ide log of the desktop machine (129.60 KB, text/plain)
2016-06-16 23:06 UTC, Rodolfo Redolfi
Details
Ide log (5.68 KB, text/plain)
2016-06-20 22:04 UTC, Rodolfo Redolfi
Details
Android tools log (921 bytes, text/plain)
2016-06-20 22:05 UTC, Rodolfo Redolfi
Details
Update log (158 bytes, text/plain)
2016-06-20 22:06 UTC, Rodolfo Redolfi
Details
Screenshot of the source page (67.74 KB, image/png)
2016-06-20 22:09 UTC, Rodolfo Redolfi
Details

Description Rodolfo Redolfi 2016-06-09 14:07:15 UTC
# Steps to reproduce
Create a new solution. Starting from the first using clause (using Android.App;) I get a message stating "using directive is not necessary". All the subsequent code is underlined in red.

# Expected behavior
Compile the application...

# Actual behavior


# Supplemental info (logs, images, videos)


# Test environment (full version information)
=== Xamarin Studio Business ===

Version 6.0 (build 5174)
Installation UUID: 92f3cd99-e8ba-4e1f-a9bc-6c8bee8c6ccc
Runtime:
	Microsoft .NET 4.0.30319.42000
	GTK+ 2.24.26 (Dark theme)
	GTK# 2.12.38

=== Xamarin.Profiler ===

Not Installed

=== Xamarin.Android ===

Version: 6.1.0.71 (Xamarin Business)
Android SDK: C:\Users\rodolfo\AppData\Local\Android\android-sdk
	Supported Android versions:
		4.0.3  (API level 15)
		4.4    (API level 19)
		4.4.87 (API level 20)
		5.1    (API level 22)
		6.0    (API level 23)

SDK Tools Version: 25.1.7
SDK Platform Tools Version: 23.1
SDK Build Tools Version: 23.0.2

Java SDK: C:\Program Files\Java\jdk1.7.0_79
java version "1.7.0_79"
Java(TM) SE Runtime Environment (build 1.7.0_79-b15)
Java HotSpot(TM) 64-Bit Server VM (build 24.79-b02, mixed mode)

Android Designer EPL code available here:
https://github.com/xamarin/AndroidDesigner.EPL

=== Xamarin Android Player ===

Not Installed

=== Build Information ===

Release ID: 600005174
Git revision: 694a75f040b7f2309bc43d4f78a3a6572ca898bf
Build date: 2016-06-01 17:11:00-04
Xamarin addins: 33f406fa2dcf214012c78cb846585f062b2e1d24
Build lane: monodevelop-windows-cycle7-baseline

=== Operating System ===

Windows 6.1.7601.65536 (64-bit)
Comment 1 Rodolfo Redolfi 2016-06-09 15:56:47 UTC
I've downgraded all the three packages (GTK, Xamarin Studio and Xamarin.VS), but in order to have the compiler working I had to uninstall also .NET Framework 4.6.1, MsBuild Tools 2013 / 2015, and reinstall .NET Framework 4.5.1
Maybe there's something strange with .NET framework, because until the upgrade I had only v4.5.1; v4.6.1 probably got installed as part of the two required MsBuild Tools packages.
Comment 2 Greg Munn 2016-06-09 17:12:03 UTC
are you able to build from the command line? Can you get a diagnostic build log from the command line, that might help with determining where the problem might be.
Comment 3 Rodolfo Redolfi 2016-06-10 08:58:56 UTC
Sorry, at the moment I've reverted to the last Cycle-6 package. I'm suspecting some .NET Framevork version issue, because I had to reinstall manually the 4.5.1 version in order to have Xamarin Studio 5.1 work. In the next days I'll try again the update, and I'll let you know the results.
Thanks.
Comment 4 Rodolfo Redolfi 2016-06-10 10:46:47 UTC
Ok, I've re-updated Xamarin Studio to v6.0, removed .NET Framework 4.6 as it installs per-default 4.5.2 and removes 4.5.1, manually installed 4.5.1 but results are the same. I'm not much confident with command-line compilation, but using MSBuild.exe /p:Configuration=Debug /v:diag C:\Progetti\test6\test6\test6.csproj seems to produce no errors. If the diagnostic build log is produced by the /v parameter, I've attached the resulting output, along with smoe screenshots from my IDE showing the errors.
Comment 5 Rodolfo Redolfi 2016-06-10 10:48:09 UTC
Created attachment 16269 [details]
Screenshot 1 of IDE errors
Comment 6 Rodolfo Redolfi 2016-06-10 10:48:32 UTC
Created attachment 16270 [details]
Screenshot 2 of IDE erorrs
Comment 7 Rodolfo Redolfi 2016-06-10 10:48:54 UTC
Created attachment 16271 [details]
Screenshot 3 of IDE errors
Comment 8 Rodolfo Redolfi 2016-06-10 10:49:10 UTC
Created attachment 16272 [details]
Screenshot 43 of IDE errors
Comment 9 Rodolfo Redolfi 2016-06-10 10:50:44 UTC
Created attachment 16273 [details]
Output log from manual build

If it's not the intended log, please give me the command line arguments to be used.
Comment 10 Greg Munn 2016-06-10 15:00:34 UTC
Thanks, hey, silly question, but did you actually try to build from within Xamarin Studio as well? If you did, can you also attach the build log from that as well for comparison.
Comment 11 Rodolfo Redolfi 2016-06-11 13:47:39 UTC
The build in Xamarin Studio fails immediately. If the build log is not the one I've attached, please let me know. Anyway I need Xamarin Studio working, so for future reference I'll update it on my desktop environment, not on my notebook.
Thanks.
Comment 12 Rodolfo Redolfi 2016-06-11 13:49:48 UTC
Created attachment 16286 [details]
Ide log of last compile

I've also tried loggin out from Xamarin's account and subsequently loggin in, just in case.
Comment 13 Greg Munn 2016-06-13 15:27:55 UTC
Thanks Rodolfo,

the logs are showing an issue initializing the hosted builder that XS uses to build projects. Can you try and determnine if you have msbuild tools 2013 or 2015 installed?
Comment 14 Rodolfo Redolfi 2016-06-13 15:41:31 UTC
I had either 2013 and 2015 MsBuild Tools, because the package upgrade requested both in order to complete the installation.
I hope tomorrow to find some time to upgrade to Xamarin Studio 6.0 my desktop environment, in order to leave my NB working; as I'll have any news I'll let you know.
Thanks
Comment 15 Rodolfo Redolfi 2016-06-15 23:08:09 UTC
I've just update my desktop environment. The installation was a bit old, so the packages were more than my notebook. MsBuild 2013 and 2015 were automatically installed, along with all the other packages. The final result was the same: creating a new project lead to the same issues (all the using statements were marked as unnecessary). Let me know what info are needed in order to track this strange behaviour.
Thanks.
Rodolfo.
Comment 16 Greg Munn 2016-06-16 14:00:50 UTC
Can you get the ide logs for your desktop machine as well please - I'd like to see if you are getting the same errors loading the project builder as you did on your laptop.
Comment 17 Rodolfo Redolfi 2016-06-16 23:06:00 UTC
Created attachment 16371 [details]
Ide log of the desktop machine

I've created a new project and, despite almost all the code was red underlined, I tried to compile it. The attached log should be the result.
Thanks.
Rodolfo.
Comment 18 Greg Munn 2016-06-17 16:23:55 UTC
Rodolfo, thanks for the new log. From the logs, it looks like the project is trying to target .net 4.5.1 and it's not installed.

So, what .net versions do you have installed on the machine now?
Comment 19 Rodolfo Redolfi 2016-06-17 21:33:13 UTC
My desktop is currently running Windows 10, and the app section lists .NET Framework 2.0 SDK and .NET Framework 4 multi-targeting pack. But on my laptop (currently running Windows 7 pro x64) there was .NET Framework 4.5.2, Microsoft's .NET Framework 4.0 and 4.5.1 programmed upgrade. I've also tried having installed only 4.5.1 (through manual uninstall of 4.5.2 and subsequent 4.5.1 install), but nothing changed. Perhaps the operation's order is important.
Thanks.
Rodolfo.

P.S. : on my desktop environment I've more chances to test installations and procedures, so feel free to suggest me anything.
Comment 20 xamarin-release-manager 2016-06-20 13:02:31 UTC
Fixed in version 6.1.0.4969 (master)

Author: Lluis Sanchez
Commit: 98299ddb17d4bbfb08ca036edcdb4531cc300b6d (mono/monodevelop)
Comment 21 xamarin-release-manager 2016-06-20 13:03:23 UTC
Fixed in version 6.0.2.25 (cycle7)

Author: Lluis Sanchez
Commit: 7663ed860c78dfd1454fe49338be193fb4e2592b (mono/monodevelop)
Comment 22 Lluis Sanchez 2016-06-20 13:04:08 UTC
This should be fixed. I'll push a new build of XS so that you can verify that the fix works for you.
Comment 23 Rodolfo Redolfi 2016-06-20 13:08:57 UTC
Thanks.
Should the fix work with the environment in these conditions (all the errors I see in the source window) or it's better to revert to the previous working version and apply the new build ?
Comment 24 Lluis Sanchez 2016-06-20 13:54:32 UTC
Please try this build: https://dl.dropboxusercontent.com/u/492982/XamarinStudio-6.0.2.25.msi

You can try with your current environment.
Comment 25 Rodolfo Redolfi 2016-06-20 22:02:20 UTC
It was a little tricky operation. The setup ran without issues, but at the first time the only issue corrected was the using statement on the System namespace; all the using Android namespaces were red-underlined. In order to have a source page without errors I had to start a new project, upgrade the Android SDK, remove the SDK Build tools prior to rev. 24 and change the standard function call "protected override void OnCreate(Bundle bundle)" with "OnCreate(Bundle savedInstanceState)", because the error popup said that "the parameter name differs from declaration" (or something similar). Nothing to do with the error on the two layouts included in the project. I'll attach some relevant (I think) files.
Thanks.
Comment 26 Rodolfo Redolfi 2016-06-20 22:04:31 UTC
Created attachment 16410 [details]
Ide log
Comment 27 Rodolfo Redolfi 2016-06-20 22:05:30 UTC
Created attachment 16411 [details]
Android tools log
Comment 28 Rodolfo Redolfi 2016-06-20 22:06:16 UTC
Created attachment 16412 [details]
Update log
Comment 29 Rodolfo Redolfi 2016-06-20 22:09:06 UTC
Created attachment 16413 [details]
Screenshot of the source page

This is the dropbox link to the zip containing the project after the cleaning procedure (originally the zip file was 56MB...), just in case.

https://www.dropbox.com/s/0v6ikj4top4i8uj/test_602.zip?dl=0
Comment 30 Greg Munn 2016-06-21 19:43:37 UTC
Judging from the screenshots, it looks like it should now all build. 

the underlined warning about the OnCreate parameter being different is just that, a warning and not a real issue. In fact it kind of proves that things are working because without being able to build XS wouldn't be able to offer up that code issue.
Comment 31 Mohit Kheterpal 2016-06-22 12:39:39 UTC
As per comment 29 and comment 30, it seems that the filed issue is resolved with the fixed build for Rodolfo.

Hence closing this issue by marking it as Verified.

Thanks

Note You need to log in before you can comment on or make changes to this bug.