The new release of ArcGIS Explorer (build 1500) SDK for the Microsoft .NET Framework adds support for Visual Studio 2010, including the free Visual C# and Visual Basic Express editions.

For ArcGIS Explorer development, you will use the multi-targeting (compiling for a specific version of the .NET framework) functionality in Visual Studio to target .NET Framework 3.5; this is the version supported for Explorer add-ins, and is required by the application and API.

Add-in projects created by the Visual Studio Tools for ArcGIS Explorer will target 3.5, regardless of the framework chosen in the New Project wizard.

Add-ins that target.NET Framework 4.0

One of the features introduced in Visual Studio 2010 is support for targeting the.NET Framework 4.0, which includes a new Common Language Runtime (CLR).

Add-ins which target framework 4.0 cannot be loaded by the CLR which Explorer uses by default, and so Esri does not support development with .NET 4.0 for ArcGIS Explorer. However, if you do need to make use of framework 4.0, it is possible to configure Explorer to load both 3.5 and 4.0 frameworks side by side.

First, you must make changes to the application configuration file of the ArcGIS Explorer application to force it to load with the CLR and Framework version 4.0; see Scenario 3 in this MSDN article http://msdn.microsoft.com/en-us/library/ee518876.aspx. This change is necessary because if framework 3.5 is loaded first, the application cannot then load framework 4.0. Next, change your add-in project to target framework 4.0, by setting the Target Framework in Project Properties.

 

Now compile your add-in and start ArcGIS Explorer; both framework 3.5 and 4.0 will now load side-by-side in the application.

Remember this is not a supported configuration; incompatibilities in between the frameworks and the Common Language Runtime (CLR) versions may cause errors, you should only attempt these steps if you intent to fully test and certify your add-in and support your users with this unofficial configuration.

You can read more about Version Compatibility in the .NET Framework in this MSDN article: http://msdn.microsoft.com/en-us/library/ff602939.aspx.

You can also refer to MSDN for full information about application configuration files and their contents, at http://msdn.microsoft.com/en-us/library/bbx34a2h.aspx.


Upgrading existing 1200 add-in solutions from Visual Studio 2008 to 2010

You can open existing add-in solutions in Visual Studio 2010, which will trigger the integrated upgrade wizard to upgrade the solution (note that this is a one-way process, it cannot be opened in Visual Studio 2008 any longer).

 

If you upgrade a project created with ArcGIS Explorer 1500, you should find your add-in works with no manual changes required. Alternatively, you can create a new add-in from scratch in Visual Studio 2010 using the New Project templates there.

However, it’s more likely that an existing add-in project will have been created with 1200 – in this case, you may find the add-in fails to load in Explorer once upgraded to Visual Studio 2010, with a message indicating "This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded."

This is because the upgrade wizard does not deal correctly with project files that were created initially using ArcGIS Explorer 1200, resulting in an add-in that targets framework  4.0. As mentioned in the section above, add-ins targeting framework 4.0 cannot be loaded by the runtime which Explorer uses by default, and so the Add-Ins error handler prompts you to remove this add-in.

If you find this error from an upgraded add-in, and did not intend to target framework 4.0, you can correct it with a simple edit to the project file before you perform the upgrade; full details can be found in Knowledge Base article 38236.

(Shelly Gill, ArcGIS .NET API Product Engineer)