How to build 64-bit Visual Basic.NET in Visual Studio 2010? - vb.net

Hopefully this is a simple question and I have just overlooked something somewhere...
I am writing VB.NET stuff in VS2010 on Windows 7 64-bit. It seems to build by default for a 32-bit target, how to I tell it to make a 64-bit executable?
I went to the project properties -> Compiler -> Advanced, but don't see the option anywhere.
Oh, and this is VS2010 Express, to be clear.

This involves using the Configuration Manager, it's not a part of the project properties.
Go to the Build Menu, then click Configuration Manager. Under Active solution platform, click New, then add one with x64 as the platform. Use this platform to compile for x64.

It seems that you have to go to Build -> Configuration Manager and create a new solution platform from the Active Solution Platform dropdown and select x64 as the new platform. That will also change your Active Platform to x64 from x86.
Damn, but Visual Basic will never cease to surprise me! Or is this the Principle of Least Surprise, VB edition: VB will surprise you when you least expect it!

Related

System.NullReferenceException occurs in xaml designer

I've created a C++ UWP Windows 10 app using Visual Studio 2015. However, I'm not able to visualize any xaml in the designer because I'm always getting a System.NullReferenceException error. How can I fix this?
That's very odd but I solved following these steps:
Close any instance of Visual Studio
Open Visual studio and create a new C# UWP empty project (name it as you like, do not matter)
Run the "useless" created project then close it as Visual Studio
Open again your previous C++ UWP project
In my case everything started working!
Switching solution platform to x86 worked for me.
I'm experiencing exactly the same problem on my primary development machine but not on another. The reason is... I think... When I installed Visual Studio 2015 on the 2nd machine, the first time I created a Universal Solution (C#) I was shown a dialog asking me to OK "elevated permissions" (custom permissions) for the VS2015 installation folder. I OK'd it and Designer works on that machine in both Blend2015 and VS2015 (community edition)
On the other machine I was never shown the dialog asking me to confirm elevated permissions and Designer does NOT work on that machine (VS2015 Enterprise). This machine also has VS2013 update 5) on it.
I am thinking that I might have to completely wipe off VS2015 and try to clean the registry of all VS2105 references AND remove the VS2015 installation directories on C:\ AND when I reinstall, create a installation directory with a different name (if I can). What a PAIN though... I'm waiting to see if MS delivers a simple solution since I'm quite positive that this whole issue boils down to a bug (feature... grrr) having to do with custom permissions that can't be changed (or added) after installation.
Would be nice is MS would confirm this...
(please note, none of this involved c++... it was all C#)
Tom
this is the dialog I was shown on the machine where Designer works]1
Installing the Windows Software Development Kit (SDK) for Windows 10 solved the issue for me. It may ask to unistall the previous version of Windows 10 RTM SDK
https://developer.microsoft.com/en-us/windows/downloads/windows-10-sdk
This is fixed in Update 1 of Visual Studio 2015
https://www.microsoft.com/en-us/download/details.aspx?id=49989

Add VB.NET to Visual Studio 2010 Professional

In the past I have only used Visual Studio 2010 Professional for C#, but now I need to work on a little bit of Visual Basic. When I go to create a project it only shows C# project templates. I am assuming when I installed Visual Studio 2010, I only installed C#.
How do I now install VB.NET support?
I tried following a MS tutorial: I went to Control Panel and selected Change/Uninstall on Visual Studio, but then it asked me to insert a CD, of which I have none since it was donwloaded.
Nevermind I figured it out. (win7) Control Panel -> Programs and Features -> Uninstall/Change on Visual Studio -> then when you hit the Add/Remove features and you get the popup asking about the cd (which is where I assumed i was stuck before) if you hit Download it takes you to the dialog where you choose additional languages to install and it worked.
I apologize for my earlier flippant comment, and offer you
http://download.cnet.com/Microsoft-Visual-Studio-2010-Professional/3000-2212_4-10618634.html
I had same problem but i did the simplest solution ,since i had my .iso(visual studio express) file i had downloaded I used my winrar to extract files ,went to VBExpress ,open the folder and click on the setup and it all worked out successfully...

Can you recomment a better IDE for Unity C# coding? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this question
The current version of Unity uses the old MonoDevelop 2.8 which is very primitive. Not only that it cannot register compile errors, I am also unable to know which method I can use. Each time I want to use some built-in method (like OnGUI or OnTriggerEnter) I have to search them manually.
Since I am coming from the world of IntelliJ IDEA or Eclipse or VisualStudio, this is a very primitive way of working.
I tried using the latest Unity with the newest MonoDevelop 4.0, but I did not succeed.
Can you suggest a modern IDE which I can use with Unity, the one where I will enjoy coding?
Updated 02/08/2022
JetBrains Rider
There's a new cross-platform .NET IDE by JetBrains - Rider with build-in resharper-like commands and quite a list of features including rich web development support and specifically Unity
Unity support
Deeper integration with the Unity Editor: if a method/script is used in a scene, prefab, or asset file, navigating from the Find Usages tool window to this usage will highlight the usage right in the Unity Editor.
Gutter mark icons for classes, methods, and fields that are implicitly used by Unity have been moved to Code Vision.
Check that a compilation in Unity was successful before running unit tests through Unity Editor in Rider.
Comments: I've been using it for some time already and my impression is very positive. It's faster compared to Visual Studio and has some really awesome hotkey combos, not to mention support for AceJump and a ton of other useful extensions.
Visual Studio C# Integration
What does this feature get me?
A more sophisticated C# development environment.
Think smart autocompletion, computer-assisted changes to source files, smart syntax highlighting and more.
What's the difference between Express and Pro?
VisualStudio C# 2010 is a product from Microsoft. It comes in an Express and a Profesional edition.
The Express edition is free, and you can download it from here: http://www.microsoft.com/express/vcsharp/
The Professional edition is not free, you can find out more information about it here: http://www.microsoft.com/visualstudio/en-us/products/professional/default.mspx
Unity's VisualStudio integration has two components:
Unity creating and maintaining VisualStudio project files. Works with Express and with Profesional.
Unity automatically opening VisualStudio when you doubleclick on a script, or error in Unity. Works with Professional only.
I've got Visual Studio Express, how do I use it?
In Unity, select from the menu Assets->Sync VisualStudio Project
Find the newly created .sln file in your Unity project (one folder up from your Assets folder)
Open that file with Visual Studio Express.
You can now edit all your script files, and switch back to Unity to use them.
I've got Visual Studio Professional, how do I use it?
Note: With Microsoft's Acquisition of SyntaxTree, Visual Studio Tools for Unity (formerly known as UnityVS) has been released free of charge in the Visual Studio gallery.
This replaces the below steps for users of Visual Studio Professional and removes a number of caveats mentioned further below, allowing for debugging within VS, advanced project file integration, a mirrored console window withing VS, and more.
In Unity, go to Edit->Preferences, and make sure that Visual Studio is selected as your preferred external editor.
Doubleclick a C# file in your project. Visual Studio should automatically open that file for you.
You can edit the file, save, and switch back to Unity.
A few things to watch out for:
Even though Visual Studio comes with its own C# compiler, and you can use it to check if you have errors in your c# scripts, Unity still uses its own C# compiler to compile your scripts. Using the Visual Studio compiler is still quite useful, because it means you don't have to switch to Unity all the time to check if you have any errors or not.
Visual Studio's C# compiler has some more features than Unity's C# compiler currently has. This means that some code (especially newer c# features) will not give an error in Visual Studio but will give an error in Unity.
Unity automatically creates and maintains a Visual Studio .sln and .csproj file. Whenever somebody adds/renames/moves/deletes a file from within Unity, Unity regenerates the .sln and .csproj files. You can add files to your solution from Visual Studio as well. Unity will then import those new files, and the next time Unity creates the project files again, it will create them with this new file included.
Unity does not regenerate the Visual Studio project files after an AssetServer update, or a SVN update. You can manually ask Unity to regenerate the Visual Studio project files trough the menu: Assets->Sync VisualStudio Project
Visual Studio Code (Windows, macOS, Linux)
Unity supports opening scripts in Visual Studio Code (VS Code). To open scripts in VS Code, go to Unity > Preferences > External Tools > External Script Editor and select Visual Studio Code. For information on using VS Code with Unity, see Visual Studio’s documentation on Unity Development with VS Code.
Prerequisites
To use Visual Studio Code for C# code editing and Unity C# debugging support, you need to install:
Mono (only required on macOS and Linux)
Visual Studio Code C# Extension
Visual Studio Code Debugger for Unity Extension (Not officially supported by Unity)
Sources:
http://docs.unity3d.com/Documentation/Manual/VisualStudioIntegration.html
https://docs.unity3d.com/Manual/ScriptingToolsIDEs.html
In Mac
1) Visual Studio Code
Lightweight
Support debug
https://code.visualstudio.com/
2) Consulo
Intellij IDEA based IDE
Support debug
https://github.com/consulo/consulo
3) Sublime Text also can be your choice on Mac.
Using Sublime Text as a script editor
There are some useful packages for unity too. (Code Completion, Syntax coloring...)
ST package for unity3d
And Video Tutorial
You can use MonoDevelop or SharpDevelop. I need to highlight that all the capability in the .NET framework and not in the IDE in other words you can use text editors and CLR compiler without the need to use any IDE.

what are all requirements for run the visual studio 2010 vb projects

I developed the project in visual studio 2010. That exe file is not supported for other PC's.
which dotnetframework to be installed? other than dotnetframework is there any other requirements needed?
Are you sure it's not the CPU type you specified during compiling (x86 vs x64 CPU). If you compiled in 64-bit and a user only has a 32-bit processor (x86), your code won't run.
The .Net Framework should work on any PC-based system, but be sure to include it in your deployment or setup package. (you can provide Excel, .NET Framework, and many other packages with your package.)
You should also try to find out what error messages your users are receiving -- which will point you in the right direction.

How do I enable Edit and Continue on a 64-bit application and VB2008 Express?

When I try to do that I get the following error:
Changes to 64-bit applications are not allowed.
#Wilka: That option wasn't available until I selected Tools > Options > Projects and Solutions > General and check "Show advanced build configurations". Though I found this hint from your MSDN link. So if you edit your comment, I can make it the accepted answer...
Thanks everybody!
Please see my first comment on this question, it's not there... Somehow... I can select Target framework though (2.0, 3.0 and 3.5), not that I see any use of that for this particular problem...
It doesn't have to be a 64bit program, actually, I rather prefer it to be 32bit anyway since it is more like a utility and it should work on 32bit systems.
Also, I'm running Vista at 64bit. Maybe that has something to do with it?
#Rob Cooper: Now I think of it, I never had the chance of selecting either a 64bit or a 32bit application when creating the solution/project/application...
And according to your link "64-Bit Debugging (X64)" is possible with MS VB2008 express edition.
Oh btw, I found the following:
If you are debugging a 64-bit application and want to use Edit and Continue, you must change the target platform and compile the application as a 32-bit application. You can change this setting by opening the Project Properties and going to the Compile page. On that page, click Advanced Compile Options and change the Target CPU setting to x86 in the Advanced Compiler Settings dialog box. Link
But I dont see the Target CPU setting...
You could try:
In Visual Basic 2008 Express Edition:
Build menu > Configuration Manager...
Change Active solution platform: to
"...", choose "x86", save the new
platform.
Now the "x86" option is available in
the Compile settings.
You may need to enable "Show advanced build configurations" first, in Tools > Options >
Projects and Solutions > General
(from this post on MSDN forums)
The dialog you're looking for is this one in the project properties:
by default, the target will be "Any CPU" which means it'll run as 64bit on a 64bit OS (like you're using), or 32bit on a 32bit OS - so this wont stop it from working on 32bit systems. But like you said, to use Edit & Continue you will need to target x86 (so it runs as 32bit).
Edit: fixed screenshot (I had the C# one, not the VB one)
The "Edit and Continue" feature for 64-bit code will be supported under Visual Studio 2013.
More information here.
AFAIK Visual Studio Express does not come with 64bit support.