Working with ArcGIS Runtime SDK for .NET in Visual Studio 2010 - is it possible?

5737
6
Jump to solution
01-28-2016 07:25 AM
AnatoliiTerentiev
Occasional Contributor III

Dear Gurus!

For some reason I'm working with VS 2010. But ArcGIS Runtime SDK for .NET don't work with VS 2010.

I get basic developer account, but when try to use it

            ArcGISRuntime.SetLicense("myLicenseString");
            ArcGISRuntime.Initialize();

- get error "Invalid basic license". What to do?

I would like along with working some online service , such as OpenStreetMap,  to work with local feature layers or shape files. So I'm trying to understand - is it possible to find a free way of using for this purpose an ArcGIS Runtime SDK for .NET or try to find other ways. For example to use arcgis API for WPF and  try to find class library to work with shape files.  Or go to SharpGis, I can't  buy anything until I do something, unfortunately

0 Kudos
1 Solution

Accepted Solutions
FreddieGibson
Occasional Contributor III

.NET Runtime requires a minimum of the 4.5 version of the .NET Framework. This would require that you utilize a version of Visual Studio that supports this framework. I believe that Visual Studio 2010 only allows you to use up to .NET 4.0.

You can see the supported versions of Visual Studio on the following page.

System requirements—ArcGIS Runtime SDK for .NET | ArcGIS for Developers

In regards to the licensing, I believe that you may be looking at an older version of the licensing model. In Runtime .NET your licensing code should appear as follows:

// Deployed applications must be licensed at the Basic level or greater (https://developers.arcgis.com/licensing).
// To enable Basic level functionality set the Client ID property before initializing the ArcGIS Runtime.
ArcGISRuntimeEnvironment.ClientId = "<Your Client ID>";


// Initialize the ArcGIS Runtime before any components are created.
ArcGISRuntimeEnvironment.Initialize();


// Standard level functionality can be enabled once the ArcGIS Runtime is initialized.                
// To enable Standard level functionality you must either:
// 1. Allow the app user to authenticate with ArcGIS Online or Portal for ArcGIS then call the set license method with their license info.
// ArcGISRuntimeEnvironment.License.SetLicense(LicenseInfo object returned from an ArcGIS Portal instance)
// 2. Call the set license method with a license string obtained from Esri Customer Service or your local Esri distributor.
// ArcGISRuntimeEnvironment.License.SetLicense("<Your License String or Strings (extensions) Here>");

With a basic license you would be able to view shapefiles and access services. To use local feature layers or local services you'd be require to purchase a standard license.

View solution in original post

6 Replies
FreddieGibson
Occasional Contributor III

.NET Runtime requires a minimum of the 4.5 version of the .NET Framework. This would require that you utilize a version of Visual Studio that supports this framework. I believe that Visual Studio 2010 only allows you to use up to .NET 4.0.

You can see the supported versions of Visual Studio on the following page.

System requirements—ArcGIS Runtime SDK for .NET | ArcGIS for Developers

In regards to the licensing, I believe that you may be looking at an older version of the licensing model. In Runtime .NET your licensing code should appear as follows:

// Deployed applications must be licensed at the Basic level or greater (https://developers.arcgis.com/licensing).
// To enable Basic level functionality set the Client ID property before initializing the ArcGIS Runtime.
ArcGISRuntimeEnvironment.ClientId = "<Your Client ID>";


// Initialize the ArcGIS Runtime before any components are created.
ArcGISRuntimeEnvironment.Initialize();


// Standard level functionality can be enabled once the ArcGIS Runtime is initialized.                
// To enable Standard level functionality you must either:
// 1. Allow the app user to authenticate with ArcGIS Online or Portal for ArcGIS then call the set license method with their license info.
// ArcGISRuntimeEnvironment.License.SetLicense(LicenseInfo object returned from an ArcGIS Portal instance)
// 2. Call the set license method with a license string obtained from Esri Customer Service or your local Esri distributor.
// ArcGISRuntimeEnvironment.License.SetLicense("<Your License String or Strings (extensions) Here>");

With a basic license you would be able to view shapefiles and access services. To use local feature layers or local services you'd be require to purchase a standard license.

AnatoliiTerentiev
Occasional Contributor III

Do I understand correctly that at the present time, working under the VS 2010, I can not use Runtime for WPF and now the only correct way is to work with Runtime .NET  in VS 2012?

0 Kudos
MichaelBranscomb
Esri Frequent Contributor

Hi,

The WPF SDK was supported with VS2010 (ArcGIS Runtime SDK for WPF). But that SDK is in the 'Mature' support phase (no further release, hotfixes or patches) and is due to be retired in July 2016.

I hope your version of Visual Studio will not dictate the ArcGIS Runtime SDK you choose and that you will proceed with the ArcGIS Runtime SDK for .NET. Note that we support the free Express and Community versions of Visual Studio 2013 with the current 10.2.6 and plan to add support for VS2015 (including Express and Community) in the next release.

Cheers

Mike

0 Kudos
AnatoliiTerentiev
Occasional Contributor III

     I work with Visual Studion 2015, there is no problem. But when I was working with silverlight project in VS 2012,  sometimes the studio was working very slowly. For some projects to work with VS 2010 is more comfortable and there was hope among developers that 2010 will support .net 4.5.

    The problem is that I can't to buy standart license of runtime .net now. I'm trying to understand if I can work in the VS 2010  with the runtime WPF and the basic license. The question is what I am doing wrong?

0 Kudos
MichaelBranscomb
Esri Frequent Contributor

Hi,

Note the .NET SDK has a Basic license level and that you can license at the standard level with an ArcGIS named user: License your app—ArcGIS Runtime SDK for .NET | ArcGIS for Developers

Cheers

Mike

0 Kudos
AnatoliiTerentiev
Occasional Contributor III

Thank you very mach, Mike! Of course, I've seen this. The question concerned to vs 2010 and runtime wpf. If you think this question wrong, you can take it off, I am sorry

0 Kudos