Error while trying to load empty VB.Net project

Mike.3879Mike.3879 USMember
edited November 2014 in Visual Studio

Hi I just downloaded studio XamarinStudio-5.5.4.15-0 and MonoFramework-MRE-3.10.0.macos10.

When I try to create empty VB.Net solution i get Error while trying to load the project '/Users/michael/Projects/vbnet/vbnet/vbnet.vbproj': Project does not support framework '.NETFramework,Version=v4.5'

Any ideas?

Thank you

OSX Yosemite 10.10.1
VBN

Posts

  • mattwardmattward GBMember Xamurai

    The default framework has changed from 4.0 to 4.5 in Xamarin Studio and currently the VB.NET addin indicates that .NET 4.5 is not compatible with the VB.NET project type. You can fix the target framework by editing the .vbproj file in a text editor and changing the TargetFramework from 4.5 to 4.0:

    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
    

    Note that on the Mac I believe there are some problems compiling VB.NET projects even if the target framework is set to 4.0.

  • Mike.3879Mike.3879 USMember
    edited November 2014

    Thank you mattward but that did not work for me

  • mattwardmattward GBMember Xamurai

    What happens when you do change the target framework?

  • knightofghostsknightofghosts GBMember

    Hi. I am new to Xamarin. I am currently working with on a mac and I am wanting to work with VB.net. I have installed Mono and on the site they had a link to download Xamarin. I downloaded it and installed it. When I created a VB.net console app I hit the problem of the 4.5 net frame work. I changed the vbproj file as suggested however when I tried to run the app I got an error. It said that the exe file was missing in the debug folder. I know that exe files don't work on mac. Is there any way around this problem?

    Thanks

  • mattwardmattward GBMember Xamurai

    There is currently some problems with VB.NET on Mono. If you have changed the target framework in the project to be 4.0 you can get the console project to compile by opening project options, right click the project and select Options, then in Build - General, uncheck the Use MSBuild build engine. Then rebuilding your project should create the .exe. Using MSBuild does not seem to create an .exe file, even though the build says it was successful there are errors reported in the build output.

  • knightofghostsknightofghosts GBMember

    Thanks. That seems to have solved the problem. I have also installed XCode and the mac version from the Xamarin website so hopefully it will be plain sailing from here.

  • knightofghostsknightofghosts GBMember

    Would it be possible to include a framework selector in a future release? It would mean that you wouldn't have to change the file manually.

  • mattwardmattward GBMember Xamurai

    In a future release the VB.NET project should be created without the error about .NET 4.5 not being supported. So you would not need to change the file manually.

  • ToSitesToSites BRMember

    This problem could be solved changing:

    v4.5

    By:

    v4.5.1

    But I don't know where edit the template because do it every time is very boring.

    Someone know where the template used to create VB.NET project are located?

  • mattwardmattward GBMember Xamurai

    The VB.NET project templates are compiled into the VB.NET's assembly so updating them is non-trivial. I suspect you would need to recompile the VB.NET addin from source and try to replace the existing .dll.

  • ToSitesToSites BRMember

    On mac everything is into Xamarin Studio.app/Contents/Resources/lib/monodevelop/AddIns.

    In this folder have a lot of folders like AspNet, fsharpbinding, etc, but VB.NET.

    Do you know the folder and file name that need to be changed?

    I perceived it is some thing like *.xml but I don't know the folder and file name.

  • mattwardmattward GBMember Xamurai

    The VB.NET addin should be in the Xamarin Studio.app/Contents/Resources/lib/monodevelop/AddIns/BackendBindings directory.

    The project and file templates for VB.NET are embedded resources so you cannot edit them from that directory since they are compiled into the MonoDevelop.VBNetBinding.dll. You would need to build the VB.NET from source with updated templates. Or create your own addin with your customized templates.

  • ToSitesToSites BRMember

    Ok, thanks. I will try to create my own custom templates then.
    There are a possibility to correct it in a future release?

  • mattwardmattward GBMember Xamurai

    Ideally the VB.NET addin would not need the project templates changing. The better fix would be to fix whatever is preventing it from supporting compiling against .NET 4.0 and.NET 4.5.

  • BalaminBalamin MMMember

    Thank. It's work. Thank you so much

  • matandkedmatandked PLMember

    Although Monodevelop shares basic code with Xamarin Studio, changing TargetFramework does not help in Monodevelop on Linux. When I change manually .vbproj file, so that I have:

    <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
    

    I am able to load solution, but I receive "Could not connect to debugger" error (I have mono-basic package installed). The same issue when I change to v4.5.1 (in TargetFramework).
    I reported it as issue: https://bugzilla.xamarin.com/show_bug.cgi?id=38508

Sign In or Register to comment.