Tagged netTim Stanley

Migrating to .Net7

Nov 17, 2022 EST

On November 8, 2022, Microsoft released .Net 7.  After getting Visual Studio Professional 17.4 installed, updating to .Net 7 was fairly painless.

Changing the obligatory TargetFramework entry in all the projects:


<TargetFramework>net7.0</TargetFramework>

Updating the package references from 6.0.0 to 7.0.0:


<PackageReference Include="Microsoft.Extensions.Hosting" Version="7.0.0" />

Updating the github action yml file to use the new dotnet version:


dotnet-version: '7.0.x'

Azure even had all the website hosting ready so I didn't have to wait for anyone to deploy .Net 7. Microsoft does list some incompatabilities in .Net 7, but it's not a long list. This has probably been the easiest migration since .net46 to .net48.

References

Use HostingEnvironment.MapPath

Jun 25, 2010 EST

When running a service under IIS, the HttpContext.Current object is not available, so HttpContext.Current.Server.MapPath will fail.

fileName = HttpContext.Current.Server.MapPath(fileName);

The solution is to use Hosting.HostingEnvironment.MapPath instead.

fileName = System.Web.Hosting.HostingEnvironment.MapPath(fileName);

Date And Time Tracking in .Net

Sep 28, 2009 EST

Getting the right date and time sounds simple enough, but when you look at a few interesting scenarios with multiple teams coordinating actions across multiple time zones with multiple clients and servers, designing for the date and time for a given event becomes complicated very quickly.  I’d like to share an some approaches that I think work well in .Net.More...

Silverlight 2.0 Released

Oct 15, 2008 EST

On October 14, 2008, Microsoft released Silverlight 2.0, the cross-platform browser plug-in for both Macintosh and PC platforms.

Silverlight includes several Rich Internet Application (RIA) features, including:

  • WPF UI Framework
  • Rich Controls
  • Rich  Networking Support
  • Rich Base Class Library More...

Visual Studio 2008 SP 1 and .Net 3.5 SP 1 Released

Aug 11, 2008 EST

Microsoft announced August 11 availability of the following new downloads.

More...

Source Control Tools

Aug 06, 2008 EST

H.O. Studley Tool Chest

The limitations of your tools are your limitations. Choose your tools wisely. More...

How to Remove Projects in the Visual Studio Project MRU List

Mar 08, 2008 EST

Visual Studio.Net (2003, 2005 and 2008) keeps a list of recent projects shown on the Start Page in the IDE. Sometimes when moving projects around on the disk, one can end up with duplicate names and this can be confusing. To resolve this, the list in the registry must be updated.

More...