Bug 17277 - Code analysis having problems with corelib
Summary: Code analysis having problems with corelib
Status: RESOLVED FIXED
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Text Editor ()
Version: 4.2.x
Hardware: PC Mac OS
: Normal normal
Target Milestone: 4.2.4 (from master)
Assignee: Mike Krüger
URL:
Depends on:
Blocks:
 
Reported: 2014-01-16 13:55 UTC by Rodrigo Kumpera
Modified: 2014-03-13 02:50 UTC (History)
4 users (show)

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

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description Rodrigo Kumpera 2014-01-16 13:55:08 UTC
Not sure how to describe this.

But this can be witnessed by opening the corlib solution and navigating to String.cs in the method Normalize ().

Code analysis will complain of "Error: Cannot implicitly convert type `System.String` to `string`."
Comment 1 Mike Krüger 2014-01-17 02:46:12 UTC
@Lluis: Is there any way to get the 'real' references of a project ? 

The NoStdLib is a c# specific setting - atm the corlib ref is hacked into the project content using the target framework - but that doesn't work if the NoStdLib flag is set in c#.

I need a list of the 'real' references of  a project - is there any way doing that ?
Comment 2 Mike Krüger 2014-01-17 04:00:16 UTC
I added a hack for getting the NoStdLib flag.
Comment 3 Alan McGovern 2014-01-17 17:43:19 UTC
The hack broke a bunch of tests so had to be reverted:
https://github.com/mono/monodevelop/commit/f3b05bf63e6af89e19f6f65252d57920da48f7cd
Comment 4 Mike Krüger 2014-01-18 06:25:31 UTC
I reverted the revert
Comment 5 Udham Singh 2014-03-12 11:24:50 UTC
I have tried to verify this issue on below environments with following steps:

1. Create a simple console application
2. Implemented the code below:

try
{
	System.String sysStr="test";
	string str =string .Empty;
	str =sysStr ;
	Console.WriteLine (str);
}
catch(Exception ex) {
	Console.WriteLine (ex.ToString());
}

3. Debug the application and code is working fine.

Environment Info:

XS 4.2 (build 2)
XS 4.2.4 (build 30)
XS 4.2.3 (build 60)

Is it enough to verify this issue, If not please provide me some steps so that i can check  and verify this.
Comment 6 Mikayla Hutchinson [MSFT] 2014-03-12 15:56:08 UTC
This is not something you can easily verify since it only happens when working on the source code of mscorlib in the Mono class libraries - so it's not something that affects our users anyway.
Comment 7 Mike Krüger 2014-03-13 02:50:10 UTC
The only way to verify it is opening the corlib solution - see the Description