New VB.NET project by default immediately gives an error

I just installed Mono version 2.10.8 and MonoDevelop 2.8.6.5 on Mac. When I create a new project (File → New Solution → VBNet → ASP.NET → Web Application), it gives me an error after creating: Error trying to load the project "/Users/starquake/Development/Mono/HelloWorld/HelloWorld.vbproj" : the project does not support the framework ".NETFramework, Version = v4.0"

What am I doing wrong? Or how can I fix this?

+7
source share
4 answers

I had this problem when creating new VB projects, I changed the file format that will be used when creating new projects for MSBuild (Visual Studio 2008) instead of the default MSBuild (Visual Studio 2010) From Preferences> Load / Save

+6
source

Use a text editor to modify the * .vbproj file to add the following line:

<TargetFrameworkVersion>v3.5</TargetFrameworkVersion> 

in the first PropertyGroup for example

 <?xml version="1.0" encoding="utf-8"?> <Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> ... <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> </PropertyGroup> ... </Project> 
+2
source

I had the same problem on Linux, but it seems that a version that correctly supports VB.Net (at least without errors), MonoDevelop 3.0.4 , and after searching on Google, I landed on the SourceForge.net page with the new source MonoDevelop code 3.0.6 .

I downloaded it, extracted its contents and did the following in the root terminal ...

  cd /home/knoppix/Downloads/monodevelop-3.0.6 ./configure --prefix=`pkg-config --variable=prefix mono` make make install 

Then he closed the terminal and ran MonoDevelop again, and it was no longer the version I had before (MonoDevelop 3.0.3), now it was MonoDevelop 3.0.6 .

When I created the new VB.Net GTK # 2.0 project, the errors were still there, but then I right-clicked the project in the solution explorer and selected Options , then in the Assembly section I selected General ... now profile 4.0 and it can be had to choose. Selecting it and closing the dialog box, all errors disappeared.

Then I changed the default format for new projects to MSBuild (Visual Studio 2010) from Change , Preferences ... then to the pop-up dialog in Preferences , Load / Save .

I'm still confused about how to create a form. The C # side of things can easily create it, but I don't see this option on the VB side. I may have to install some other things to enable it or something like that.

+1
source

VB.NET embedding in MonoDevelop does not support the .NET 4.0 platform. I am surprised that this allows you to create an invalid project - this seems like an error. Submit a report at http://bugzilla.xamarin.com .

0
source

All Articles