Skip to content
This repository has been archived by the owner on Sep 26, 2020. It is now read-only.

Can't add files to project after all files have been removed #53

Closed
psfblair opened this issue Mar 4, 2017 · 0 comments
Closed

Can't add files to project after all files have been removed #53

psfblair opened this issue Mar 4, 2017 · 0 comments

Comments

@psfblair
Copy link

psfblair commented Mar 4, 2017

I notice when I create a new F# class lib project and then remove the ProjectName.fs and Script.fsx files from it, I can't then add new files to the project.

Expected Behavior

"Add files to project" should still add files to the project even if there are no files currently in the project.

Current Behavior

If all files are removed from the project, there's an empty ItemGroup tag in the .fsproj file that apparently can't any longer have entries added to it.

Possible Solution

If there's no ItemGroup to add a file to, look for an empty one and add it to that. If there isn't an empty one, add a new ItemGroup.

Steps to Reproduce (for bugs)

  1. Create a new F# class lib project.
  2. Remove the ProjectName.fs and Script.fsx files from the project.
  3. Create a new Foo.fs file
  4. Try to add Foo.fs to the project

Context

In general, when I create a new project I don't necessarily want ProjectName.fs and Script.fsx files at the top level. I like to create modules in subdirectories.

Your Environment

I'm using Ionide 2.23.7 on VS Code 1.10.1 (on macOS Sierra). It's unclear to me how Forge is integrated there or what version is used.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

1 participant