As I mentioned in my last post, I'm dealing with a new keyboard layout. My resolve to navigate around seamlessly with my new layout was to install ViEmu which would allow my VS text editor to emulate the Vim keyboard layout. I've been loving it. There are some inconsistencies inside Visual Studio (ie. CTRL+R is used for ReSharper, CTRL+Y is used for Vim, etc..), but for the most part, I really like it and feel right at home.
The one thing that was causing me the biggest problem though was that I keep reaching for the 'ESC' key, but continuously hit the F1 key. This of course brought my productivity to a screeching halt while it loaded. Of course, I would always wait for it to load, then close it immediately.
My resolve to that problem was that I disabled it. I disabled help. Call the authorities, report me, I've done the unthinkable. I never thought I'd live to see the day when anybody (let alone myself) would disable help. It actually made me feel dirty when I disabled it... Anyway, I free flying now!
I thought this was worthy of announcing on a blog post. I've graduated to the Google Help File.
Random posts about trail running, computing, family-ing, thinking, and whatever else I choose to say.
Showing posts with label visual studio. Show all posts
Showing posts with label visual studio. Show all posts
Wednesday, September 28, 2011
Monday, March 14, 2011
NuGet Package Management to the Rescue
I've seen the light.
I am working on a project and needed to include a reference to Castle.Windsor. I thought about all the pain that goes with this. In order to even get Castle.Windsor working, I have to first download it. Place it into a directory on my file system. Then I have to add the reference to my .NET assembly. Once that's done, I have to then modify my web.config file to ensure that everything get's mapped up correctly. Then (and only then) can I try to do a compile and hope I didn't screw something up along the way.
Welcome to NuGet!
With NuGet, I simply go to the Package Management Console toolwindow inside Visual Studio and type:
This means:
- Set MyProjectName as the default project
- Pipe that output as the input to the Install-Package command
- Install Castle.Windsor (v2.5.2) along with anything it might depend on
Viola, all that stuff is done for me automagically for me. I see a slew of output in my console window with a final "Done." at the end. Looking through my solution explorer, I see that the references have been added and a few config files were updated. Castle.Windsor is installed and configured.
Since this was so easy, I went so far as to install Elmah next. Installing these two projects into my solution took me less than 10 seconds. Without NuGet, this would have taken me 20-30 minutes and lots of docs-diving.
I'm a NuGet fan!
I am working on a project and needed to include a reference to Castle.Windsor. I thought about all the pain that goes with this. In order to even get Castle.Windsor working, I have to first download it. Place it into a directory on my file system. Then I have to add the reference to my .NET assembly. Once that's done, I have to then modify my web.config file to ensure that everything get's mapped up correctly. Then (and only then) can I try to do a compile and hope I didn't screw something up along the way.
Welcome to NuGet!
With NuGet, I simply go to the Package Management Console toolwindow inside Visual Studio and type:
Get-Package MyProjectName | Install-Package Castle.Windsor -Version 2.5.2
This means:
- Set MyProjectName as the default project
- Pipe that output as the input to the Install-Package command
- Install Castle.Windsor (v2.5.2) along with anything it might depend on
Viola, all that stuff is done for me automagically for me. I see a slew of output in my console window with a final "Done." at the end. Looking through my solution explorer, I see that the references have been added and a few config files were updated. Castle.Windsor is installed and configured.
Since this was so easy, I went so far as to install Elmah next. Installing these two projects into my solution took me less than 10 seconds. Without NuGet, this would have taken me 20-30 minutes and lots of docs-diving.
I'm a NuGet fan!
Thursday, November 18, 2010
Upgrading to Visual Studio 2010 and SQL Server 2008 Express R2
I made the jump yesterday to finally install and configure my dev machine to run the latest bits. I upgraded from Visual Studio 2008 to Visual Studio 2010. I also upgraded from Sql Server Express 2005 to Sql Server 2008 R2 Express. I must say that I'm very excited to start using all the new stuff. Rather than installing everything side by side, I decided to scrap the old apps and fully commit to the new pieces.
During this process I had no real problems. The only real problem I had was getting SQL Server 2008 R2 Express configured correctly. I've tried various things to get the new database management tools working inside the SQL Server Management Studio 2008 R2 and couldn't quite figure it out (still can't). No matter what I do, I can't create a new 2008 R2 database without using VS2008 Server Explorer. Whenever I right click and 'Create Database', it always creates a SQL CE 3.5 database instance. This version is missing a lot of functionality. For instance, I'm not able to create views and the designer for this is very kludgy IMO. I'm sure it's something simple, but I just can't figure it out yet.
While trying to get it fixed, I completely uninstalled SQL Server Development Edition 2005. This still didn't solve my problem, so now I'm without Analysis Services 2005 and no full blown SQL Engine. It's all good, I've read that they sit side by side nicely even when installing SQL 2005 after SQL 2008.
The good news is that I can create a 2008 R2 database instance from inside my new VS2010 IDE. That's a win in my book and I'm content with this. The process was pretty simple
I did have one pretty nasty problem when converting my ASP.NET MVC project to the 4.0 framework. Visual Studio provided a nice little wizard to do this, but when it did this there were some things that didn't work as expected.
The first problem was that it didn't add System.Core to the references. Without this library referenced, all of my Linq queries were brokent (+100 source files)! While this looks like a pretty simple thing to fix, it turned out to be a little tricky. I couldn't just add it as a reference from inside the IDE like I thought. When I tried to do this, I got an error stating:
"A reference to 'System.Core' could not be added. This component is automatically referenced by the build system."
Hmm... The way I was able to fix it was to:
Voila!
I also had (and still have) a problem debugging my web project. When I try to run my project, it does not actually start debugging like it should. The project compiles and starts the ASP.NET Development Server, but it doesn't actually load the URL in my default web browser. When I open the system tray icon and click 'Show in browser...' it crashes. I tried all kinds of things to get it to work, but nothing is working. I've installed a few patches and restarted IIS a few times after each one, but nothing. I've tried running aspnet_regiis -i against the new framework. Again, to no avail. As a test, I ran the project and then went to my web browser and typed in the appropriate URL. It works. I set some breakpoints in my code, and they work too. This works well enough for me.
Next steps I think are to convert my entire project to .NET 4.0 Framework so I can take advantage of all the new goodness with C# 4.0. I also plan to upgrade our web solution from ASP.NET MVC 1.0 to ASP.NET MVC 2.0. I'm also anxious to start using GrapeCity ActiveAnalysis 2.0 Silverlight control.
Upgrading to new development environments is so much fun... I'm actually excited to work a full day tomorrow! :)
During this process I had no real problems. The only real problem I had was getting SQL Server 2008 R2 Express configured correctly. I've tried various things to get the new database management tools working inside the SQL Server Management Studio 2008 R2 and couldn't quite figure it out (still can't). No matter what I do, I can't create a new 2008 R2 database without using VS2008 Server Explorer. Whenever I right click and 'Create Database', it always creates a SQL CE 3.5 database instance. This version is missing a lot of functionality. For instance, I'm not able to create views and the designer for this is very kludgy IMO. I'm sure it's something simple, but I just can't figure it out yet.
While trying to get it fixed, I completely uninstalled SQL Server Development Edition 2005. This still didn't solve my problem, so now I'm without Analysis Services 2005 and no full blown SQL Engine. It's all good, I've read that they sit side by side nicely even when installing SQL 2005 after SQL 2008.
The good news is that I can create a 2008 R2 database instance from inside my new VS2010 IDE. That's a win in my book and I'm content with this. The process was pretty simple
- Uninstall SQL Server 2005 Express
- Uninstall Visual Studio 2008
- Install SQL Server 2008 Express R2
- Install Visual Studio 2010 Professional
- Reinstall Resharper 5.1
- Test that everything worked...
- Convert Projects to VS2010
- Blog about the new goodness
I did have one pretty nasty problem when converting my ASP.NET MVC project to the 4.0 framework. Visual Studio provided a nice little wizard to do this, but when it did this there were some things that didn't work as expected.
The first problem was that it didn't add System.Core to the references. Without this library referenced, all of my Linq queries were brokent (+100 source files)! While this looks like a pretty simple thing to fix, it turned out to be a little tricky. I couldn't just add it as a reference from inside the IDE like I thought. When I tried to do this, I got an error stating:
"A reference to 'System.Core' could not be added. This component is automatically referenced by the build system."
Hmm... The way I was able to fix it was to:
- Right click on my Web Project
- Unload Project
- Edit the .csproj file
- Add <Reference Include="System.Core" /> in the appropriate ItemGroup
- Save the change
- Right click on my Web Project again
- Reload project
Voila!
I also had (and still have) a problem debugging my web project. When I try to run my project, it does not actually start debugging like it should. The project compiles and starts the ASP.NET Development Server, but it doesn't actually load the URL in my default web browser. When I open the system tray icon and click 'Show in browser...' it crashes. I tried all kinds of things to get it to work, but nothing is working. I've installed a few patches and restarted IIS a few times after each one, but nothing. I've tried running aspnet_regiis -i against the new framework. Again, to no avail. As a test, I ran the project and then went to my web browser and typed in the appropriate URL. It works. I set some breakpoints in my code, and they work too. This works well enough for me.
Next steps I think are to convert my entire project to .NET 4.0 Framework so I can take advantage of all the new goodness with C# 4.0. I also plan to upgrade our web solution from ASP.NET MVC 1.0 to ASP.NET MVC 2.0. I'm also anxious to start using GrapeCity ActiveAnalysis 2.0 Silverlight control.
Upgrading to new development environments is so much fun... I'm actually excited to work a full day tomorrow! :)
Subscribe to:
Posts (Atom)