[MonoDevelop] building a project failes due to nuget and webapplications.taget could not be imported

Michael Hutchinson m.j.hutchinson at gmail.com
Wed Aug 8 18:05:20 UTC 2012

On 6 August 2012 04:03, Sharique uddin Ahmed Farooqui <safknw at gmail.com> wrote:
> Hi,
> I'm running MD I've created a solution with few projects
> using VS2010. I open up it on MD on Linux, I'm facing few issues with
> 1. I've enabled nuget package restore for the solution, when I build
> it on Linux I get error
> "/home/sharique/Projects/my
> projects/sample/Sample.Data/Sample.Data.csproj: Error:
> ..//.nuget/nuget.targets: Project file could not be imported, it was
> being imported by /home/sharique/Projects/my
> projects/sample/Sample.Data/Sample.Data.csproj: Imported project:
> "/home/sharique/Projects/my projects/sample//.nuget/nuget.targets"
> does not exist. (Sample.Data)"
> When I comment "<Import Project="$(SolutionDir)\.nuget\nuget.targets"
> />" from all project files, than this error did not appear again.

I don't think MonoDevelop defines SolutionDir when building project
files using MSBuild. Please file a bug for this.

> 2. Now I'm getting another error.
> /home/sharique/Projects/my
> projects/sample/Sample.Site/Sample.Site.csproj: Error:
> /usr/lib/mono/xbuild/Microsoft/VisualStudio/v10.0/WebApplications/Microsoft.WebApplication.targets:
> Project file could not be imported, it was being imported by
> /home/sharique/Projects/my
> projects/sample/Sample.Site/Sample.Site.csproj: Imported project:
> "/usr/lib/mono/xbuild/Microsoft/VisualStudio/v10.0/WebApplications/Microsoft.WebApplication.targets"
> does not exist. (Sample.Site)
> For this I tried commenting "<Import
> Project="$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets"
> />" in the webapp project, but it appear again the next time I build
> the solution.

I don't think anyone has implemented the WebApplication MSBuild
targets for xbuild.

> 3. There are few warnings for version conflict in runtime assemblies [
> like /usr/lib/mono/4.0/Microsoft.Common.targets: Warning: Found a
> conflict between : 'System.Xml, Version=, Culture=neutral,
> PublicKeyToken=b77a5c561934e089' and 'System.Xml, Version=,
> Culture=neutral, PublicKeyToken=b77a5c561934e089'. Using 'System.Xml,
> Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089'
> reference. (Sample.Data) ], since project runtime is 4.0 these warning
> should not appear.

Those are harmless - for some reason xbuild doesn't recognise that
these assemblies are compatible.

Michael Hutchinson

More information about the Monodevelop-list mailing list