.Net restore getting wrong absolute path - nuget

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

Related

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

Can't get rid of desktop.ini file in Unity project

I recently had to move my unity project over to google drive for a couple weeks so I could continue work on my game. After moving it to google drive, windows 10 starting adding a desktop.ini file to all of the directories in the project folders. I have moved my project back to my desktop hard drive and I deleted all of the desktop.ini files. For some reason when I try to build my project I get an error that says "Invalid resource directory" and points to the path in my android-resources folder where a desktop.ini file keeps getting generated. It doesn't matter if I delete it or not because it gets generated every time I try to build the project. Any ideas?
Cloud storage is known for producing desktop.ini files with accompanying problems. When Windows creates a desktop.ini in a folder that Unity is attempting to package you'll get the "Invalid Resource Directory" error since it tries to bundle a file it doesn't expect.
You must prevent desktop.ini files from being generated. There are different methods but no guaranteed solutions. Try this registry change: http://jamesisin.com/a_high-tech_blech/index.php/2010/09/nevermore-be-bothered-by-desktop-ini/
Then move your project to another directory (make sure you've turned off any cloud Storage or similar as well).
If that doesn't work try finding other options for turning off desktop.ini generation. Good luck!

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

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\"

Deployment Issue In Symfony2 - Can't Find Registered Bundles?

I'm transferring my project from the laptop to a test/production server. I'm copying the files to the server via FTP. So far, I can access the /web/config.php file and /web/app_dev.php files alright.
However, when I go to try and load a page it comes up with the following error:
ReflectionException: Class Knp\Menu\ItemInterface does not exist
In the error report, all the files look to be held in the following root directory:
/var/www/vhosts/domain.co.uk/subdomains/dev/httpdocs/
On the laptop however, the root directory was www:
C:\wamp\www
Everything on the test server is held in the httpdocs folder. What do I need to do to fix this error?
Cheers
EDIT:
I have moved everything in to a www folder, held within httpdocs folder. It's completely broken doing that, no pages will load.
The issue occured from an incorrectly configured .htaccess file on the development server.
During the configuration, the root directory wasn't changed to /web. Once this was changed however, the plugin worked.

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.)