Geek Noise
Rants, rambles, news and notes by Peter Provost
11

Visual Studio 2008 SP1 and .NET 3.5 SP1 Release to Manufacturing

Monday, 11 August 2008 04:24 by Peter Provost

Time for another release announcement:

REDMOND, Wash. — Aug. 11, 2008 — Microsoft Corp. today announced the release to manufacturing (RTM) of the .NET Framework 3.5 Service Pack 1 (SP1) and Visual Studio 2008 SP1. These releases come just nine months after the release of the .NET Framework 3.5 and Visual Studio 2008, and include a substantial number of updates based directly on customer feedback. The service packs continue to address the needs of the developer community by making it even easier to develop applications for the latest platforms, with new features such as the .NET Framework Client Profile for faster deployment of Windows-based applications, multiple enhancements to ASP.NET, and unparalleled support for database application development through the ADO.NET Entity Framework, ADO.NET Data Services and integration with SQL Server 2008.

“Visual Studio 2008 SP1 and the .NET Framework 3.5 SP1 had an extremely positive impact on our ability to develop a Web-based application that our customer, Misys Healthcare Systems, could use to manage patients’ records — in fact, it helped us boost development speed by 60 percent,” said Galen Murdock, president and CEO at Veracity Solutions Inc. “The Microsoft ASP.NET AJAX improvements and new capabilities such as ADO.NET Entity Framework and ADO.NET Data Services meant we didn’t have to worry about any of the underlying plumbing and could simply focus on building a highly responsive and interactive experience for users.”

Read the entire press release here:
http://www.microsoft.com/presspass/press/2008/aug08/08-11NETFXPR.mspx

UPDATE: Here are links to all the downloads:

Visual Studio 2008 Express Editions with Service Pack 1 (Bootstrappers)
http://go.microsoft.com/fwlink/?LinkId=123679

Visual Studio 2008 Express Editions with Service Pack 1 (iso)
http://go.microsoft.com/fwlink/?LinkId=123680

Visual Studio 2008 Service Pack 1 (Bootstrapper)
http://go.microsoft.com/fwlink/?LinkId=122094

Visual Studio 2008 Service Pack 1 (iso)
http://go.microsoft.com/fwlink/?LinkId=122095

Visual Studio  Team System 2008 Team Foundation Server Service Pack 1
http://go.microsoft.com/fwlink/?LinkId=124829

.NET Framework 3.5 Service Pack 1
http://go.microsoft.com/fwlink/?LinkId=124150

Currently rated 3.0 by 2 people

  • Currently 3/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Tags:   ,
Categories:   Technology
Actions:   E-mail | del.icio.us | Permalink | Comments (3) | Comment RSSRSS comment feed
19

.NET Cheat Sheets

Wednesday, 19 September 2007 10:19 by Peter Provost

I was looking to remind myself how to do milliseconds formatting for DateTime objects and ran across a few useful links and cheat sheets for things like that:

The first had what I wanted in a comment at the bottom and the second just looks like it is useful to have around.

Technorati Tags: ,

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Tags:   ,
Categories:   Technology
Actions:   E-mail | del.icio.us | Permalink | Comments (0) | Comment RSSRSS comment feed
23

Just Released - Updater Application Block for .NET 2.0

Tuesday, 23 May 2006 00:59 by Peter Provost

We are pleased to annouce the release of Updater Aplication Block for .NET 2.0 which includes adjustments to use the latest version of Enterprise Library (January 2006 Release).

We suggest you should always evaluate ClickOnce as the peferred technology for managing updates on Smart Clients, but there are scenarios where ClickOnce is not applicable (like Windows Services). Based on the feedback received from our community, we've ported UAB into .NET 2.0 to help customers working with these scenarios. No new features have been included though.

What is in the release:

  • The code compiles on .Net 2.0 of course :-)
  • Updater Application Block uses Enterprise Library 2.0 (Jan 2006) for the configuration
  • Quickstarts migrated to support the new configuration system
  • Breaking changes only related to configuration and not the Updater API
  • Bits Downloader now handles broken downloads gracefully (this is a fix to the original implementation)
  • UpdaterTask serialization fixed. There was a bug on the net 1.1 version of UAB related to the partial update scenario. When some files were removed from the manifest, the UAB serializes the UpdaterTask with the original version of the files. This caused the ApplicationDeployProcessor to fail.
  • Partial update scenario fixed.
  • The algorithms that might be used to calculate file hashes are non-keyed hash algorithms like: MD5; RIPEMD160; SHA1; SHA256; SHA384; SHA512
  • Manifest tool fixed to correctly support salt enabled hashes
  • The solution assumes you have EntLib installed in your machine to the default location (c:\program Files\...)

There is no Enterprise Library 2.0 Design time (that's an excercise to the reader), there are still .NET 2.0 compilation warnings and we've only ported the C# version.

As usual, feedback is very much welcome!

patterns & practices Client Team

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
16

Using the CAB Bank Teller Quick Start With Partial Trust ClickOnce Deployments

Wednesday, 16 November 2005 05:05 by Peter Provost

There have been a few posts on the CAB message boards asking for instructions for getting the Bank Teller QuickStart working in a Partial Trust ClickOnce deployment. I took a few hours yesterday and carefully documented the steps required. This was based on a standard CAB installation done with the November 2005 C# Release.

  1. I assume you have ClickOnce working for a standard Windows Forms application. Please make sure you do before proceeding. If you need help with this please see http://msdn2.microsoft.com/en-us/library/fb94w1t5(en-US,VS.80).aspx
  2. Open the BankTeller QuickStart.sln Solution File in Visual Studio 2005. Please make sure you are running Visual Studio as a local machine Administrator or some of the following steps won't work.
  3. In the BankShell Project, open App.config and add requirePermission="false" to each <section> element in the <configSectionsElement> at the top.
  4. Open ProfileCatalog.xml and comment out the CustomerMapExtensionModule.dll module. As far as we can tell, since that module uses Internet Explorer, it will require full trust.
  5. Right-click on the BankShell project and choose Properties. Ensure the following values are set on each of the indicated Tabs:
    • Debug Tab
      • Enable the Visual Studio hosting process - CHECKED
    • Signing Tab
      • Sign the ClickOnce manifests - CHECKED
      • Use Create Test Certificate to create a certificate if you don't already have one.
    • Security Tab
      • Enable ClickOnce Security Settings - CHECKED
      • Select "This is a partial trust application" from the drop down box.
      • Choose Local Intranet from the Zone dropdown box
      • Click the Calculate Permissions button
      • Ensure that the following permissions are set:
        • EnvironmentPermission - Include Unrestricted
        • FileDialogPermission - (Zone Default)
        • FileIOPermission - Include Unrestricted
        • IsolatedStorageFilePermission - Include
        • ReflectionPermission - Include Unrestricted
        • RegistryPermission - (Zone Default)
        • Security Permission - Include - Grant the following permissions:
          • Enable assembly execution
          • Allow calls to unmanaged assembliesSkip verification
          • Allow principal control
          • Create and control application domains
          • Enable serialization formatter
          • Allow evidence control
        • UIPermission - Include Unrestricted
        • KeyContainerPermission - Include
        • StorePermission - (Zone Default)
        • DnsPermission - (Zone Default)
        • PrintingPermission - (Zone Default)
        • SocketPermission - (Zone Default)
        • WebPermission - Include
        • EventLogPermission - (Zone Default)
        • PerformanceCounterPermission - (Zone Default)
        • OleDbPermission - (Zone Default)
        • SqlClientPermission - (Zone Default)
        • DataProtectionPermission - Include
      • Click the Advanced button. Make sure "Debug this application with the selected permission set" is CHECKED
  6. Press F5 to run the application in the debugger. The application should start just fine. If it does not and gives a security error, go back and double-check the security options you set in step 5.

Now that we have it running correctly, we have to make sure the files all deploy correctly using ClickOnce. Because ClickOnce uses a project's references to determine dependencies, it won't correctly identify that BankShell depends on BankTellerModule. The most CAB friendly way that we have found to get this resolved (without actually adding references to BankTellerModule) is to do this:

  1. Right-click on the BankTellerModule project and choose Properties.
  2. Go to the Build Tab and change the Output path to "bin\Debug\".
  3. Build the BankTellerModule project
  4. Right click on the BankShell project and choose Add Existing Item from the Add menu. Browse to the BankTellerModule\Debug\bin directory. Change the File Type dropdown box to "Executable Files". Select BankTellerModule.dll. Important: Do not click the Add button! Instead, click the little down-arrow on the right side of the Add button and choose Add As Link. You should now see the BankTellerModule.dll file in the BankShell project and it should have a little shortcut overlay icon.
  5. Click on the linked BankTellerModule.dll in the BankShell project and press F4 to get right properties Tool Window open for that file. Make sure that Build Action is set to Content and that Copy to Output Directory is set to Copy If Newer.
  6. Reopen the BankShell properties page by right-clicking on the BankShell project and choosing Properties. Open the Publish Tab and click on the Application Files button. Make sure that BankTellerModule.dll and ProfileCatalog.xml both have their Publish Status set to Include and are in the Required Download Group. (Note: You may have to select the "Show all files" checkbox to see the files.) 

Once you have the application running correctly, you should be able to Publish it using the Publish Tab in the BankTeller Properties. Again, please make sure you can publish a regular Windows Forms application before doing this with a CAB application. One thing that I found that helped me was to use a local file path like C:\Inetpub\wwwroot\BankShell for the Publishing Location and the provide an Installation URL like http://localhost/BankShell.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Tags:   , ,
Categories:   Technology
Actions:   E-mail | del.icio.us | Permalink | Comments (0) | Comment RSSRSS comment feed
13

CAB June to October: Whither Private Field Injection?

Thursday, 13 October 2005 14:45 by Peter Provost

As I’m sure you can imagine, we were given lots of feedback from the June CTP of CAB. One of the things we heard about, both from within MS and from outside folks, was that doing manipulation of private fields or properties was bad and that we shouldn’t support doing dependency injection into privates.

Additionally, in .NET the permission that allows private reflection is limited to only those assemblies running with Full Trust. Which means that those running in the LocalIntranet or Internet zones can’t do it. It also turns out that private reflection causes a pretty severe performance hit.

So we decided to go to public injection only.

This led us to the question about whether to support fields at all. According to the .NET Framework Design Guidelines for Class Library Developers, it is recommended that fields not be exposed publicly to better enable versioning and maintenance of the class. Instead, it is recommended that if the data is meant to be get/set from outside the class it should be wrapped in a property. So as a result, we decided to discontinue support for field injection.

But what about those times when you don’t want the property to be set by users of this class? How do we allow for injection of it, while not allowing unwanted manipulation of its contents by consumers of the class? Almost everyone who wanted to do private field injection sited something like this as the reason for wanting to keep it private.

That is why the dependency attributes now support being applied to parameters. You see, we now support constructor dependency injection. So when you have a situation when you want a field to get set once and only once, instead of doing dependency injection into a private field, we now recommend that you take that dependency injection via a constructor parameter.

So whereas you would have had something like this in June CAB:

   1:  public class MyClass
   2:  {
   3:      [ServiceDependency]
   4:      private ISomeService service;
   5:   
   6:      public MyClass()
   7:      {
   8:      }
   9:   
  10:      // Etc.
  11:  }

In Oct CAB, we would do it like this:

   1:  public class MyClass
   2:  {
   3:      private ISomeService service;
   4:   
   5:      public MyClass([ServiceDependency] ISomeService service)
   6:      {
   7:          this.service = service;
   8:      }
   9:   
  10:      // Etc.
  11:  }

If you need to be able to support multiple constructors, we have a special attribute called [InjectionConstructor] that you can apply to the one you want us to use:

   1:  public class MyClass
   2:  {
   3:      private ISomeService service;
   4:   
   5:      public MyClass()
   6:      {
   7:          service = new DefaultServiceImplementation();
   8:      }
   9:   
  10:      [InjectionConstructor]
  11:      public MyClass([ServiceDependency] ISomeService service)
  12:      {
  13:          this.service = service;
  14:      }
  15:   
  16:  }

In the end, you get the same thing: an instance of MyClass that gets its service field set. But in the newer code, you control how that private field gets set (as it should be) and we just make sure you get the right value for it.

We think that this results in a class that is clearer, easier to test, and doesn’t cause problems that can crop up when you do private reflection.

But as always, we’d love to hear what you think of this.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Tags:   ,
Categories:   Technology
Actions:   E-mail | del.icio.us | Permalink | Comments (0) | Comment RSSRSS comment feed