[Mono-list] Can't build NUnit testing project
Michael Hutchinson
m.j.hutchinson at gmail.com
Wed Feb 16 14:23:24 EST 2011
On Fri, Feb 4, 2011 at 1:56 PM, Alexander M. Batishchev
<abatishchev at godfather.net.ru> wrote:
> Hi, everybody.
>
> I have a complex solution (developed under Windows, deployed under
> GNU\Linux) with a number of unit-testing projects, using NUnit 2.9.3.
>
> Here's a reference from project:
>
> <Reference Include="nunit.framework, Version=2.9.3.0, Culture=neutral,
> PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
> <SpecificVersion>False</SpecificVersion>
> <HintPath>..\..\..\..\..\Program Files\NUnit
> 2.9.3\bin\net-4.0\nunit.framework.dll</HintPath>
> </Reference>
>
> I downloaded and built NUnit 2.9.3 from source:
>
> $ xbuild solutions/MonoDevelop/NUnit.Framework.sln /p:Configuration=Release
>
> and installed into GAC:
>
> $ gacutil /i solutions/MonoDevelop/bin/Release/nunit.framework.dll
> $ gacutil /l nunit.framework
>
> The following assemblies are installed into the GAC:
> nunit.framework, Version=2.9.3.0, Culture=neutral,
> PublicKeyToken=96d09a1eb7f44a77
> Number of items = 1
>
> and deleted local mono nunit installation:
>
> $ rm /usr/lib/mono/2.0/nunit*
> $ rm /usr/lib/mono/4.0/nunit*
>
> but when I try to build my solution:
>
> $ xbuild MySolution.sln | grep error
> : error CS0006: Metadata file `/usr/lib/mono/2.0/nunit.framework.dll' could
> not be found
>
> What do I wrong?
The GAC is for resolving assemblies at run-time, not compile time.
This is true on .NET too.
http://monodevelop.com/FAQ#I_added_an_assembly_to_the_GAC.2c_why_doesn't_it_appear_in_the_assemblies_list_when_I_try_to_add_a_reference_in_a_MonoDevelop_project.3f
The reason you get the specific error you do is because you removed
the compile-time version of the assemblies pointed to by the pkconfig
file but did not update or remove the pkgconfig file.
--
Michael Hutchinson
http://mjhutchinson.com
More information about the Mono-list
mailing list