-
Notifications
You must be signed in to change notification settings - Fork 119
ProGuide NET 8 Upgrade
Language: C#
Subject: Framework
Contributor: ArcGIS Pro SDK Team <[email protected]>
Organization: Esri, http://www.esri.com
Date: 10/06/2024
ArcGIS Pro: 3.4
Visual Studio: 2022
- Overview
- Migrating from .NET 6 to .NET 8
- Migrating from .NET Framework to .NET 8
- Developing new Add-ins for 3.3 and newer releases
At release 3.3, ArcGIS Pro moved to .NET 8, Microsoft's latest version of .NET (formerly known as ".NET Core") with Long Term Support, LTS.
- This is not a breaking change.
- There are no changes to Pro APIs that require re-compilation
- Addins deployed on ArcGIS Pro 3.0 - 3.2 will run on 3.3 and newer 3.x releases without re-compilation.
For your ArcGIS Pro SDK .NET development going forward at 3.3+, to re-compile an addin that was built on 3.0 through 3.2 against Pro 3.3+, please consult the following migration procedure. It generally applies to all .NET 6 Pro SDK 3.0 to 3.2 development projects even though only "addins" are specifically mentioned.
Assuming that Pro 3.3+ has been installed...
- Upgrade your Visual Studio 2022 to version 17.8 or better (please refer to ArcGIS Pro SDK requirements). Ensure that you install .NET 8 as part of the Visual Studio update process.
- Change the target framework in your existing Visual Studio 2022 project to .NET 8
- Open the Config.daml file and change the desktopVersion attribute on the AddInInfo tag to 3.3
- If your project is using the Pro SDK "Esri.ArcGISPro.Extensions" NuGet package, upgrade it to version 3.3 or better. If you get a
NU1202 Package Esri.ArcGISPro.Extensions30 3.3.0.52579 is not compatible with net6.0-windows7.0
error, it means you forgot to change your target framework to .NET 8 first. - If you are using the Microsoft.Windows.Compatibility Nuget, update it to version 8.0.3 or better.
- If your project is using any other NuGet packages, ensure they are compatible with .NET 8. Update as needed.
- If needed, run the "Fix Pro References" Pro SDK tool on your addin.
- Recompile.
Note: if you see errors similar to the following:
Error CS1705
Assembly 'ArcGIS.Desktop.Framework' with identity 'ArcGIS.Desktop.Framework, Version=13.3.0.0, Culture=neutral,
PublicKeyToken=8fc3cc631e44ad86' uses 'System.Runtime, Version=8.0.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a' which has a higher version than referenced assembly 'System.Runtime'
with identity 'System.Runtime, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
"YourProjectName here" ...
You have forgotten to change the target framework of your project from .NET 6 to .NET 8. You may also see an error similar to the following, especially if you are re-compiling a CoreHost console .exe:
Error NETSDK1083
The specified RuntimeIdentifier `win10-x64` is not recognized. See https://aka.ms/netsdk1083 for more information.
Open your .csproj and ensure the following lines show the correct content. Change as needed:
<TargetFramework>net8.0-windows</TargetFramework>
<!--RuntimeIdentifier>win10-x64</RuntimeIdentifier --><!-- old - note win"10"-x64 -->
<RuntimeIdentifier>win-x64</RuntimeIdentifier><!-- new - "win10-x64" was changed to "win-x64" -->
For more information consult NETSDK1083: The specified RuntimeIdentifier is not recognized
If you have an addin created using version 2.x and the .NET Framework, you will need to follow the procedure in the ProConcepts 3.0 Migration Guide to convert your project to Pro 3.x and .NET 6 first. Moving from 2.x to 3.x is a breaking change. With your add-in converted to a 3.x addin, follow the procedure above, as necessary, to re-compile on Pro 3.3+ and .NET 8.
- Upgrade Visual Studio 2022 to 17.8 at a minimum and make sure that .NET 8 is included (please refer to ArcGIS Pro SDK requirements).
- Upgrade your Pro and Pro SDK versions to 3.3+
- Create a new ArcGIS Pro SDK project in Visual Studio 2022 using the appropriate Pro SDK project template.
Home | API Reference | Requirements | Download | Samples
- Overview of the ArcGIS Pro SDK
- What's New for Developers at 3.4
- Installing ArcGIS Pro SDK for .NET
- Release notes
- Resources
- Pro SDK Videos
- ProSnippets
- ArcGIS Pro API
- ProGuide: ArcGIS Pro Extensions NuGet
Migration
- ProSnippets: Framework
- ProSnippets: DAML
- ProConcepts: Framework
- ProConcepts: Asynchronous Programming in ArcGIS Pro
- ProConcepts: Advanced topics
- ProGuide: Custom settings
- ProGuide: Command line switches for ArcGISPro.exe
- ProGuide: Reusing ArcGIS Pro Commands
- ProGuide: Licensing
- ProGuide: Digital signatures
- ProGuide: Command Search
- ProGuide: Keyboard shortcuts
Add-ins
- ProGuide: Installation and Upgrade
- ProGuide: Your first add-in
- ProGuide: ArcGIS AllSource Project Template
- ProConcepts: Localization
- ProGuide: Content and Image Resources
- ProGuide: Embedding Toolboxes
- ProGuide: Diagnosing ArcGIS Pro Add-ins
- ProGuide: Regression Testing
Configurations
Customization
- ProGuide: The Ribbon, Tabs and Groups
- ProGuide: Buttons
- ProGuide: Label Controls
- ProGuide: Checkboxes
- ProGuide: Edit Boxes
- ProGuide: Combo Boxes
- ProGuide: Context Menus
- ProGuide: Palettes and Split Buttons
- ProGuide: Galleries
- ProGuide: Dockpanes
- ProGuide: Code Your Own States and Conditions
Styling
- ProSnippets: Content
- ProSnippets: Browse Dialog Filters
- ProConcepts: Project Content and Items
- ProConcepts: Custom Items
- ProGuide: Custom Items
- ProGuide: Custom browse dialog filters
- ArcGIS Pro TypeID Reference
- ProSnippets: Editing
- ProConcepts: Editing
- ProConcepts: COGO
- ProConcepts: Annotation Editing
- ProConcepts: Dimension Editing
- ProGuide: Editing Tool
- ProGuide: Sketch Tool With Halo
- ProGuide: Construction Tools with Options
- ProGuide: Annotation Construction Tools
- ProGuide: Annotation Editing Tools
- ProGuide: Knowledge Graph Construction Tools
- ProGuide: Templates
3D Analyst Data
Plugin Datasources
Topology
Linear Referencing
Object Model Diagram
- ProSnippets: Geometry
- ProSnippets: Geometry Engine
- ProConcepts: Geometry
- ProConcepts: Multipatches
- ProGuide: Building Multipatches
Relational Operations
- ProSnippets: Knowledge Graph
- ProConcepts: Knowledge Graph
- ProGuide: Knowledge Graph Construction Tools
Reports
- ProSnippets: Map Authoring
- ProSnippets: Annotation
- ProSnippets: Charts
- ProSnippets: Labeling
- ProSnippets: Renderers
- ProSnippets: Symbology
- ProSnippets: Text Symbols
- ProConcepts: Map Authoring
- ProConcepts: Annotation
- ProConcepts: Dimensions
- ProGuide: Tray buttons
- ProGuide: Custom Dictionary Style
- ProGuide: Geocoding
3D Analyst
CIM
Graphics
Scene
Stream
Voxel
- ProSnippets: Map Exploration
- ProSnippets: Custom Pane with Contents
- ProConcepts: Map Exploration
- ProGuide: Map Pane Impersonation
- ProGuide: TableControl
Map Tools
- ProGuide: Feature Selection
- ProGuide: Identify
- ProGuide: MapView Interaction
- ProGuide: Embeddable Controls
- ProGuide: Custom Pop-ups
- ProGuide: Dynamic Pop-up Menu
Network Diagrams
- ArcGIS Pro API Reference Guide
- ArcGIS Pro SDK (pro.arcgis.com)
- arcgis-pro-sdk-community-samples
- ArcGISPro Registry Keys
- ArcGIS Pro DAML ID Reference
- ArcGIS Pro Icon Reference
- ArcGIS Pro TypeID Reference
- ProConcepts: Distributing Add-Ins Online
- ProConcepts: Migrating to ArcGIS Pro
- FAQ
- Archived ArcGIS Pro API Reference Guides
- Dev Summit Tech Sessions