|
Bugzilla – Full Text Bug Listing |
| Summary: | Special output from mcs not parsed correctly | ||
|---|---|---|---|
| Product: | [Mono] MonoDevelop | Reporter: | Andres Aragoneses <aaragoneses> |
| Component: | project | Assignee: | Lluis Sanchez <lluis> |
| Status: | VERIFIED FIXED | QA Contact: | MD Bugs <monodevelop-bugs> |
| Severity: | Normal | ||
| Priority: | P5 - None | ||
| Version: | 0.19 (RC 1) | ||
| Target Milestone: | 2.0 Beta 1 | ||
| Hardware: | Other | ||
| OS: | openSUSE 10.3 | ||
| Whiteboard: | |||
| Found By: | Development | Services Priority: | |
| Business Priority: | Blocker: | --- | |
| Marketing QA Status: | --- | IT Deployment: | --- |
| Attachments: | Forgot to add the attachment | ||
Created attachment 200879 [details]
Forgot to add the attachment
Beware that this bug is *now* related to gmcs bug 376876, which tells that in this situation now you even get an exception in the compiler. I can't repro. I think that was fixed. Can you confirm? I can still reproduce, but the results are not exactly the same as what we got when I firstly reported this.
To be able to reproduce, do this steps:
1. Copy gtk-sharp.dll from the GAC to other place near your project.
2. Reference your gtk-sharp.dll in the project (don't use the GAC one).
3. Move temporarily the glib-sharp.dll from the GAC to other place, in order not to be found.
4. Compile.
Current results:
It reports a misleading error because it makes the developer think that the library was not referenced, instead of telling the user that a dependency of the library is missing: "The type or namespace name `AboutDialog' does not exist in the namespace `Gtk'. Are you missing an assembly reference?(CS0234)"
And in the build output I can see:
Building: Test (Debug)
Performing main compilation...
/home/knocte/opt/mono/bin/gmcs "/out:/home/knocte/Projects/Test/Test/bin/Debug/Test.exe" "/r:System.dll" "/r:System.Web.dll" "/r:System.Xml.dll" "/r:/home/knocte/Projects/Test/TestLib/bin/Debug/TestLib.dll" "/r:/home/knocte/Projects/Test/Test/gtk-sharp.dll" /noconfig /nologo /warn:4 /debug:+ /debug:full /optimize- /codepage:utf8 /define:"DEBUG" /t:exe "/home/knocte/Projects/Test/Test/Main.cs" "/home/knocte/Projects/Test/Test/AssemblyInfo.cs"
Compilation failed: 1 error(s), 1 warnings
** (/home/knocte/opt/mono/lib/mono/2.0/gmcs.exe:24519): WARNING **: The following assembly referenced from /home/knocte/Projects/Test/Test/gtk-sharp.dll could not be loaded:
Assembly: glib-sharp (assemblyref_index=0)
Version: 2.12.0.0
Public Key: 35e10195dab3c99f
The assembly was not found in the Global Assembly Cache, a path listed in the MONO_PATH environment variable, or in the location of the executing assembly (/home/knocte/Projects/Test/Test/).
** (/home/knocte/opt/mono/lib/mono/2.0/gmcs.exe:24519): WARNING **: Could not load file or assembly 'glib-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f' or one of its dependencies.
/home/knocte/Projects/Test/Test/Main.cs(79,21): error CS0234: The type or namespace name `AboutDialog' does not exist in the namespace `Gtk'. Are you missing an assembly reference?
/home/knocte/Projects/Test/Test/Main.cs(100,40): warning CS0219: The variable `adapter' is assigned but its value is never used
You may think that this specific scenario is very wierd (who would want to remove Glib# from the GAC?), but actually, if we are talking about other assemblies than gtk/glib, this happens often.
I tried to reproduce and worked fine. I think it was fixed by r121871. Closing. |
When creating a project which references to GTK# but not GLib#, I get the following MCS output: ** (/usr/lib/mono/2.0/gmcs.exe:5738): WARNING **: The following assembly referenced from /home/knocte/Documents/iDocuments/Proyectos/mono/a11y/SVNtree/gtk-sharp/gtk/gtk-sharp.dll could not be loaded: Assembly: glib-sharp (assemblyref_index=0) Version: 2.12.0.0 Public Key: 35e10195dab3c99f The assembly was not found in the Global Assembly Cache, a path listed in the MONO_PATH environment variable, or in the location of the executing assembly (/home/knocte/Documents/iDocuments/Proyectos/mono/a11y/SVNtree/gtk-sharp/gtk). ** (/usr/lib/mono/2.0/gmcs.exe:5738): WARNING **: Could not load file or assembly 'glib-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f' or one of its dependencies. ** (/usr/lib/mono/2.0/gmcs.exe:5738): WARNING **: Missing method .ctor in assembly /home/knocte/Documents/iDocuments/Proyectos/mono/a11y/SVNtree/gtk-sharp/gtk/gtk-sharp.dll, type GLib.IgnoreClassInitializersAttribute ** (/usr/lib/mono/2.0/gmcs.exe:5738): WARNING **: Can't find custom attr constructor image: /home/knocte/Documents/iDocuments/Proyectos/mono/a11y/SVNtree/gtk-sharp/gtk/gtk-sharp.dll mtoken: 0x0a000111 Stacktrace: Build complete -- 1 error, 0 warnings ---------------------- Done ---------------------- Build: 1 error, 0 warnings However, MonoDevelop reports a strange error on the error list, which I attach as a screenshot. I remember that even MS VisualStudio has a specific .NET error message for this, so I guess this is a bug.