Welcome to our new partner, Pluralsight!
It’s a tough world out there for .NET developers and software teams. Just when you think you’ve mastered the latest technique, technology, or framework — along comes something new to rattle your cage.
How many developers conquered the Entity Framework after a long struggle, only to turn the next corner and bump into LINQ? Perhaps you spent months learning WPF and Silverlight 3, just to discover that .NET 4.0 and Silverlight 4 will RTM very soon. It never ends. You just adapt to the shock of the new, learn the necessary skills to thrive, and move on.
So we hope that today’s news is a big win for .NET developers and teams everywhere.
I’m delighted to announce that
InnerWorkings is adding Pluralsight to our list of trusted partners.
I’m sure many of you know Pluralsight well — we have always been most impressed by their combination of top tier instructors, premium video content, and active participation in the .NET community.
Empty announcements are just annoying, so I’ve got something else to add today….
I’m really pleased to announce that Pluralsight is kindly offering InnerWorkings users and affiliates 1 week of access to the Pluralsight On-Demand! .NET training library. And I should add that this exclusive offer is entirely free, gratis, libero, frei.
So don’t look a gift horse in the mouth — get on over to the InnerWorkings offer page on the Pluralsight website and sign up for your free .NET training today. Simply use the activation code 27-1-YHRA-KDST to unlock your access to the Pluralsight library and start learning new programming skills today. Enjoy!
VistaDB 4.0 Build 13 – Visual Studio 2010 RC Updated
Build #13
This build has a lot of minor changes from user tickets, but the major update is for Visual Studio 2010 RC.
Visual Studio 2010 RCVisual Studio 2010 RC now works. There were several changes in Visual Studio between beta 2 and the RC with respect to data providers and plugin installation. We have fixed these issues.
Hopefully the Visual Studio 2010 final release will not introduce any more surprises. Beta 2 has not been tested with this build, we do not intend to support it.
VistaDB 3 and 4 side by side in Visual Studio 2008There is a conflict that impacts Visual Studio 2008 side by side of our two data sources. Once VistaDB 4 has been installed Visual Studio 2008 still knows about VistaDB 3.x, but it will not show it for new connections from the Server Explorer (this will impact Strongly Typed Datasets that reference Server Explorer connections).
In order to fix this you will need to first uninstall VistaDB 4 prior to build 13.
Then run InstallDesigner for VistaDB 3 from the VistaDB 3 install path like this:
C:\Program Files (x86)\VistaDB 3\VisualStudio\InstallDesigner.exe ( 32 bit users will not have an x86 in the program files )
After running this command line tool you should see the VistaDB 3 entry in Visual Studio 2008 again.
Finally, install VistaDB 4 build 13 or higher and you will have two entries present.
Changes and FixesThere are a number of small changes from user tickets. Read through the list below if you are looking for something specific.
DeriveParametersFixed an issue where calling DeriveParameters on a stored proc with no parameters would fail. The fix is to just return nothing since there are no parameters.
Corrupted Database DetectionFixed an issue where calling Pack or Repair on a corrupted database with an invalid header would get stuck in a loop attempting to fix the problem.
Added some better corrupt header detection routines to prevent random data from allocating large structures internally. If the data for the structures is out of the expected bounds an exception is throw that the headers could not be loaded and are corrupt. Same if a header with a pagesize outside allowable ranges is detected, it is reported as corrupt.
IF EXISTSFixed an issue with Return not aborting IF EXISTS block when used within a stored proc. The RETURN sql function will not short circuit no matter what the containing batch method is to always bubble the top of the call chain.
VistaDB ConnectionStringBuilderVistaDBConnectionStringBuilder has a number of small corrections to handle bad string lookup behavior. Both of these behaviors are present in SQL Server, but we were either throwing VistaDBExceptions, or ignoring the invalid data. The internal comparer has also now been changed to be case insensitive.
If an invalid keyword is assigned an ArgumentException.
VistaDBConnectionStringBuilder csb = new VistaDBConnectionStringBuilder(); csb["bad keyword"] = "Off"; // Keyword does not exist
If an invalid parameter is passed to a valid keyword a FormatException is now thrown to match SQL Server behavior.
VistaDBConnectionStringBuilder csb = new VistaDBConnectionStringBuilder(); csb["transaction mode"] = 12345; // Should be ON OFF or IGNORE
The above change to VistaDBConnectionStringBuilder also fixes a bug in the Visual Studio connection string advanced editor dialog. It was complaining about not accepting a string on TransactionMode before, but the actual problem is that Visual Studio calls with a bad value first, and is expecting a certain exception before it will call again with the correct value.
GetSchemaChanged the behavior of GetSchema( string, string[]) so that an empty or null string object is treated as the generic GetSchema() call and will retrieve the list of collections using the SCHEMA_METADATACOLLECTIONS enum.
sp_columns()sp_columns fails to parse with a missing expected symbol '('. The symbol can be present, but the parser is not reading the parameter correctly.
This happened in a few functions (sp_columns, sp_indexes, getviews and sp_foreignKey) that use a generic Enumerator<T> that has a yield. You cannot reset a yield statement, so internally when the function calls FirstRow and tries to go back to the start of the enumerator it failed.
This was changed in 4.x to a generic in order to strongly type some internal structures. This issue has been fixed by implementing a castable generic enumerator that knows how to cast from the generic interface type to a concrete class during enumeration.
Entity Framework SamplesTwo new Entity Framework sample applications are included. Learning EF has a huge learning curve. These two samples were built to demonstrate simple concepts with an EF provider.
C:\Users\Public\Documents\VistaDB\Samples\Entity Framework\
EFDataBindingSample - Shows how to data bind against an EF model
EFSampleCRUD - Example create, retrieve, update, delete commands against an EF model
LinkedIn .NET User Group Online Presentation Tomorrow
We will hold an online, free presentation showing what you can do with Gaia Ajax when building next generation web applications in a fast, lightfoot and intelligent way. Jan Blomquist will demonstrate the power of our latest 3.6 version and why abstracting away JavaScript and developing in a managed language is crucial for time-to-market.
5 winners will be chosen at random from the list of attendees. Each of them will win an annual subscription of Gaia Ajax (worth $595).
Wednesday March 10, 2010, 11:00AM (PST)
Get local time
Video of My Last Iteration Planning Meeting with CodePlex
Right before I left CodePlex, I filmed my last Iteration Planning Meeting with the team to give you a bird’s eye view into the day in the life of an Agile Program Manager. I did this because last year at the MVP 09 Summit, I invited MVPs to sit in on our IPM. They said they greatly enjoyed watching how we did agile, so I’ve always wanted to video on of our IPMs and put it on the web. Fortunately, I was able to film my last IPM. Better late than never!
The IPM is where we review the weekly work with the team and make any necessary adjustments. For this specific IPM, we were starting an I3 week, which means we reviewed the completed feature work of I2 and would only do bug fixes and other tweaks in I3. (See above link for explanation of I2 and I3 weeks).
I separated our IPM into two parts (videos below):
- Review of the work for the week – mostly bug fixes
- Review of work that was finished in the previous week – demos
This IPM occurred after the Mercurial deployment in preparation for the Sync’ing Source Code tab with Releases Tab deployment.
I had been wanting to do this sync’ing of change sets and releases tabs for literally years, so it was only fitting that i did it as my final deployment on the team. The idea behind this feature is that you will never again see “No Source Code” in the Source Code tab if the project owner checked his/her sources into the Releases tab. Instead, we carry over the source code from the Releases tab into the Source Code tab. (IMO, the Source Code tab should have always been Source Control *or* we force people to upload source code there, but I digress since this is a moot point now).
Part 1 – Review of work for I3 – In the video below, note we’re just doing bug fixes and tweaks. And note that we’re using the CodePlex software internally to keep track of our work items.
Part 2 – Review of completed work in I2 – Below we’re demo’ing to one another all the new work that would go out in this release, including the Sync’ing Release tab and Source Code tab and the new help page.
Enjoy! And Geaux Agile!
New Data Visualizations in SQL Server Reporting Services 2008 R2
Data Bars. Data bars, much like sparklines, are small charts typically found in the cells of a matrix or table. Instead of containing many values though, they usually contain one or just a few values. You can see an example in a portion of a report, provided below, that shows both sparklines and data bars in action.
Indicators. Indicators are small icons you can use to denote status or trends in your reports. While Report Builder 3.0 contains several pre-configured indicators, you can mix and match icons from different indicator sets to create your own unique sets. You can even provide your own images to be used as indicators! Indicators can also be embedded inside gauge report items.
Our team is really excited to bring you these new visualizations in the Reporting Services 2008 R2 release! We especially had a lot of fun testing these features. At one point, one of our team members even hooked up a GPS recording device as he drove around town just so he could upload the data into SQL Server as spatial data types and display his route on the map. As an unintended consequence (ok, maybe it was intentional), he was also able to calculate his speed along the route and display it using the color rule feature on the map. We’re not going to comment on what that map reveals =).
Let us know how you like the new data visualization features in 2008 R2. Send us your examples or your comments to the SSRS team or myself at www.twitter.com/SSRS and www.twitter.com/seanboon respectively. We also have a team blog with even more Reporting Services information.
Save a diagram to Image File
I’ve been asked a couple of times now about how to save one of our UML diagrams out to an image file. We don’t have a menu item that does that exact thing in the diagrams themselves. We of course support a select-all, copy, then paste which satisfies most, but a few customers have been asking how they can automate that process for documentation generation or what have you.
Turns out it is actually quite easy to write a simple extension to do exactly this.
Below is the code required to add a menu item that will appear as a context menu in any of the five UML diagrams shipping in VS2010 ( UML class, sequence, activity, component, and use case diagrams ).
The piece of “magic” in the code below is this line:
Diagram dslDiagram = Context.CurrentDiagram.GetObject<Diagram>();
You can ask an IDiagramContext to give you a Microsoft.VisualStudio.Modeling.Diagrams.Diagram object via the GetObject<>() method. For those of you familiar with the DSL programming model, this is indeed a DSL Diagram object, which gives you access to the public ( and documented ) DSL APIs that we have built the UML diagrams on.
We’ve tried to simplify the APIs needed to manipulate the UML object models, which is why we didn’t make the DSL underlying implementation more obvious.
Regardless, here’s the code needed to get a menu item called “Save To Image…” on your UML diagrams. Most of the code is manipulating the SaveFileDialog object. :)
This will work in the current RC build for VS2010.
Enjoy!
Cameron
using System;using System.Linq;
using System.ComponentModel.Composition;
using Microsoft.VisualStudio.ArchitectureTools.Extensibility.Presentation;
using Microsoft.VisualStudio.ArchitectureTools.Extensibility.Uml;
using Microsoft.VisualStudio.Modeling.ExtensionEnablement;
using Microsoft.VisualStudio.Uml.Classes;
using Microsoft.VisualStudio.Modeling.Diagrams;
using System.Drawing;
using System.Drawing.Imaging;
using System.Windows.Forms;
namespace SaveToImage
{
// Custom context menu command extension
// See http://msdn.microsoft.com/en-us/library/ee329481(VS.100).aspx
[Export( typeof( ICommandExtension ) )]
[ClassDesignerExtension] [UseCaseDesignerExtension]
[SequenceDesignerExtension]
[ComponentDesignerExtension]
[ActivityDesignerExtension]
class CommandExtension : ICommandExtension
{
[Import]
IDiagramContext Context { get; set; }
public void Execute( IMenuCommand command )
{
Diagram dslDiagram = Context.CurrentDiagram.GetObject<Diagram>();
if( dslDiagram != null )
{
SaveFileDialog dialog = new SaveFileDialog();
dialog.AddExtension = true;
dialog.DefaultExt = "image.bmp";
dialog.Filter = "Bitmap ( *.bmp )|*.bmp|JPEG File ( *.jpg )|*.jpg|Enhanced Metafile (*.emf )|*.emf|Portable Network Graphic ( *.png )|*.png";
dialog.FilterIndex = 1;
dialog.Title = "Save Diagram to Image";
if( dialog.ShowDialog() == DialogResult.OK && !string.IsNullOrEmpty( dialog.FileName))
{
Bitmap bitmap = dslDiagram.CreateBitmap( dslDiagram.NestedChildShapes, Diagram.CreateBitmapPreference.FavorClarityOverSmallSize );
bitmap.Save( dialog.FileName, GetImageType( dialog.FilterIndex ));
}
}
}
public void QueryStatus( IMenuCommand command )
{
if( Context.CurrentDiagram != null && Context.CurrentDiagram.ChildShapes.Count() > 0 )
{
command.Enabled = true;
}
else
{
command.Enabled = false;
}
}
public string Text
{
get { return "Save To Image…"; }
}
private ImageFormat GetImageType( int filterIndex )
{
ImageFormat result = ImageFormat.Bmp;
switch( filterIndex )
{
case 2:
result = ImageFormat.Jpeg;
break;
case 3:
result = ImageFormat.Emf;
break;
case 4:
result = ImageFormat.Png;
break;
}
return result;
}
}
}
FluentNHibernarte.Search 0.3 Beta Released Now Support Fluent XML-Less Configuration
Just released FluentNHibernate.Search 0.3 Beta which now support Fluent XML-Less Configuration available on CodePlex.
No need to configure NHibernate.Search in web.config or app.config, you can know configure it like FluentNHibernate do for NHibernate.
1: Configuration nhcfg = FluentSearch.Configure()
2: .DefaultAnalyzer().Standard()
3: .DirectoryProvider().FSDirectory()
4: .IndexBase("~/Index")
5: .IndexingStrategy().Event()
6: .MappingClass<SearchMappingImpl>()
7: .BuildConfiguration();
FHNS support both builtin Analyzers and Directory Providers :
Builtin Analyzers :
- StandardAnalyzer
- KeywordAnalyzer
- SimpleAnalyzer
- StopAnalyzer
- WhitespaceAnalyzer
1: // Some Builtin Analyzers
2: FluentSearch.Configure().DefaultAnalyzer().Standard()
3: FluentSearch.Configure().DefaultAnalyzer().Simple()
4: FluentSearch.Configure().DefaultAnalyzer().Whitespace()
5: ...
6:
7: // Custom Analyzers
8: FluentSearch.Configure().DefaultAnalyzer().Custom<MyAnalyzer>()
Builtin Directory Providers :
- FSDirectoryProvider
- RAMDirectoryProvider
1: // Builtin Directory Providers
2: FluentSearch.Configure().DirectoryProvider().FSDirectory()
3: FluentSearch.Configure().DirectoryProvider().RAMDirectory()
4: ...
5:
6: // Custom Directory Providers
7: FluentSearch.Configure().DirectoryProvider().Custom<MyDirectoryProvider>()
Working with FluentNHibernate for NHibernate Configuration ?
You can get FluentNHibernate.Search and FluentNHibernate in touch like this :
1: // FluentNHibernate.Search Configuration
2: var nhcfg = FluentSearch.Configure()
3: .DefaultAnalyzer().Standard()
4: .DirectoryProvider().FSDirectory()
5: .IndexBase("~/Index")
6: .IndexingStrategy().Event()
7: .MappingClass<SearchMappingImpl>()
8: .BuildConfiguration();
9:
10: // FluentNHibernate Configuration
11: var fcfg = Fluently.Configure(nhcfg);
12:
13: var sessionFactory = fcfg.Database(MsSqlConfiguration.MsSql2008.ConnectionString(_settings.ConnectionString)
14: .Cache(p => p.UseQueryCache().ProviderClass<SysCacheProvider>())
15: .Dialect<MsSql2008Dialect>().UseReflectionOptimizer()
16: .AdoNetBatchSize(50)
17: .ProxyFactoryFactory<ProxyFactoryFactory>())
18: .BuildSessionFactory();
19:
Beta 0.3 is available on CodePlex : http://fnhsearch.codeplex.com/
Have fun :)
Simplified INotifyPropertyChanged Implementation with WeakReference Support and Typed Property Access API
I've grown a bit tired of implementing INotifyPropertyChanged. I've tried ways to improve it before (like this "ViewModel" custom tool which even generates strong-typed event accessors).
But my fellow Clarius teammate Mariano thought it was overkill and didn't like that tool much. He mentioned an alternative approach also, which I didn't like too much because it relied on the consumer changing his typical interaction with the object events, but also because it has a substantial design flaw that causes handlers not to be called at all after a garbage collection happens. A very simple unit test will showcase this bug.
I also looked at the new WeakEvent Patterns page in MSDN but it's even worse in terms of implementing and exposing it to consumers.
So, with my ever growing love for lambdas and my strong-typed reflection approach (used by the first alternative too, btw), I thought I could do better :). Here's the result of that, which I think improves all the above choices.
Why you need weak reference supportThe importance of this cannot be understated. A delegate that you pass around has a strong reference to the instance that exposes it. This is the Target property on the delegate class. What this means is that even if the subscribing object goes out of scope and is ready to be collected, it will not be as long as the event source (the object exposing the PropertyChanged event, for example) holds a reference to it. And as long as the event subscription is there, the reference will be there too. That's why it is typically important to remove your reference once you're ready to "go" (i.e. on Dispose, you detach from the events you're listening). Needless to say, this is a repetitive, error-prone activity.
Another typical side-effect of this is that you cannot use anonymous delegates or lambdas if you need to unsubscribe, as you need to keep a reference to the originally subscribed lamdba in order to unsubscribe:
var target = new Foo(); target.PropertyChanged += (sender, args) => Console.WriteLine(args.PropertyName); // How do you unsubscribe now?? // This clearly doesn't work because even if the actual source is the same, // the delegate is still a brand-new one. target.PropertyChanged -= (sender, args) => Console.WriteLine(args.PropertyName); // So you need to keep the lambda around: PropertyChangedEventHandler handler = (sender, args) => Console.WriteLine(args.PropertyName); // Just so you can use that to subscribe/unsubscribe: target.PropertyChanged += handler; target.PropertyChanged -= handler; // So typically you're better off just adding a full instance method on your // consumer just so you have a clear pointer for unsubscribing: target.PropertyChanged += OnTargetPropertyChanged; // But now if you need contextual state in the event handler that exists // at subscription time, you need to promote that state to class fields // so that you can use that in the event handler this.someState = currentMethodState; // This is looking like .NET 1.0 already ;)The PropertyChangeManager way
I therefore decided to take a TDD approach to the issue with the following requirements:
- The programming model for consumers must not involve creating any new objects. They already have the object that will be raising property change events.
- The "old style" way of attaching to property changed events must still work, but add the weak reference support that's so badly needed. And this must be transparent to consumers.
- A new style should involve using lambdas to avoid property names as strings
- The new style should be trivial to implement for an author exposing INotifyPropertyChanged.
So I came up with these BDD-style test specifications:
- WhenSubscriberIsAlive_ThenNotifiesSubscriber
- WhenSubscriberIsNotAlive_ThenDoesNotNotifySubscriber
- WhenAddingPropertyChangedHandler_ThenNotifiesSubscriber
- WhenAddedPropertyChangedHandlerTargetIsNotAlive_ThenDoesNotNotify
- WhenRemovingPropertyChangedHandler_ThenDoesNotNotifySubscriberAnymore
These should cover all use cases.
Consuming PropertyChangeManager-enabled objectsThe fact that a given object is internally (remember requirement 1.) using this PropertyChangeManager is completely hidden from the consumer:
var source = new Foo();
source.SubscribeChanged(
x => x.Name,
foo => Console.WriteLine(foo.Name));
The first argument specifies which property you're interested in, and the second is an Action<Foo> in this case for the callback when the property changes. It can of course point to a class method:
source.SubscribeChanged(
x => x.Name,
this.OnRenamed);
Optionally, if unsubscribing from the event will be needed at some point, you can just keep a reference to the returned IDisposable object from the call to SubscribeChanged:
// this could be assigned to a field, for example.
IDisposable onRenameSubscription = source.SubscribeChanged(
x => x.Name,
foo => Console.WriteLine(foo.Name));
// at some later point (i.e. IDisposable.Dispose implementation of the consumer)
onRenameSubscription.Dispose();
// now the subscription is removed, even if I didn't keep the lambda around!
The source object still implements INotifyPropertyChanged, but now does so explicitly to support databinding infrastructure. The consumer can still cast the object to INotifyPropertyChanged if he wants to use the "unsafe" property name strings.
Implementing INotifyPropertyChanged with PropertyChangeManagerThe implementer defines a private field to hold a reference the manager:
public class Foo : INotifyPropertyChanged
{
private PropertyChangeManager<Foo> propertyChanges;
private string name;
private int value;
public Foo()
{
this.propertyChanges = new PropertyChangeManager<Foo>(this);
}
Note that the manager is generic and receives the type of the "change event source", in this case Foo.
Next, your properties need to be turned into "old-style" .NET properties with a backing field, because you need to add a call to the manager in the property setter:
public string Name
{
get { return name; }
set { name = value; this.propertyChanges.NotifyChanged(x => x.Name); }
}
Note that the call to the manager also leverages lambdas to avoid using strings.
In order to provide a custom implementation of the INotifyPropertyChanged.PropertyChanged event, you need to implement the interface explicitly and pass-through the implementation to the manager:
event PropertyChangedEventHandler INotifyPropertyChanged.PropertyChanged
{
add { this.propertyChanges.AddHandler(value); }
remove { this.propertyChanges.RemoveHandler(value); }
}
This is a restriction in the language, which prevents this event from being public. But it's not as bad as it sounds, as you want to encourage adoption of safer lambda-version subscription, which is the last bit to implement:
public IDisposable SubscribeChanged(Expression<Func<Foo, object>> propertyExpression, Action<Foo> callbackAction)
{
return this.propertyChanges.SubscribeChanged(propertyExpression, callbackAction);
}
How PropertyChangeManager works
The manager works by dismembering the received delegates into their actual target and method info, to be able to weakly reference the former, while remaining able to call the latter. It's a plain list internally, which is scavenged every time an action is performed in the manager (this could be optimized somehow to only happen on Notify, but it simplified the implementation a bit, and it's not like property change performance is a big issue in UIs anyway).
Here's the full source.
Some tooling such as a custom tool, item template, or code snippets would be nice, I'll try to provide those in the future.
Enjoy!
My First Week as a Developer Evangelist
I thought it would be fun to share what it was like my first week making the transition from Redmond to Silicon Valley in my new role. And more importantly, I thought it would be fun to explain publicly to my uncle back in Mississippi that my job isn’t to pray for the developers of the world. =D
Last weekend
I got off the plane from Seattle on Thursday afternoon, so Friday and Saturday I attended Dare2BeDigital with Lynn Langit and her crew from Southern California. (Yes, my new team put me right to work!)
Two cool things I learned from Dare2BeDigital were Small Basic and Scratch.
Small Basic is basically a super lightweight IDE, similar to Visual Studio but for kids. We coded against a Turtle object to make it move in certain directions and with certain colors, kinda like a glorified etch-a-sketch. This IDE even comes with its own IntelliSense.
Small Basic was one of the coolest things I’ve seen in quite some time, but then again I’m bias towards anything Visual Studio-like. Definitely check it out if you have kids at home.
.jpg)
Scratch is a programming environment where kids can drag and drop flow logic (instead of having to write the code themselves) to program an object (aka a “Sprite”) as shown below from their getting started guide. The default Sprite is the yellow cat you see below.
What really makes Scratch really cool is how many games/applications built with it are out there to explore and “remix” (as they say on the website), especially since the scripts for the games/apps are provided as the download.
Again, another “must check out” if you have kids at home.
I also got the chance to meet a lot of folks like Sunshine Mugrabi (we’re going to have lunch sometime), Van Riper (who is helping to organize CLS this year!!!), and Peter Kellner (a MVP who is giving me lots of cycling tips for the area), and Tammy Kellner (who got me animal balloons to make for the kids).
Sunday
I spent Sunday disconnected from work exploring Santa Cruz. It reminded me of home, minus the surfers and big waves and salsa dancers.
Monday
I had a house hunting trip to explore the areas I wanted to live in. The bad news was that I got food poisoning from lunch that day. The good news the food poisoning didn’t hit me until several hours after training at my new karate dojo that night.
Tuesday
I made it to the Microsoft Silicon Valley Campus for the first time. I had my Mid Year Career Discussion with my new manager that morning. It was kinda ironic to have a mid-year career discussion on your first day at the office (recall this was an internal transfer within Microsoft). But considering the mid-point is really to talk about career goals, it gave me a chance to explain to my new manager what I want to do when I grow up.
I met my officemate Joel who is focusing on startups in the area. And after a quick trip to San Jose Airport, I retrieved my lost reading glasses from the plane. (Thanks Alaska Air!) When I got back, Joel also gave me a tour of the campus. It was surreal to be on a very mini version of the Redmond campus that is warm and sunny in March. It was also surreal to see a Google security car driving down the street just a few blocks away.
Joel introduced me to the Hacker Dojo later that evening. It is a non-profit that runs a house for folks to go hang out and code, including free wifi and power. The organization runs purely on donations. There are lots of events that happen there. I was invited to an event upstairs, but considering the food poisoning event of the night before, I had to decline so I could go home and sleep.
And for the record, I’m okay with this being called a “Dojo” since it is a training facility. See! I’m not unreasonable! =D However, just be careful if you ask me if I’m going to the dojo tonight, because if you do not specify an adjective, I will default to my karate dojo.
Wednesday
Finally, after a full night’s sleep and my reading glasses with me, I had my first almost 9-5 day at the office (it was really a 9am-midnight day, but who is counting?) The morning was spent mostly responding to email from the past week. But I have to say, I’ve gone from 250 emails a day as Program Manager of CodePlex to less than 10 a day in my new role. But everyone around me keeps laughing, saying “Just give it time.”
I left the office at 4:15 to head to East Bay .NET, which is located in “East Bay” (and for the record I live and work in “South Bay”). This was my first experience with a GPS Navigation system. OMG, how have I been functioning all my life without one?!! Thank you Kenny (an Academic Evangelist for the area) for letting me borrow yours. I purchased my own GPS Navigation system this weekend. It has improved my quality of life by 10x, if not 100x.
I made it to East Bay .NET at 6:10pm, just a few minutes late. It was my first introduction to Silicon Valley rush hour. We had an insane about of famous geeks in that room, which included Beth Massi, Robin Shahan, Ward Bell, Kathleen Dollard, and Julie Lerman.
I had a great time meeting folks, like Peter Tweed and Deborah Kurata (who runs East Bay .NET).
I got home well after midnight.
Thursday
After working on some upcoming conference planning (OSBC, EclipseCon – I can’t believe i get to go to these conferences now as a part of my day job! I’m a very lucky and happy geek.), I spent the afternoon being tutored 1-1 on using Entity Framework and SQL Server. I have *a lot* of technologies to get ramped up on.
That afternoon, I was on a conference call with Jono Bacon planning the upcoming Community Leadership Summit in July the weekend before OSCON. (And yes, that’s me in the photo playing close attention =). I had a great time last year, so I leaped at the opportunity to help organize the event this year. And of course, since my life is the mathematical proof of Murphy’s law, my cell phone decides to stop working in the middle of the conference call. I’ve never had a BlackJack II stop playing audio while at the same time freeze the UI so I couldn’t hang up. I had to cold reboot the phone (yes, cold reboot as in removing the battery) to dial back. But, still no audio, so I picked up a landline phone. I was so embarrassed, but everyone on the call was cool with giving me a quick recap.
I was invited back to the Hacker Dojo for an Ignite get together, but I declined because I made a commitment to go to karate at least 2x a week. Not knowing too much about Ignite, I figured there would be other Ignite talks I could attend in the upcoming months. Nothing like trial and error first week on the job.
Friday
I got to work only to realize I left my power adapter in East Bay earlier in the week (an hour’s drive away, if not more). And since everything I own is in storage, including my 2 other spare power adapters, I once again conceded to Murphy’s law. Fortunately, the IT folks here had an extra power adapter to loan me for the day, so these guys here totally rock.
I spent the morning installing Visual Studio 2010 Release Candidate, but when I fired it up, I hit the rainbow bug.
I about had a heart attack. Fortunately, I guessed it was something to do with the VS color service, and then I realized I had been using the Color Theme extension for Beta 2. And sure enough, the extension’s blog post listed the workaround.
I spent the afternoon reading Professional ASP.NET MVC 1.0 (I figured I needed to start somewhere getting ramped up, instead of wasting time trying to figure out where to start.). I’m using VS 2008 to follow along step by step, which is really making me miss some of the new features in VS 2010.
Weekend
Considering I was practically gone the entire month of February, from leaving CodePlex, watching the Superbowl, celebrating Mardi Gras holidays back home, attending MVP Summit, and relocating to CA, I’m a bit behind where I want to be for my DevDays Netherlands talks at the end of the month. I need to write a completely new talk, so that’s my Sunday night project.
But, I made sure to spend all day Saturday and Sunday in the nice warm California sunshine. Natural skin tone, here I come!
FluentNHibernarte.Search 0.2 Beta Released
I’ve just released FluentNHibernate.Search 0.2 Beta which is available on CodePlex and support the following new features.
Field Mapping without specifying "Name"
Actually we needed to specify Field name using .Field(“FieldName”) :
1: public class BookSearchMap : DocumentMap<Book>
2: {
3: public BookSearchMap()
4: {
5: Id(p => p.BookId).Field("BookId").Bridge().Guid();
6: }
7: }
Now if we don’t specify this, the field name will be automaticaly taken from the mapped property name.
1: public class BookSearchMap : DocumentMap<Book>
2: {
3: public BookSearchMap()
4: {
5: Id(p => p.BookId).Bridge().Guid();
6: }
7: }
Id Mapping without specifiying "Field"
Actually to we needed to specify Field name using .Name(“FieldName”) for Field mapping, now we can forget this, it will be taken directly from the mapping property name.
However we can overrides that name using .Name(“FieldName”) method.
1: public class BookSearchMap : DocumentMap<Book>
2: {
3: public BookSearchMap()
4: {
5: Id(p => p.BookId).Bridge().Guid();
6: Name("Book");
7:
8: Map(x => x.Title)
9: .Store().Yes()
10: .Index().Tokenized();
11: Map(x => x.Description)
12: .Store().Yes()
13: .Index().Tokenized();
14: }
15: }
Embedded Mapping
FluentNHibernate.Search now support embedded mapping using the Embedded method in DocumentMap.
1: public class AuthorSearchMap : DocumentMap<Author>
2: {
3: public AuthorSearchMap()
4: {
5: Id(p => p.AuthorId)Bridge().Guid();
6: Name("Author");
7:
8: Map(x => x.Name)
9: .Store().Yes()
10: .Index().Tokenized();
11:
12: Embedded(x => x.Books).AsCollection();
13: }
14: }
Free Sandbox Hosting for Visual Studio 2010 RC and ASP.NET 4.0 RC from ORCS Web
ORCS Web has updated their Hosting Sandbox for Visual Studio 2010 RC and ASP.NET 4.0 RC.
To learn more about the new Web Deployment features in Visual Studio 2010 check out this Step by Step Walkthrough on Web 1-Click Publish with VS 2010
To provide feedback on the RC please visit the Visual Studio Connect site. You can also contact the Web Tooling team directly by sending mail to vsweb@microsoft.com
Ben Byrd | Visual Web Developer
Introducing FluentNhibernate.Search Mapping Interface
Coming back for a long time…
I announce today a new project i’ve hosted on CodePlex about NHibernate.Search, a Lucene.NET provider implementation for NHibernate which is a part of the NHibernate Contrib project.
Actually NHibernate.Search is attributes based mapping.
1: [Indexed]
2: public class Book
3: {
4: [DocumentId]
5: public Guid BookId { get; set; }
6:
7: [Field(Index=Index.Tokenized, Name="Title", Store=Store.Yes)]
8: public string Title { get; set; }
9:
10: [Field(Index = Index.Tokenized, Name = "Description", Store = Store.Yes)]
11: public string Description { get; set; }
12: }
In my recent projects I needed to keep my domain entites true POCO and persistant ignorant.
Since there was no Fluent inteface to map Lucene.NET documents without attributes outside domain entities, I decided to start this project which I hope should make us feel better :)
FluentNHibernate.Search mapping is quite equivalent to FluentNHibernate for NHibernate XML-Less entity mapping initialy developped by Jeremy Miller.
Mapping Lucene.NET documents are now very simple, attribute-less, here is a sample :
1: public class Book
2: {
3: public Guid BookId { get; set; }
4: public string Title { get; set; }
5: public string Description { get; set; }
6: }
Woow, that’s clean :)
And here is the mapping class :
1: public class BookSearchMap : DocumentMap<Book>
2: {
3: public BookSearchMap()
4: {
5: Id(p => p.BookId).Field("BookId").Bridge().Guid();
6: Name("Book");
7: Boost(500);
8: Analyzer<StandardAnalyzer>();
9:
10: Map(x => x.Title)
11: .Analyzer<StandardAnalyzer>()
12: .Boost(500);
13:
14: Map(x => x.Description)
15: .Boost(500)
16: .Name("Description")
17: .Store().Yes()
18: .Index().Tokenized();
19: }
20: }
Pretty nice isn’t it ? :)
FluentNHibernate.Search is still in developpement but I hope I will release a stable version soon.
Until a stable version be released you can check the current source code at CodePlex and give feedbacks !
Hotfix for “Issue with Auto-Generated Designer Files not Adding Controls”
A hotfix is now available for issues most commonly described as "Controls are not being recognized in the code-behind" and "Editing existing .aspx regenerates .aspx.designer.(cs), but most of the controls are now missing”. These issues were seen in Visual Studio 2010 RC release.
This hotfix can be downloaded from: http://connect.microsoft.com/VisualStudio/Downloads/DownloadDetails.aspx?DownloadID=27117
The update addresses the following Connect bugs:
- http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=532641: Cannot embed standard asp.net controls in Ajax Control Toolkit TabContainer
- http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=533071: Controls in CreateUserWizard WizardStep not visible as before
- http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=533302: issue with auto-generated Designer files not addding components
- http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=533945: Code Generation in 2010 RC doesn't work the same as 2008 for ASP.NET Application
- http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=534086: Editing existing .aspx regenerates designer.cs (good) but most of the controls are now missing (bad)
- http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=534340: ASP.NET designer fails to auto-generate fields
- http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=536000: Bug in generating the designer.cs file in VS2010 (Converting VS2008 project to VS2010)
If you continue to experience these types of issues after applying this fix; please let us know immediately. You can send these issues directly to the Web Development Tools team via a DL we have setup for direct feedback on anything web development related for this RC. The DL is: vsweb@microsoft.com.
We hope this helps,
- Mayuri Diwan and Nichole Baker
- Web Development Tools
Updated Data Model Designer Extension Starter Kit
The ADO.NET Entity Data Model Designer Extension Starter Kit has been updated to work with Visual Studio 2010 RC bits.
Get the latest version here: http://code.msdn.microsoft.com/DesignerExtStartKit.
- Julia Kornich,
Content Publisher, Entity Framework
How to set the startup program for debugging a project for the entire team
You surely have set the startup application for a project countless times:
But that setting goes your user options file, the rest of the team doesn't get to reuse the setting. And what if you repave your machine or start working on a new virtual machine and just got the sources from source control? You have to re-set this value again and again.
Turns out that this setting goes to a file named after your project file plus the ".user" extension. This file is just a fragment of an MSBuild file, and would look something like:
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
<StartAction>Program</StartAction>
<StartProgram>C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\devenv.exe</StartProgram>
<StartArguments>/rootSuffix Exp</StartArguments>
</PropertyGroup>
</Project>
And because this just plain MSBuild properties, you can copy the entire PropertyGroup to your main project file, delete this .user, and check-in your change. From now on, everyone on the team will have this setting enabled, and you will have it too if you get a clean environment eventually :)
Recent VS2010 “Visualization and Architecture” Webcast
I just recently presented a web cast that went quite well. Unfortunately, the resultant recording of that webcast has suffered from some quality issues. I’ll give you the various links to the webcast, but be forewarned, the audio link is probably your best best. Here are the links, which includes a link to the power point presentation that I presented:
- Steaming Video: http://academyliv.vo.msecnd.net/CAL/VIS19CAL/20100225-CAL-VIS19CAL-WMV.wmv
- Streaming Audio Only: http://academyliv.vo.msecnd.net/CAL/VIS19CAL/20100225-CAL-VIS19CAL-WMA.wma
- Download PDF: http://academyliv.vo.msecnd.net/CAL/VIS19CAL/20100225-CAL-VIS19CAL-PDF.pdf
- Download PowerPoint: http://academyliv.vo.msecnd.net/CAL/VIS19CAL/20100225-CAL-VIS19CAL-Deck.pptx
- Download WMV Video: mms://academyliv.wmod.msecnd.net/a10132/o5/CAL/20100225-CAL-VIS19CAL-WMV.wmv
Now I would like to address a few of the questions that were asked via the Live Meeting Q&A mechanism that. If you posted a question that you don’t see answered here, it was due to the fact that I didn’t understand what was being asked or it was one of the questions I answered verbally. If that is the case, please follow up with me directly.
Here are the questions / answers:
Q:Is the RC available for a trial download?
A: Absolutely, please follow this link.
Q: Can you provide a link to the Pet Shop solution you used?
A: Here ya go. Download the solution directly from here. There is an MSDN article that describes the solution more deeply here that I would recommend reading.
Q: What Version of Visual Studio 2010 has this architecture features?
A: Visual Studio 2010 Ultimate is where you can use these features to author new diagrams of all the types that you see here ( UML diagrams, Layer diagram, DGML documents ). However, you can view those diagrams in VS2010 Premium. It’s actually better than a read-only experience as you can change layout and change colors of elements etc., and save those changes. You just can’t add new modeling data or nodes.
Q: Is code generation supported?
A: Not in the RTM bits, but we will be releasing a PowerTool release shortly after launch that will enable that capability, plus a whole lot more. I will have a future post outlining more of the details here shortly.
Q: can you graph stored procedures or database objects?
A: I assume you mean in an ER-like notation? The simple answer is “No”. You could use UML and Profiles to represent database schema and procs, but most folks I know don’t like to do so. ;) So I’d point you back the database diagramming features that have been in VS for a long time now, as well as at the EDM designers if you are interested in generating an ORM above your database.
Q: Is there any way to integrate these layer-diagram analyziations with MS Build?
A: The layer validation capability is completely exposed through custom MSBuild tasks, so yes, this is completely doable. Please look at the Microsoft.VisualStudio.TeamArchitect.LayerDesigner.targets file located in %programfiles%\MSBuild\Microsoft\VisualStudio\v10.0\ArchitectureTools
Q: Are the new features described in "Understand the Code" available for native codes?
A: Not yet. That PowerTool I mentioned above will have the beginnings of the support, but we have more work to do on this front. Stay tuned! :)
Q: Is there a way to do layer validation at checkin time?
A: We aren’t shipping a checkin policy that does this, but this is absolutely doable given the fact that the analyzation process is exposed via custom MSBuild tasks. See above.
Q: What deployment requirements are required on the build server to add architecture validation?
A: Nothing. All the required bits are already there if you install the VS2010 version of Team Build.
Q: Is there any link from the UML diagrams to the actual classes in code?
A: Not at RTM, but again, this is something that will also be part of the PowerTool I mentioned above. Boy, I clearly need to get a post on the PowerTool done! :)
Q: Are there an Visual Studio 2010 SDK? How can i know all the points of extension has VS 2010?
A: Absolutely. See this post for more details. In addition, check out this MSDN topic for a comprehensive list of all the supported extensibility points for the new visualization and architecture tools in 2010.
Q: What version of the frameworks does the code understanding features support? 1.1?
A: Yes. If it is a managed assembly, we can visualize it.
Cheers!
Cameron
How to package and deploy COM component
I’ll use a walkthrough example to show how to package a web application with speech API COM component using Visual Studio 2010. I wrote and tested the sample in Win7 x86 with IIS7.5, and packaged and manually installed to win2k3 x86 IIS6 (which only had 3.5 framework installed).
1. Create a C# 3.5 web application
2. Add COM reference to “Microsoft Speech Object Library”
3. In Default.aspx, add the following between <div>
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:TextBox ID="TextBox1" runat="server" Width="274px">Welcome to web deployment</asp:TextBox>
<asp:Button ID="Button1" runat="server" onclick="Button1_Click"
Text="Play the text" />
<asp:PlaceHolder ID="PlaceHolder1" runat="server"></asp:PlaceHolder>
</ContentTemplate>
</asp:UpdatePanel>
4. In Default.aspx.cs, write the following:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using SpeechLib;
namespace WebApplication2
{
public partial class Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!String.IsNullOrEmpty(Request.Params["text"]))
{
Response.Buffer = false;
byte[] byteBuffer = MyTextToWav(Request.Params["text"]);
Response.Clear();
Response.ClearHeaders();
Response.ClearContent();
Response.AppendHeader("Content-Disposition", "attachment;filename=" + HttpUtility.UrlEncode(TextBox1.Text + ".wav", System.Text.Encoding.UTF8));
Response.ContentType = "audio/wav";
Response.BinaryWrite(byteBuffer);
Response.End();
}
}
private byte[] MyTextToWav(string inputText)
{
byte[] b = null;
{
SpMemoryStream spMemStream = new SpMemoryStream();
//default value is spMemStream.Format.Type = SpeechAudioFormatType.SAFT22kHz16BitMono;
SpeechLib.SpVoice ispvoice1 = new SpVoice();
ispvoice1.AudioOutputStream = spMemStream;
//Note, in IIS, the app pool has to be using LocalSystem to access speechLib COM
ispvoice1.Speak(inputText, SpeechVoiceSpeakFlags.SVSFDefault);
ispvoice1.WaitUntilDone(10000);
spMemStream.Seek(0, SpeechStreamSeekPositionType.SSSPTRelativeToStart);
byte[] buffer = (byte[])spMemStream.GetData();
using (System.IO.MemoryStream memoryStream = new System.IO.MemoryStream())
{
System.IO.BinaryWriter writer = new System.IO.BinaryWriter(memoryStream);
HeaderWrite(writer, false, 16, buffer.Length / 2, 22100); //Hack, only works if default as SAFT22kHz16BitMono
//HeaderWrite(writer, false, 16, buffer.Length / 2, 44100);
writer.Write(buffer);
b = memoryStream.GetBuffer();
}
}
return b;
}
private void HeaderWrite(System.IO.BinaryWriter writer, bool stereo, short bitsPerSample, int numberOfSamples, int sampleRate)
{
writer.Write(0x46464952); // "RIFF" in ASCII
writer.Write((int)(44 + (numberOfSamples * bitsPerSample * (stereo ? 2 : 1) / 8)) - 8);
writer.Write(0x45564157); // "WAVE" in ASCII
writer.Write(0x20746d66); // "fmt " in ASCII
writer.Write(16);
writer.Write((short)1);
writer.Write((short)(stereo ? 2 : 1));
writer.Write(sampleRate);
writer.Write(sampleRate * (stereo ? 2 : 1) * bitsPerSample / 8);
writer.Write((short)((stereo ? 2 : 1) * bitsPerSample / 8));
writer.Write(bitsPerSample);
writer.Write(0x61746164); // "data" in ASCII
writer.Write((int)(numberOfSamples * bitsPerSample * (stereo ? 2 : 1) / 8));
}
protected void Button1_Click(object sender, EventArgs e)
{
try
{
Response.Redirect(String.Format("Default.aspx?&text={0}", TextBox1.Text ));
}
catch (Exception ex)
{
PlaceHolder1.Controls.Add(new LiteralControl(ex.ToString()));
}
}
}
}
5. Ctrl-F5 and test, it should work fine with ASP.NET Development Server.
6. Right click the project name in solution explorer, and choose “Build Deployment Package”, it should build a debug package inside project’s obj\debug\package directory.
7. In a admin command prompt, we can go to that directory, and deploy the package locally to IIS by running “<ProjectName>.deploy.cmd /y”. Note, we can also publish it using publish dialog by using localhost as the service URL.
8. Since SpeechAPI does not work with IIS application pools that runs with “Network Service” or “ApplicationPoolIdentity”, we’ve to add a new 2.0 application pool, and set its identity to “LocalSystem”. Then set the deployed website’s application pool to use it. Test it out, it should work in IIS7 as well. (Security risk, make sure you change it back after demo.)
9. Let’s try to package and deploy to a win2k3 machine. To install the corresponding Speech API on the win2k3 machine, I can download/install Microsoft Speech SDK, or copy the corresponding speech API dll from my win7 machine and do regsvr32 on the machine. But for demonstrating purpose, I decide to use web deploy provider comObject32 to package the COM component along with my application, so that the package can be easily deployed to many win2k3 machines. We extend our project similarly to the one stated in the how to package registry blog. The extended projectName.wpp.targets file looks like following:
<!--******************************************************************** -->
<!-- Task CollectcomObjectForPackage -->
<!-- comObject32 Provider reference: http://technet.microsoft.com/en-us/library/dd569107(WS.10).aspx -->
<!-- comObject64 Provider reference: http://technet.microsoft.com/en-us/library/dd569022(WS.10).aspx -->
<!--********************************************************************-->
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<!--Targets get execute before this Target-->
<OnBeforeCollectcomObjectForPackage Condition="'$(OnBeforeCollectcomObjectForPackage)'==''">
</OnBeforeCollectcomObjectForPackage>
<!--Targets get execute after this Target-->
<OnAfterCollectcomObjectForPackage Condition="'$(OnAfterCollectcomObjectForPackage)'==''">
</OnAfterCollectcomObjectForPackage>
<CollectcomObjectForPackageDependsOn Condition="'$(CollectcomObjectForPackageDependsOn)'==''">
$(OnBeforeCollectcomObjectForPackage);
Build;
</CollectcomObjectForPackageDependsOn>
</PropertyGroup>
<PropertyGroup>
<IncludecomObjectForMyProject Condition="'$(IncludecomObjectForMyProject)'==''">False</IncludecomObjectForMyProject>
<MyComObject32s Condition="'$(MyComObject32s)'==''"></MyComObject32s>
<AfterAddContentPathToSourceManifest Condition="'$(AfterAddContentPathToSourceManifest)'==''">
$(AfterAddContentPathToSourceManifest);
CollectcomObjectForPackage;
</AfterAddContentPathToSourceManifest>
</PropertyGroup>
<ItemGroup>
<MycomObject Include = "$(MyComObject32s)"/>
</ItemGroup>
<Target Name="CollectcomObjectForPackage"
DependsOnTargets="$(CollectcomObjectForPackageDependsOn)"
Condition="$(IncludecomObjectForMyProject) AND '$(MyComObject32s)'!=''">
<Message Text="Adding %(MycomObject.Identity)" />
<ItemGroup>
<MsDeploySourceManifest Include="comObject32"
Condition="$(IncludecomObjectForMyProject)">
<Path>%(MycomObject.Identity)</Path>
</MsDeploySourceManifest>
</ItemGroup>
<CallTarget Targets="$(OnAfterCollectcomObjectForPackage)" RunEachTargetSeparately="false" />
</Target>
</Project>
10. On my sample win2k3 machine, I manually copied Windows\System32\Speech\Common\sapi.dll and did a registry export before and after regsvr32 it. It turns out we need to include many registry node for speech API COM component. I put it in the following package command line (really long). Run it, you get a package with the speech API COM component.
msbuild WebApplication5.csproj /target:package /p:IncludecomObjectForMyProject=True;MyComObject32s="SAPI.SpAudioFormat;SAPI.SpAudioFormat.1;SAPI.SpCompressedLexicon;SAPI.SpCompressedLexicon.1;SAPI.SpCustomStream;SAPI.SpCustomStream.1;SAPI.SpDataKey;SAPI.SpDataKey.1;SAPI.SpFileStream;SAPI.SpFileStream.1;SAPI.SpGramCompBackEnd;SAPI.SpGramCompBackEnd.1;SAPI.SpGrammarCompiler;SAPI.SpGrammarCompiler.1;SAPI.SpInProcRecoContext;SAPI.SpInProcRecoContext.1;SAPI.SpInprocRecognizer;SAPI.SpInprocRecognizer.1;SAPI.SpITNProcessor;SAPI.SpITNProcessor.1;SAPI.SpLexicon;SAPI.SpLexicon.1;SAPI.SpMemoryStream;SAPI.SpMemoryStream.1;SAPI.SpMMAudioEnum;SAPI.SpMMAudioEnum.1;SAPI.SpMMAudioIn;SAPI.SpMMAudioIn.1;SAPI.SpMMAudioOut;SAPI.SpMMAudioOut.1;SAPI.SPNotify;SAPI.SPNotify.1;SAPI.SpNotifyTranslator;SAPI.SpNotifyTranslator.1;SAPI.SpNullPhoneConverter;SAPI.SpNullPhoneConverter.1;SAPI.SpObjectToken;SAPI.SpObjectToken.1;SAPI.SpObjectTokenCategory;SAPI.SpObjectTokenCategory.1;SAPI.SpObjectTokenEnum;SAPI.SpObjectTokenEnum.1;SAPI.SpPhoneConverter;SAPI.SpPhoneConverter.1;SAPI.SpPhrase;SAPI.SpPhrase.1;SAPI.SpPhraseBuilder;SAPI.SpPhraseBuilder.1;SAPI.SpPhraseInfoBuilder;SAPI.SpPhraseInfoBuilder.1;SAPI.SpResourceManager;SAPI.SpResourceManager.1;SAPI.SpSharedRecoContext;SAPI.SpSharedRecoContext.1;SAPI.SpSharedRecognizer;SAPI.SpSharedRecognizer.1;SAPI.SpShortcut;SAPI.SpShortcut.1;SAPI.SpStream;SAPI.SpStream.1;SAPI.SpStreamFormatConverter;SAPI.SpStreamFormatConverter.1;SAPI.SpTextSelectionInformation;SAPI.SpTextSelectionInformation.1;SAPI.SpUncompressedLexicon;SAPI.SpUncompressedLexicon.1;SAPI.SpVoice;SAPI.SpVoice.1;SAPI.SpWaveFormatEx;SAPI.SpWaveFormatEx.1;SAPIEngine.TTSEngine;SAPIEngine.TTSEngine.1;{1B2AFB92-0B5E-4A30-B5CC-353DB4F9E150};{1B57B2A1-E763-4676-9064-297F1B413632};{2D12DD17-6C4E-456E-A953-D210E3C64176};{4C6F940C-3CFE-11D2-9EE7-00C04F797396};{4F414126-DFE3-4629-99EE-797978317EAD};{9CDAEA40-A7D3-4CC5-AED0-B5E35AD0F169};{C02F29F0-DFCA-4DC1-8B80-ED3216E1B5E0};{CA0AC604-8EF2-448A-AE97-62A2C2CC3C46};{D2C13906-51EF-454E-BC67-A52475FF074C};{D36D2090-4DF3-4BD4-A22F-0D91975F7964};{D6AD10F3-70AB-41E1-96B3-4C36E35D333C};{DC626A64-D684-4627-83CB-44420ABDBD1A};{F3D3F924-11FC-11D3-BB97-00C04F8EE6C0}"
11. copy the package and deploy command file to win2k3 x86 machine with IIS6, using “<ProjectName>.deploy.cmd /y” from command line.
12. In IIS Manager, make sure the new deployed website is running with asp.net 2.0. Create a new application pool and change its Identity to “Local System” (Security risk, make sure you change it back after demo). Assign the deployed website to use this application pool. Test it out, it should work.
Note, for IIS7 to IIS7 package and deployment, we can include the application pool setting so that when deploy, a new application pool will be created (or existing be overwritten if app pool name already exists) and “Local System” is granted as identity. (VS2010 beta1 version’s topic is in http://blogs.msdn.com/webdevtools/archive/2009/02/09/web-packaging-creating-a-web-package-using-vs-2010.aspx , the UI has changed a bit, but still the same mostly.)
Xinyang Qiu | Visual Web Developer
How to install Reactive Extensions for .NET 4.0 Beta 2 on VS2010 RC
- Get the .NET 4.0 Beta 2 download from MSDN.
- Open the downloaded .exe with 7zip (i.e. right-click on file, select 7-Zip > Open Archive)
- Navigate to the .rsrc\RCDATA\ "folder" and open the CABINET file:
- Extract the contained MSI, install and enjoy!
I thought I'd need to crack the MSI open with the good old Orca tool, but turns out I didn't have to!
Stay tuned, my Reactive Framework Extensions Generator will be soon updated to RC too :)
Enjoy!
How to quickly setup the best free Diff/Merge tool with VS 2010
First go get the tool. It's free and it rocks.
Next, save this XML to a file with a .vssettings extension:
<UserSettings>
<ApplicationIdentity version="10.0"/>
<Category name="Source Control_TeamFoundation" Category="{2A718788-A6D9-44C5-90EF-438BF5B06A74}" Package="{4CA58AB2-18FA-4F8D-95D4-32DDF27D184C}" RegisteredName="Source Control_TeamFoundation" PackageName="Microsoft.VisualStudio.TeamFoundation.VersionControl.HatPackage, Microsoft.VisualStudio.TeamFoundation.VersionControl, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<PropertyValue name="UserTool1" extension=".*" operation="Compare" command="C:\Program Files (x86)\SourceGear\DiffMerge\DiffMerge.exe" arguments="/title1=%6 /title2=%7 %1 %2"/>
<PropertyValue name="UserTool2" extension=".*" operation="Merge" command="C:\Program Files (x86)\SourceGear\DiffMerge\DiffMerge.exe" arguments="/title1=%6 /title2=%8 /title3=%7 /result=%4 %1 %3 %2"/>
</Category>
</UserSettings>
Finally, go to Tools > Import and Export Settings in VS and import that file by clicking Browse on the third and final page.
What this does is set the great SourceGear DiffMerge tool as the diff and merge tool to use for all your files. I find it much more usable and smart than the built-in TFS one.
For the ultimate collection of settings for diff/merge tools in VS, see James' blog post.
Enjoy.
Do You Know Your Data? Test Yourself with the SQL Server Sequence
In anticipation of our upcoming R2 launch, we’re holding a contest to test your knowledge of SQL Server and give away some great prizes in the process. For the next 12 weeks, we’ll be issuing a new question per week on one of our three social networks: Facebook, Twitter, and YouTube.
Answer a question correctly and you’ll be placed into a drawing to win a brand new netbook. (If you get stuck on any of the questions, check out the SQL Server website to jog your memory.) There’s a new chance to win each week, and the more questions you answer correctly, the better
your chances will be to win the grand prize – a Suped-up Set-up for your workspace from SQL Server. The grand prize includes a wireless keyboard and mouse, 24-inch HD monitor, speakers and noise canceling headphones all valued at over $1000.
Become a fan of the SQL Server on your favorite social network to find out the location of each week’s question. Come back to the SQL Server blog for the answers to each week’s question, as well as updates on winners and prizes.
Between taking your best guess and finding out if you’re a winner, be sure to visit the SQL Server website to download SQL Server 2008 R2 CTP and find out more about the upcoming release. You can also drop by the Facebook page and let us know your experience with SQL Server.
This week’s question can be found on YouTube at the following link:
Just leave your guess as a comment of the video question to be entered for this week's challenge.
Remember to get your answers in by 11:59 on Monday, March 15. We’ll choose a winner and post a new question every Tuesday.Previous Questions:
Question #1 - What are the four new types of data visualization provided in SQL Server Reporting Services 2008 R2 ?
Answer # 1 - Maps, Sparklines, Data bars, Indicators
Stay tuned for more questions and be sure to check out the official rules.

![clip_image002[4] clip_image002[4]](http://blogs.technet.com/blogfiles/dataplatforminsider/WindowsLiveWriter/NewDataVisualizationsinSQLServerReportin_9FDE/clip_image002%5B4%5D_45d4b626-2626-43af-a7f7-c9f14a8b2f63.gif)