共用方式為


Refactoring Work in Orcas March CTP [Jesse Kaplan]

We've had a few questions internally and externally from people who were having problems running some of our earlier samples on the March CTP so I wanted to give everyone a heads up on what has changed and how to move forward any sample code you may have downloaded/written against previous CTPs.

The biggest change we made was to move all of our code out of System.Core and into System.Addin.dll. All you need to do to fix this is to add a reference to that assembly in your projects. One thing to note is that, in this CTP, the setup work for the new System.AddIn.dll is not complete and while it shows up in the framework directory and the GAC it will not be in the prepopulated list of .Net references in VS: you will instead need to manually browse to the 3.5 framework directory and add a dependecy to the 3.5 version of System.AddIn.dll there.

The other change we made was to move the AddInContractAttribute class away from the other attributes and into the System.AddIn.Contract assembly. This way you can build contract assemblies that are not dependent on a specific version of the System.AddIn assembly.

 Attached to this post is a sample from our 2nd MSDN magazine article updated to reflect these changes. The sample we included in the adapters post last week is already updated to work on the March CTP.

ExtensibleCalculator V2.zip

Comments

  • Anonymous
    March 27, 2007
    Unfortunately I can't compile the example with the Orcas March CTP. I get "The type or namespace name 'Pipeline' does not exist in the namespace 'System.AddIn' (are you missing an assembly reference?"The error is on ICalculatorContract2.cs
  • Anonymous
    March 29, 2007
    The problem is that the reference that is registered on the Visual Studio Orcas (C:Program FilesMicrosoft Visual Studio 9.0Common7IDEPublicAssemblies) is pointing to the previos version - the assemblies are the old one.To get the sample working you need to remove the this references and add new ones that are pointing to C:WINDOWSMicrosoft.NETFrameworkv3.5.20209 ones.Alternatively you could replace the Visual Studio ones with these in the Framework directory.
  • Anonymous
    July 03, 2007
    Hi,I just tried multiprocess activation and it works fine.I was wondering if you are going to support Async calls to Addins, in order to avoid to block the calling application.ThanksClaudio