Webapplication.targets is missing when creating an MVC4 project in MonoDevelop on OS X 10.7.4

I am trying to create a test MVC4 project on OS X 10.7.4 using Mono 2.10.9. I created a new empty MVC4 web application in Visual Studio using git to transfer the source code from Windows to Mac OS X. Then I ran xbuild to restore the .nuget package, but when I create in monodevelop I get a strange error: / p >

/Users/tamasnagy/Developer/Spellbound/Spellbound/Spellbound.csproj: Error: /Library/Frameworks/Mono.framework/Versions/2.10.9/lib/mono/xbuild/Microsoft/VisualStudio/v10.0/WebApplications/Micro. WebApplication.targets: the project file cannot be imported, it is imported /Users/tamasnagy/Developer/Spellbound/Spellbound/Spellbound.csproj: Imported project: "/Library/Frameworks/Mono.framework/Versions/2.10.9/lib/mono /xbuild/Microsoft/VisualStudio/v10.0/WebApplications/Microsoft.WebApplication.targets "does not exist. (Spellbound)

What does this mean? This also happens when I just create a new MVC project in MonoDevelop and click build. Any ideas?

+6
source share
4 answers

Mono MSBuild (xbuild) implementation does not implement goals for ASP.NET projects.

You might be able to create MonoDevelop. Make sure experimental xbuild integration is disabled in MonoDevelop settings.

+1
source

Create a symlink:

cd / usr / lib / mono / xbuild / Microsoft / VisualStudio / v9.0

ln -s v9.0 v10.0

I have the same exact ubuntu 12.04 distribution on two different computers, and I could not understand why mono would compile on one computer and not on the other. But well, symlink solved the problem.

+8
source

Modify the csproj file to import v9.0 since ...

<Import Project="$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v9.0\WebApplications\Microsoft.WebApplication.targets" /> 
+3
source

I know this is an old question, but he figured out how to use WebApplications.targets on OSX, so it’s worth the answer anyway. Webapplication.targets included in the current version of Mono (5.x), so now all you have to do is install VSToolsPath and everything should work.

If you use the standard bash shell, then the .profile file is where you can put it:

 export VSToolsPath=/Library/Frameworks/Mono.framework/Versions/Current/lib/mono/xbuild/Microsoft/VisualStudio/v15.0/ 
0
source

Source: https://habr.com/ru/post/915619/


All Articles