Creating a C Project in Visual Studio

If you’re in love with Visual Studio as I am, you would probably prefer to do all of your coding day in and day out in Visual Studio. However, sometimes some languages may not appear as if they are supported in Visual Studio. One of those languages is C. Visual Studio is well known for its support of C++ projects, but doesn’t explicitly list C as a language. Because C++ contains all of the features/functionality of C, the VS C++ compiler will also compile any C code you write. To create a C project in Visual Studio you just need to create an empty C++ project and add any appropriate .c / .h files as needed. All will compile and work just fine.

Here’s how you can start a new C project within Visual Studio.

Note: This tutorial is designed/tested around Visual Studio 2012, the latest version of Visual Studio available as of this writing. However, this should work for any version of Visual Studio.

  1. Open Visual Studio
  2. Select File –> New –> Project… (or CTRL+SHIFT+N for you keyboard fanatics)
  3. When the New Project dialog box appears select Visual C++ in the left pane. (You may need to go to Templates –> Other Languages –> Visual C++
  4. In the Project window, select Win32 Console Application
  5. Give an appropriate name to the project.
  6. The Win32 Application Wizard dialog box should appear
  7. Click Next at the Welcome to the Win32 Application Wizard page
  8. On the Application Settings page, make sure the following are selected:
    1. Application Type: Console application
    2. Additional Options: Empty Project
  9. Click Finish
  10. You now have a new “C” project

The following steps walk you through creating the actual C files.

  1. If Solution Explorer is not visible go to View –> Solution Explorer
  2. Right click the Source Files folder in Solution Explorer and select Add –> New Item…
  3. The Add New Item dialog box should appear.
  4. Select C++ File (.cpp) and name it an appropriate name, such as main.c (make sure to give it a .c extension)
  5. Start coding!

That should be all you need to know to create a new C project in Visual Studio. If you have any questions, feel free to leave a comment below.

Happy coding!

Solved: devenv.exe–Entry Point Not Found in Visual Studio 2012 RC

If you recently installed the Office 15 public preview alongside Visual Studio 2012 RC, you more than likely encountered the following error:

error

It seems Microsoft is well aware of this issue and has issued a patch for Visual Studio 2012. It apparently has something to do with the Office 15 preview breaking your VS2012 install… you’d think Microsoft would have tested this and fixed it before release, but I guess not.

I actually ran across this issue earlier today and figured it was a problem with the Visual Studio installer. After reinstalling, uninstalling, and installing again I eventually went and searched online for the issue. Thankfully, I was not the only one with this issue and I received the link mentioned above via a blog post at ACS Blogs.

If you are experiencing this issue, the above patch should work for you.

Install Both Hyper-V and VMware Workstation on Windows 8 Without Errors

One of the cool features of Windows 8 is the ability to run Hyper-V client side. No more needing Windows Server to host the VMs, you can now create and manage your VMs right inside Windows 8 using the client version of Hyper-V. However, if you’re still a die-hard fan of VMware Workstation fan (like me), or want the networking features/functionality of VMware Workstation alongside Hyper-V, you may need to work around a common error that appears if you’ve already enabled Hyper-V before installing Workstation.

If you’ve tried installing VMware Workstation after you enable Hyper-V on Windows 8, you probably encountered this error:

vmware

Fear not, however, because that error is needlessly there. You can still install VMware Workstation, you just need to first disable Hyper-V, then reenable Hyper-V. Enabling/Disabling Hyper-V will leave your existing VMs untouched, albeit, you may need to tell Hyper-V where they are after enabling it again. Simply follow the following steps if you encounter this error (meaning, you’ve already enabled Hyper-V support):

  1. Hit the Windows Key and type “windows features”
  2. Hit the Windows Key + W combo to bring up the Windows Settings panel of the Start Screen.
  3. Click on Turn Windows features on or off
  4. When the Turn Windows features on or off dialog appears, look for Hyper-V and deselect it
  5. Click OK
  6. Restart your computer when prompted
  7. Install VMware Workstation
  8. Enable Hyper-V again through the Turn Windows features on or off dialog
  9. Restart your computer

Voila! You can now run Hyper-V and VMware Workstation seamlessly side by side. Not only does this offer you the ability to use both technologies for your virtualization needs, but it also allows you to use VMware’s networks inside Hyper-V. How cool is that? It’s a lot easier using standard VMware Workstation network configs than setting up a clean, usable network inside Hyper-V, from my experience. I’ll write more on this later, specifically a How-To/Why Bother type post.

I’m currently running both Workstation 8.0 and Hyper-V on all of my Windows 8 machines and they are working flawlessly. In some cases, you may even want to enable Hyper-V support in order to remedy the common freeze-ups Windows 8 has been having in the latest release preview even if you don’t intend on using Hyper-V for its intended purposes.

Although I have not run into any issues, this does not mean you will not, so as always, tread carefully. If you do experience issues running Hyper-V and VMware Workstation side by side, let me know about them in the comments. I’d be very interested in seeing if my experience is the same, or if it’s different from other people’s experience.

If you want to listen to more of my tech rumblings and mumblings, you can get tiny, bite-sized 140 character pieces by following me on Twitter.

Get your 25GB of free SkyDrive storage while you still can

I just learned from Paul Thurrott that Microsoft announced some new services and products associated with its SkyDrive cloud service. Although most of the news was welcomed, one downside is Microsoft dropping the amount of free storage on SkyDrive from 25GB to 7GB. But, don’t fret yet, because Microsoft is allowing its loyal users (the ones who have been with them through thick and thin) a free upgrade to 25GB… for life. As far as I can tell, as long as you have previously created and used a SkyDrive account, you should be able to upgrade for free. Here’s how.

Go to SkyDrive.com and sign in with your Live ID.

When you sign in, you will see this at the top of your folders screen:

upgrade-skydrive-001

Click the link to be presented with the option to upgrade to your 25GB of space for free, for life.

upgrade-skydrive-002

Click “Free upgrade!”. You now have free storage of 25GB for life on your SkyDrive account.

Note, as you can see, Microsoft is now also offering paid-tier pricing plans. Up to 100GB per year, for an annual fee of $50.00. Along with this update, Microsoft has also released a SkyDrive desktop application that integrates with Windows Explorer. This is a very nice addition and one I plan on talking about soon.

Windows 8 Product Editions: Keeping it simple

Microsoft today unveiled the Windows 8 Product Editions on their Windows Team Blog. There are a couple things we can take from this post. First, Microsoft is slimming down the product editions in Windows 8 and second, Windows 8 is now the official name for the next x86/x64 Windows (note, the importance of x86/x64 here, Windows RT is the official name for Windows on ARM, or WOA, devices).

Windows 8 will include four editions, Windows 8, Windows 8 Pro, Windows 8 Enterprise and Windows RT (note, there is no Windows 8 in that last one). Consumers, however, only need to really worry about two editions, Windows 8 and Windows 8 Pro. Here’s a bit of a breakdown:

Windows 8. This is the base edition of Windows 8, similar to Windows 7 Home Premium. It will target consumers who need the basics, but don’t need the “enterprise” features that Windows 8 Pro offers. This edition supports upgrading from Windows 7 Starter, Home Basic, and Home Premium.

Windows 8 Pro. This edition, which closely resembles Windows 7 Ultimate, targets power users. This edition includes every feature of Windows 8, with also power user features such as boot from VHD, Hyper-V, and BitLocker encryption, to name a few. This edition supports upgrading from Windows 7 Starter, Home Basic, Home Premium, Professional, and Ultimate.

Windows RT. This edition only supports Windows on ARM or WOA devices. It is also the only edition to include Microsoft Office by default (however, this will probably be a slimmed down version of Office 15 and not the full version). Because Windows RT will only be installed on new WOA devices, most users will only need to worry about this edition when buying a Windows 8 tablet. Windows RT includes most, but not all, of the features in Windows 8. Users cannot upgrade from any version of Windows 7 to Windows RT.

Windows 8 Enterprise. This edition is specifically for volume licensing customers, and as such, will not matter to consumers very much, if at all (though I’m sure some consumers could get into volume licensing if they wanted/needed to). This edition includes all of the features of Windows 8 Pro.

This is a nice changeup from Microsoft. Users now only have two editions to choose from, which makes the buying decision a little easier, compared to Windows 7’s massive list of SKUs.

If you have any questions about Windows 8, please do not hesitate to contact me.

Ubuntu removes default Mono support in 12.04: Don’t worry though, you can still (easily) get it back

I’m currently trying out the latest Ubuntu pre-release, 12.04 (Precise Pangolin), and noticed Ubuntu removed support for Mono by default in this release. Prior to 12.04, Ubuntu included a default installation of the Mono Project. However, getting Mono back onto Ubuntu is very easy.

  1. Open up the Ubuntu Software Center (located on the Launcher)
  2. Select Developer Tools from the left navigation pane in USC.
  3. Select Mono/CLI option.
  4. Choose from one of the Mono/CLI developer tools installs and click Install (I recommend choosing complete Mono runtime, development tools, and all libraries).
  5. Enter in your administrative credentials if prompted and click Authenticate to continue.
  6. Done. Enjoy developing/running all your .NET applications.

For those unfamiliar, the Mono Project allows applications targeting the Common Language Runtime (CLR, .NET applications) to run on multiple platforms, such as Mac OSX, *nix, and Solaris. The Mono Project also offers a free Integrated Development Environment for developers to use to develop their CLR applications on these different platforms. Overall, I’ve been very impressed with the project and it seems to be a huge success in the overall community. It currently supports up to .NET Framework 4.0 and is based on the ECMA/ISO standardizations of the CLR.

The Mono project was a great addition to the software suite included in a default installation of Ubuntu. It allowed more scalability of the different types of applications which could run on Ubuntu, but further, it allowed users to test/run .NET applications in a Linux environment. I’m somewhat disappointed the team decided to remove this functionality, but at least they made it very easy to install.

I may write up a separate post about developing and running .NET applications using the Mono project.

.NET Reflector’s Prices Have … Doubled?

For those who know me know I’m a huge fan of RedGate’s .NET Reflector. I’ve used it since the days it was originally released for free (before RedGate’s announcement on Feb 2, 2011). Since then, I’ve held onto my copy, which according to its license terms says I can use my copy as long as I want. It just so happens that my copy never came with full Visual Studio integration, something I would like, but don’t necessarily require. A while back I was looking at this functionality and even considering RedGate’s VS edition of Reflector going for $65 at the time (this supported full VS integration). It seemed reasonable, and I almost considered getting it, but ended up not pulling the trigger. Now, I sort of wish I had, because that same edition now costs a humble $130. In fact, all three editions have seen all doubled in price:

Version

Original Price

Current Price

Standard $35 $70
VS $65 $130
VSPro $90 $190
net_reflect_prices-002
 
 

I tried finding the original prices using WayBackMachine … but it seems like RedGate offers dynamic pricing versus static pricing, so pricing didn’t even show up. If anyone has a screen capture of the original prices and would like to share, feel free to send it my way. BUT, I was able to find this, dating back to March 10, 2011 … Version 7 starting at $35. (Note: you can also see the Feb 2, 2011 announcement when they decided to switch Reflector over to a paid for product.) I’m not sure when RedGate put in the official price changes, as they have nothing on their site stating the increase, it just happened.

net_reflect_prices

This is quite a shame really, .NET Reflector was one of my favorite .NET decompilers. But for now, I will have to continue using my previous edition and have to deal with no VS integration, because there’s no way I’m spending $130 simply for VS integration.

On another note, there are only two updates on RedGate’s “update” page. One shows the new release of Version 7 and the other announcement is the announcement that .NET Reflector is no longer free. That’s it. No announcement of future price increases, no other announcements on the future of Reflect, nada. I’m not against a price increase in general, I personally believe if you have a great product (which .NET Reflector is) you have every right to sell it, but doubling your prices instead of a slow increase, plus without notifying your customers, that I don’t like.

Another I noticed was the extended 30 day free trial (originally only 14 days):

net_reflect_prices-004

I still don’t think this makes up for the drastic price increase.

Hopefully, RedGate will change their minds about the price increases (or offer a lower priced edition), especially with other comparable free alternatives.