Skip to content

Error adding file resources in Visual Studio #470

Closed
nanoframework/nf-Visual-Studio-extension
#402
@dlkay0

Description

@dlkay0

Details about Problem

The nanoFramework ResX editor behaves incorrectly when adding resources. The normal ResX editor handles these cases fine.

nanoFramework area: Visual Studio extension
VS version: 15.9.10
VS extension version: 1.0.3.92

Detailed repro steps so we can see the same problem

Scenario A - VS Exception

  1. Place a binary file in your project's folder
  2. Add a nanoFramework Resource file to your project
  3. Click Add Resource --> Add Existing File...
  4. Choose the file you placed into your project's folder and click OK
  5. Observe Exception and selected file is added to your project as an embedded resource but not in the ResX file.
    image

Scenario B - Destination File Exists

  1. Place a binary file in your solution's folder
  2. Add a nanoFramework Resource file to your project
  3. Click Add Resource --> Add Existing File...
  4. Choose the file you placed into your project's folder and click OK
  5. Observe your file is embedded under a new Resources folder
  6. Observe Dialog
    image
  7. Answer "Yes" and get the Exception again. In either case, the ResX file is not updated.

Scenario C - Resource already added to project

  1. Before adding the resource using the resource editor...
    a. Right-click your project and select Add --> Existing Item...
    b. Choose your binary file and click Add
    c. Right-click the file in Solution Explorer and select Properties
    d. Change Item Type to Embedded Resource and click OK
  2. Add the same file using ResX editor and it succeeds.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions