Menu

#399 <solution> fails on interface with optional array parameter

cvs
open
Tasks (408)
5
2005-06-22
2005-05-13
s_gardiner
No

I created a solution with an interface project and a
classes project. the class implements the interface
which has one method that takes in an optional array
parameter.

Visual studio.NET 2003 shows no build errors when I
build and then Nant compiles the solution normally.
However, if I use my nant buildfile to delete all DLLs
in the tree (using Clean target of attached file) -
including the default project primary output - then the
<solution> task fails. In this situation, VS.NET also
fails when you do an ordinary build (not rebuild), the
error in vs.net is

<snip>

------ Build started: Project: MyClass, Configuration:
Debug .NET ------

Preparing resources...
Updating references...
Performing main compilation...
Building satellite assemblies...
Satellite assemblies could not be built because the
main project output is missing.

</snip>

and the nant error is:

[solution]
C:\Data\UniversityOfSam\vb.net\NantInterfacesTest\MyClass\MyImplementerClass.vb(2)
: error
BC30149: 'Orbis.OPS.MessageCentre.MyImplementerClass'
must implement 'Overridable Sub FooWithOptional
([_string_array() As String = Nothing])' for interface
'Orbis.OPS.MessageCentre.MyInterface'.
[solution]
[solution] Implements MyInterface
[solution] ~~~~~~~~~~~
[solution]
C:\Data\UniversityOfSam\vb.net\NantInterfacesTest\MyClass\MyImplementerClass.vb(8)
: error
BC30401: 'FooWithOptional' cannot implement
'FooWithOptional' because there is no matching sub on int
erface 'MyInterface'.
[solution]
[solution]
Implements MyInterface.FooWithOptional
[solution]
~~~~~~~~~~~~~~~~~~~~~~~~~~~
[solution] Build failed.
[solution] Project 'MyClass' failed!
[solution] Continuing build with non-dependent projects.
[solution]
[solution] Solution failed to build! Failed projects
were:
[solution] - MyClass

Then rebuild fixes the problem, and both VS.NET and
Nant build normally.

If the interface is changed so that the parameter is
not optional or not an array or both, then the problem
is not seen.

I'm running on windows xp pro sp2 and i've checked with
the latest nant nightly:
NAnt 0.85 (Build 0.85.1958.0; nightly; 12/05/2005)

Discussion

  • s_gardiner

    s_gardiner - 2005-05-13

    solution, projects and nant build showing the problem

     
  • Gert Driesen

    Gert Driesen - 2005-05-16

    Logged In: YES
    user_id=707851

    This appears to be a bug in the VB.NET command-line
    compiler (vbc).

    I've reported this issue to MS using the MSDN product
    feedback center:

    http://lab.msdn.microsoft.com/productfeedback/viewfeedback.
    aspx?feedbackid=77e2ad36-d97f-4973-b3d0-c17aa12aee3c

     
  • Gert Driesen

    Gert Driesen - 2005-06-22
    • assigned_to: nobody --> drieseng
     
  • Gert Driesen

    Gert Driesen - 2005-06-22

    Logged In: YES
    user_id=707851

    MS reports that this issue will be fixed in .NET 2.0 RTM:

    http://lab.msdn.microsoft.com/ProductFeedback/viewfeedback
    .aspx?feedbackid=77e2ad36-d97f-4973-b3d0-c17aa12aee3c

     

Log in to post a comment.