Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

auto generated class when moved is not tracked #1792

Closed
dshamim opened this issue Oct 16, 2017 · 7 comments
Closed

auto generated class when moved is not tracked #1792

dshamim opened this issue Oct 16, 2017 · 7 comments

Comments

@dshamim
Copy link

dshamim commented Oct 16, 2017

Environment data

dotnet --info output:

.NET Command Line Tools (2.0.0)

Product Information:
 Version:            2.0.0
 Commit SHA-1 hash:  cdcd1928c9

Runtime Environment:
 OS Name:     Mac OS X
 OS Version:  10.13
 OS Platform: Darwin
 RID:         osx.10.12-x64
 Base Path:   /usr/local/share/dotnet/sdk/2.0.0/

Microsoft .NET Core Shared Framework Host

  Version  : 2.0.0
  Build    : e8b8861ac7faf042c87a5c2f9f2d04c98b69f28d

VS Code version: 1.17.1
C# Extension version:1.12.1

Steps to reproduce

1- Creating new ViewComponent in /ViewCopmonents
2- Added reference to a non existing model class in code
3- AutoGenerate Model for view model class reference added in step 2 from auto generate
4 - model file generated in the same folder
5- drag/ moved the file from generated position to /ViewModels/ViewComponents (our standard path for shared view models)

Expected behavior

code should pick up the new model location after drag and drop of generated view model file and intellisense should work

Actual behavior

code in ViewComponent still thinks file is at the location it was generated , cannot navigate using F12 , does not give intellisense

had to restart code

@rchande
Copy link

rchande commented Oct 16, 2017

I think this is a dupe of the bug where we don't properly detect file renames.
@dshamim, as a better work around, I think you can use the "restart Omnisharp" command from the command palette (as opposed to completely restarting Code).

@DustinCampbell
Copy link
Member

Yes, it sounds like this is another repro of #785. I suspect that typing in ViewComponent.cs after it was dragged to a new folder would result in the errors reported in #785. @rchande: Shall we hang on to this report to verify the repro?

@rchande
Copy link

rchande commented Oct 16, 2017

@DustinCampbell -- we'll verify this one too when #785 is fixed.

@DustinCampbell DustinCampbell added this to the 1.13 milestone Oct 16, 2017
@DustinCampbell
Copy link
Member

OK. I moved this to the 1.13 milestone since that's where #785 is tracked.

@rchande
Copy link

rchande commented Oct 16, 2017

Thanks!

@DustinCampbell
Copy link
Member

I verified that dragging files is now fixed. @dshamim: I couldn't follow your repro steps, it seems that there are a few steps missing (e.g. what type of project is this? What is "AutoGenerate Model"?). However, I expect that the underlying issue is now fixed.

@dshamim
Copy link
Author

dshamim commented Oct 27, 2017 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants