Skip to content

Cutting and pasting an .fsx file in Solution Explorer errors #732

Closed

Description

@isaacabraham

If you cut a file from one folder to another in VS2015, you'll get an "Object Reference not set to an instance" dialog. The paste operation works, but not the cut. In addition, the words "Copy of " will be inserted at the start of the filename of the pasted file.

Activity

  1. enricosada commented on Nov 19, 2015

    @enricosada
    Contributor

    @isaacabraham i see the bug

    can you add the lines of the fsproj where the files are defined?
    I'll try fix it, but i want to test also your case (there are some permutations, like linked item, real directory, etc)

  2. isaacabraham commented on Nov 19, 2015

    @isaacabraham
    ContributorAuthor

    Here's the ItemGroup section of the fsproj.

      <ItemGroup>
        <Compile Include="AssemblyInfo.fs" />
        <Compile Include="Program.fs" />
        <None Include="App.config" />
        <None Include="paket.references" />
        <None Include="Scripts\Consume.fsx" />
        <None Include="Scripts\load-references.fsx" />
        <None Include="Scripts\load-project.fsx" />
      </ItemGroup>

    In my case, if I cut/paste Consume.fsx to the root level (or back again), it causes the error.

    I've also realised that it does succeed in moving the file - but it leaves the old element there in the project file, pointing to a non-existing file.

  3. added
    Impact-Medium
    on Jan 8, 2016
  4. saul commented on Apr 20, 2017

    @saul
    Contributor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugImpact-Medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions