Skip to content

Compilation error when multidimensional array is defined #629

Closed
nanoframework/metadata-processor
#109
@alexxxz1977

Description

@alexxxz1977

Details about Problem

nanoFramework area: C# code
VS version: 2019
VS extension version: 2019.2.0.17

Target: ESP32-WROOM_32
Device capabilities output:

Description

I've tried to define a matrix as int[,] arr = new int[10,10] and got a strange error during compilation.
Severity Code Description Project File Line Suppression State
Error Exception minimizing assembly: Value cannot be null.
Parameter name: key. NFApp1 C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\nanoFramework\v1.0\NFProjectSystem.MDP.targets 223

If I remove this line from the code, the compilation process and deployment are going fine. It is easy to reproduce this bug - just create a blank project and try to define an array with more than one dimension.

Detailed repro steps so we can see the same problem

  1. Create a blank solution
  2. Define an array as int[,] arr = new int[10,10]
  3. Compile

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions