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

Paths to included files gets messed up in MVC #1083

Closed
egamma opened this issue Dec 23, 2016 · 8 comments
Closed

Paths to included files gets messed up in MVC #1083

egamma opened this issue Dec 23, 2016 · 8 comments

Comments

@egamma
Copy link
Contributor

egamma commented Dec 23, 2016

From @JerkerPihl on December 21, 2016 22:58

  • VSCode Version: Code 1.8.1 (ee428b0eead68bf0fb99ab5fdc4439be227b6281, 2016-12-19T14:49:23.350Z)
  • OS Version: Windows_NT ia32 10.0.14393
  • Extensions:
Extension Author Version
aessoft-class-autocomplete AESSoft 0.1.0
githistory donjayamanne 0.1.4
jquerysnippets donjayamanne 0.0.1
vscode-html-css ecmel 0.0.30
csharp ms-vscode 1.6.0
mono-debug ms-vscode 0.12.0
debugger-for-chrome msjsdiag 2.4.1
vscode-docker PeterJausovec 0.0.10

Steps to Reproduce:

  1. Create asp.net MVC with auth project from yo with aspnet generator
  2. Run project with dotnet run (works great, all path to jquery and stuff is correct)
  3. Exit and Open it in Code
  4. Run debugger, no paths to included javascript/jquery are correct

Copied from original issue: microsoft/vscode#17704

@DustinCampbell
Copy link
Member

Hmmm... is this a working directory issue? cc @gregg-miskelly

@gregg-miskelly
Copy link
Contributor

@JerkerPihl this sounds like a dupe of #799. If so, this isn't a bug in the extension but rather some combination of by design/a documentation issue with the template. Either way, if this is the same issue -- run bower install to fix it.

@JerkerPihl
Copy link

JerkerPihl commented Jan 20, 2017

Tried bower.. was installed but wanted to updated. Updated didnt help
Still doesnt explain if I run webbapp in shelfhosted console app, every path gets right but when I run in vscode included paths get wrong.

@davidsk
Copy link

davidsk commented Feb 8, 2017

I had to update the cwd property in the launch.json file so my config file (/src/web/appsettings.json) could be found when debugging.

@gregg-miskelly
Copy link
Contributor

@davidsk @sayedihashimi does this sound like a bug with the 'yo aspnet' generator? Or with the default launch.json that we generate, or neither and just something that we document?

@davidsk
Copy link

davidsk commented Feb 8, 2017

The default launch.json sets the cwd to ${workspaceRoot} which I imagine is fine when running a HelloWorld console app but not when nesting your projects in folders e.g src/web. I suppose it should be documented, not sure there's anything else that can be done.

My launch.json was created by the extension, not yeoman.

@gregg-miskelly
Copy link
Contributor

@davidsk In that case, I think we could fix the launch.json generation code to default cwd to the workspace-relative directory of the project. (ex: ${workspaceRoot}/src/web).

@davidsk
Copy link

davidsk commented Feb 8, 2017

If you can determine the correct path then I'm sure that'd save some confusion.

@gregg-miskelly gregg-miskelly added this to the 1.8 milestone Mar 3, 2017
@gregg-miskelly gregg-miskelly self-assigned this Mar 3, 2017
gregg-miskelly added a commit to gregg-miskelly/vscode-csharp that referenced this issue Mar 3, 2017
gregg-miskelly added a commit that referenced this issue Mar 3, 2017
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

5 participants