MSTest Deployment not working with "../../path" but works with the full path on visual studio 2010 - deployment

I got a problem with MSTest Deployment,
i set folder deployment to something like that "..\MyProject\bin\debug\"
I know this path is relative to the test solution dir (C:\dev\MyApplication\Tests in my case) and it appears as
>Solution Directory>..\MyProject\bin\debug\ in the deployment GUI.
The problem is that there is no error at all but no folder or files are copied.
But if i put the full path like this
C:\dev\myApplication\MyProject\bin\debug\
i got a warning that it could not work on other computers as it's outside the solution folder.
despite that warning it works and all files from my debug folder are copied.
The problem is that i want relative pathes as every one on the team got a root path of the solution different of course.
Any Idea ???
I forgot to mention that this project was migrated from VS2008 where it worked to vs2010 where i have this problem.

The relativeroot is by default the solution directory. So this should be "MyProject\bin\debug\"

Related

.Net restore getting wrong absolute path

I have a project that is in a zip that was originally coded on a windows 7 OS.I have since moved to windows 10 and I am trying to continue working on the project on my Windows 10 PC.
The issue is that somehow the path is still set as old path and as a result the build fails.
Failed to read NuGet.Config due to unauthorized access. Path:
'C:\Users\abc\RiderProjects\myproject\NuGet.Config'. --->
System.UnauthorizedAccessException: Access to the path
'C:\Users\abc\RiderProjects\myproject' is denied.
The path C:\Users\abc\RiderProjects\myproject should be C:\Users\xyz\RiderProjects\myproject.I looked within the project if i can find hardcoded references to the old path but in vain but i can see references to old path in /bin and /obj folder.
I already tried the following:
1.Look for hardcoded references to old path within solution directory
2.Clean solution
I had to do the following to fix the issue in that specific order.
1.Remove obj and bin folders from every project.A proper gitignore file should be added before commiting to a git repository.In my case since I got the project in a zip , there was some obj file in some projects in the solution
2.Clean the solution
3.Rebuild the project

'${workspaceFolder}' can not be resolved. Please open a folder.' on Visual Studio Code

wondering if you could assist. Really challenging in determining a solution to this from my research.
Ive downloaded Visual Studio code two weeks ago and has come across an error once I try to debug a file. The file appears to open but once I run the debugger it shows accordingly:
'${workspaceFolder}' can not be resolved. Please open a folder.
Can't seem to find or replicate a similar solution. I've also tried to reinstall Visual Studio code (no easy feat). I'm trying to at least understand the problem and its source.
The file is a .js file that I've been working on, running a simple function. It is not meant to operate in tandem with a larger workspace/program.
In VScode go to file --> Add folder to workspace and select the folder where the program files are located.
If you are using the latest Visual Studio 1.44, make sure to upgrade to 1.44.2.
The issue microsoft/vscode issue 94725 has been resolved.
It featured the same error message:
After some investigation the problem is the following for the workspace configuration our debug extensions appends the following attribute
__workspaceFolder:'${workspaceFolder}'
And the configuration resolver properly tries to resolve this and complains because the scope of the folder is not specified.
In a multi root workspace scope has to be specified, otherwise the resolver does not know against which folder to resolve the variables.
Proposed fix: the node extension which adds this attribute should scope it if it sees that we are in a multi root folder.
So instead of ${workspaceFolder} use ${FOLDER_NAME:workspaceFolder}.
This is fixed in commit ae97613.
Replace ${workspaceFolder} with ${FOLDER_NAME:workspaceFolder} in your *.code-workspace file. (from [here][1])
By the way, same goes to ${workspaceRoot}, you can replace it with ${FOLDER_NAME:workspaceRoot}.
Any more folder variables ca be fixed with this FOLDER_NAME: prefix? My workspaces did not use them so far.
Worked for me in Version: 1.44.2.
I know this question is very old already and the answers may have been correct but none worked for me on vscode v1.57.1 at the time of this comment on 30.06.2021
I had to replace ${workspaceFolder} with ${workspaceFolder:my-folder-name} in my *.code-workspace file
Ref: Variables scoped per workspace folder
I recently had this problem and so did I read the answers above but being a beginner I was unable to solve it .In my answer I don't have exactly what you should do but I will show what worked for me.
Go to the explorer and you will see there is no folder added.
Browse for .vscode folder and select it.
Issue solved {this atleast worked for me.It**(.vscode)** had .json extension file in it}.
I was having the same issue, but I solved it this way:
1- open VS Code as administrator
2- open the sheet
3- debugging with no problem :)
enter image description here
I just create a file.json that they can debug.

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

NAnt build failure

I keep getting this NAnt error, please advise...
The type System.Web.Security.MembershipCreateStatus exists in both 'c:\Windows\Microsoft.NET\Framework\v2.0.50727\...' and '...\\my Project folder path'
I have tried everything...reinstalling NAnt, VS, verifying build file,etc.
I tried deleting that dll from my project folder. It then complains about {get; set} methods.
I even tried uninstalling .net 2.0 because that is what is causing all the problems, but that doesn't work since .net 2.0 folder cannot be deleted...
If it has to be deleted, i will have to mess with the registry, which i dont want to because I have specifics in there that I dont want to disturb.
Thanks in advance!!
Cheers!!
I could not have figured this out in a million years. One of my peers helped me with this one.
Solution:
Try to download NAnt (its a zipped folder)
Before you extract the folder you should right click on the zip file then select Properties and under the General tab, click the button labelled Unblock, then click OK on the Properties window.
Once you do that, extract the file to your desired location
4.Now change the path in your environmental variables
5.Open a new command Prompt and run NAnt
End of all problems...NAnt works awesome!!
Thanks!!

hudson | nAnt.exe is not on the "\bin" folder

I just setup hudson (CI), how do I tell this Dude that my NAnt.exe is not in the \bin folder?
it's keep looking for this path:
C:\myProjects\web2009\tools\nant\bin\NAnt.exe //doesn't exist
but in the reality I setup it, in here:
C:\myProjects\web2009\tools\nant\NAnt.exe // the correct path
Have you looked at the Hudson configuration page? It should be configurable there:
http://hudson:8080/configure
The Nant plugin has a wiki page which says in part:
In order to use this plugin, you need to first
configure a NAnt installation, which can be done on
the Hudson Configuration page. Simply specify a name
for the installation, and the path to the installation
directory.
The Wiki Page answer to simply specify a name and path is NOT enough.
It seems that the installation path for the NANT HOME makes an "assumption" that there is a further \bin folder where the actual EXE is located. We all know what happens when you make an assumption.
So, for example:
My nant was located in
C:\Code\Projects\Learning_Hudson\tools\nant
and I kept getting errors, even though that was the same path I used in my NANT HOME config value. But I did keep getting a "not a directory" error on my NANT HOME with the above path.
So, after searching for an answer, which I didn't find, I found this question and it helped me figure out to MOVE my nant files to a bin subdirectory.
C:\Code\Projects\Learning_Hudson\tools\nant\bin - is where I moved the nant files
and the I left the NANT_HOME configuration path as
C:\Code\Projects\Learning_Hudson\tools\nant
and that got ride of the errors, and I finally got a successful build after 12 attempts, and lots of configuration changes.
Hudson seems to expect NANT_HOME to point to a folder that contains a bin directory where nant.exe can be found.
This confused me as well at first, but I just moved my Nant\bin folder to the appropriate location to get Hudson to save the setting. (I'd imagine you can do the same thing to get your setup working.)