Simulating Virtual Directory type of folder - visual-studio-code

I looked up to see if some post already had the answer but I have a situation in VSCode that is easy to resolve in Visual Studio but here I don't know how to do it.
I have a project that runs in a virtual director of other Site.
Lets say I run http://example.com and than in the iis I have a Virtual Directory named "Tests" that holds my project. So in production env I type http://example.com/Tests and I can see my site and all the relative paths that I have (on assets mainly) work.
The thing is that I want to stop using Visual Studio and start using VSCODE and I don t know how to configure the project so when I ask for asset with the relative path "/Tests/main.css" the right file is served (because of the folder Tests not really existing).
I installed iisexpress in vscode and tried to configure it but with no luck.
Sorry for possibly the bad explanation.
Thanks for your time and help.

Related

Visual Studio Code debug mode issue

I'm sorry to bother , I don't know if I can ask this
Visual Studio Code, suddenly can't use debug mode to set interrupts to test.
It seems that it is talking about the folder name problem, but after accessing the folder, it will not be renamed. How can I solve it now? I can't upload photos so I'm capturing the important parts.
i.e.: the module "queue" could not be imported because it is shadowed by:
/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/queue/__init__.pyc
Please rename this file/folder so that the original module from the standard library can be imported.
Not sure how to change folder name or duplicate name, these actions are forbidden after accessing the folder, or is this some other problem?
This looks like an actual issue in VSCode - https://github.com/microsoft/debugpy/issues/886
In case you're using python 2.7, Downgrading the python VSCode extension should help.

How to get FTP-Simple working in Visual Studio Code?

I recently opted to start using Visual Studio Code. I want to connect to a remote server and edit files directly on the server. FTP-Simple seems like a great solution. But I am having a hard time understanding some basics about the program.
If I make a connection to a server, does FTP-Simple download all the actual files to my hard drive?
Also, I was able to make a connection, but in one of the directories there should be a sub-directory and it's missing. What am I doing wrong?
Can someone point me to some good documentation for this extension such as video(s), etc.
If I make a connection to a server, does FTP-Simple download all the
actual files to my hard drive?
Yes, It download all to your hard drive. you can find an address like below:
C:\Users\your user name\AppData\Roaming\Code\User\ftp-simple\remote-workspace-temp\cbc1ad9ed60f12ec861052806d7833db\httpdocs
for opening a directory in VSCode you can press F1 type ftp-config then click ftp-config:Open
and click on target directory you want to open for more information use this
2 years later and I'm having the same problem. I have already uninstalled ftp simple as well as VSC with no effect.
The plugin just doesn't download all the files on the FTP. It worked the first time I installed it for 2-3 weeks and then suddenly stopped being in sync with the FTP server.
There is a folder called "code" on mac in Library/Application Support where most of VSC data is saved, but deleting this didn't have an effect either. Perhaps it works for someone else, as this is apparently necessary to fully deinstall VSC.
I'd pay for good plugin that just allows to work remotely on ftp files!!

Change .vscode folder location

I'm programming a client side applications using SharePoint Designer 2013.
I want to change to VSCODE since it supports a lot of extensions for some Javascript library like angular, jQuery. And because of the Chrome/Node.js debugger extension.
But when I try to start any Debugger, I got the error:
Unable to create 'launch.json' file inside the '.vscode' folder (Error: UNKNOWN: unknown error, mkdir '\\servername\DavWWWRoot\sitename\Style Library\.vscode').
I get this error because it's impossible to create a folder in SharePoint where the name starts with dot.
So there's a possibility to change the name of this folder or the file location to any directory in my local computer?
No, it's not possible to move/rename that folder. VS code is a tool that bases project management on folder content. So it is essential that the project settings reside in the folder being managed.
You can move the "extensions" folder, but unfortunately not the argv.json (so the ".vscode" will, at least be recreated on vscode launch)
https://github.com/microsoft/vscode/issues/17691#issuecomment-559234574
I hope that'll finally change sometime .
https://github.com/microsoft/vscode/issues/3884
https://github.com/OmniSharp/omnisharp-roslyn/issues/953

Ajax Controls Toolkit and Ajaxmin

I am learning how to use the Ajax Control Toolkit using VB.NET in code-behind in Visual Studio 10.0.40219.1 SP1Rel, .NET 4.0.30319 SP1Rel. I have been to many websites and tried lots of code, using the AnimationExtender. The sample that came with the toolkit works perfectly, but on
http://localhost:1049/
which is different from my "view code in browser" url:
http://localhost:4258/
When I change the url to mine, I get this error:
Could not load file or assembly 'AjaxMin, Version=4.97.4951.28478, Culture=neutral, PublicKeyToken=21ef50ce11b5d80f' or one of its dependencies. The system cannot find the file specified.
Nothing in the installation instructions mentions this. I can't run the page I'm using to learn how to use the AnimationExtender. I am at a loss, and I can't find anything like this on Google or here.
Thanks!
Matty's suggestion to check the sample project sent me back to the directory where I'd unzipped it, then checked the file AjaxControlToolkit.Binary.NET40.zip, which had the AjaxMin.dll file in it. I had admin move the file to C:\Program Files\Microsoft Visual Studio 10.0\VB\Bin (I don't know if that directory matters, it works for me), then in VS added the DLL as a reference to the project. The few errors I've gotten since are nothing to do with ajaxmin.
I had the same problem, I had to copy the file AjaxMin.dll from where I extracted the AjaxControlToolkit.Binary.NET40.zip, to my project's bin folder. i.e. C:\Users\MyUserName\Documents\Visual Studio 2010\Projects\MyProject\MyProject\bin
Rebuilt the solution and this time worked fine..
Hope that will help you :)

pydev directory django shell

I'm using PyDev in a django project of mine.
When I start the django sheel, the os.getcwd() command returns my home folder.
This is bad, since my code points to some resources by relative paths, assuming as current directory the directory containing the manage.py.
In this post (http://stackoverflow.com/questions/2746342/pydev-and-django-pydev-breaking-django-shell) someone recommended to use absolute paths to avoid this problem.
But I think it is a very bad practice, since things will not work when other people checkout the code into their computers.
The closest hint I found here:
http://old.nabble.com/-pydev---Users--how-to-set-working-directory-for-console--td25328455.html
It seems we can use "Run/Debug Settings" to set the current directory associated to a "runnable module". However, in this way we cannot associate the setting to the django console. I have tried to associate it with the manage.py, but it did not work.
So, the question: how to define the working directory of django shell?
Thank you,
Leonardo