Description
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
- Place a binary file in your project's folder
- Add a nanoFramework Resource file to your project
- Click Add Resource --> Add Existing File...
- Choose the file you placed into your project's folder and click OK
- Observe Exception and selected file is added to your project as an embedded resource but not in the ResX file.
Scenario B - Destination File Exists
- Place a binary file in your solution's folder
- Add a nanoFramework Resource file to your project
- Click Add Resource --> Add Existing File...
- Choose the file you placed into your project's folder and click OK
- Observe your file is embedded under a new Resources folder
- Observe Dialog
- Answer "Yes" and get the Exception again. In either case, the ResX file is not updated.
Scenario C - Resource already added to project
- 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 - Add the same file using ResX editor and it succeeds.