I am working on a Visual Studio Integration Package and I have created
a custom language service and project type. I have been looking at the
IronPython examples and using the base classes from the "ProjectBase"
code. I have a web project that references my custom project and my
custom project references a couple system libraries and one custom
library but it's an Assembly reference rather than a project
reference. Whenever I build the web application it gives me the error
message "Could not get dependencies for project reference 'Example'".
I believe the problem lies with the implementation of
IVsEnumDependencies, here is a link to my current code:
http://www.codeplex.com/NBusiness/SourceControl/FileView.aspx?itemId=272704&chan
geSetId=22187
Which is exactly the same as what it was supplied as. It calls into
the Next method and the parameter values are:
uint elements = 1,
IVsDependency[] dependencies = { null },
out uint elementsFetched = 0;
The method essentially does nothing since there are no items in my
dependency list. It returns VSConstants.S_FALSE, changing it so it
returns VSConstants.S_TRUE doesn't seem to change anything. It appears
that it is expecting a dependency but I just don't have any.
There is an assembly that is referenced but it is not by project and
therefore is not in my dependency list. So why is it saying it can't
get the dependencies when A.) There are no dependencies and B.) it's
getting my IVsEnumDependencies object and calling it correctly?
Very frustrating, especially from out of the box code this convoluted,
if anyone can help I'd be eternally grateful!
justncase80 - 11 May 2007 23:38 GMT
The plot thickens... this problem only occurs when referencing the
custom project from a web project. If I reference it from a console
application then it works fine... ugh.
justncase80 - 11 May 2007 23:56 GMT
> The plot thickens... this problem only occurs when referencing the
> custom project from a web project. If I reference it from a console
> application then it works fine... ugh.
And it only occurs when creating a PROJECT reference to my custom
library. Making an assembly reference works fine. I'm guessing that I
need to listen for project references in the solution for web projects
somehow. I'm betting they're different than listening for project
references from non-web projects somehow. Very frustrating :-/
justncase80 - 12 May 2007 16:37 GMT
> > The plot thickens... this problem only occurs when referencing the
> > custom project from a web project. If I reference it from a console
[quoted text clipped - 5 lines]
> somehow. I'm betting they're different than listening for project
> references from non-web projects somehow. Very frustrating :-/
Ah ha, this seems to be a bug with IronPython as well. I'll report it
on the official project page at codeplex.
justncase80 - 12 May 2007 20:50 GMT
Ok this appears to be an official bug in the VS SDK:
https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID
=276380
This is the exact problem I have been encountering. Hopefully it will
be fixed in the next version of the SDK, or some work around will be
posted. It's just an annoyance for now.