Why this Build Error: Could not copy the file XXX to the destination file YYY because the destination is a folder instead of a file - c#-3.0

The error is:
Could not copy the file "C:\Users\m_len\source\repos\JobAssist\src\Services\CoverLetterBankMgmt\CoverLetterBankMgmt.API\bin\Debug\netcoreapp3.1\JobAssist.Services.CoverLetterBankMgmt.API.xml" to the destination file "bin\Debug\netcoreapp3.1\JobAssist.Services.CoverLetterBankMgmt.API.xml", because the destination is a folder instead of a file. To copy the source file into a folder, consider using the DestinationFolder parameter instead of DestinationFiles.
However when I look in the directory, the XML is there. I deleted it and rebuilt and it was regenerated.
I am using Visual Studio 2019.

One of my projects wasnt building in the solution. I didnt figure out the cause so I just created a new project in the solution.

Related

Netbeans ignoring upload relative file path

Netbeans has stopped uploading files using the relative file structure. No matter what I upload path settings I enter, it uploads only to the server root. How can I fix this?
The problem is just for one project; other projects using the same configuration are okay.
I compared the files in nbproject with a working project and there are no differences.
I changed the "upload directory" but it doesn't change where the file gets uploaded to
I deleted the project and
created it anew.
It seems to be simply ignoring the config.
On my local computer, the path is:
/MyNetbeans/Project
/Source Files
/folder1
/folder2
MyFile.php
/Include Path
/Remote Files
When I upload, it saves the file to
/folder2/MyFile.php
but it should save it to
/folder1/folder2/MyFile.php
Netbeans 12.0,
Windows 10
Any ideas for getting it to upload using the relative path?
SOLUTION: change the Sources folder in Project Properties.
From the Netbeans File menu > Project properties > under Categories select "Sources". Next to "Source folder:" click BROWSE. Navigate to the folder, higher or lower, in the local directory structure which matches the directory structure on the server > OK.
Upload the file and check the server to see where it was saved. Rinse, lather and repeat as necessary.

Unable to Generate Code First Migration Scripts during Visual Studio Team Services Build

I want to Generate Some files during TFS-Build for e.g. Generate some text files using exe which is executed through powershell.
I added the steps(Powershell) in TFS-build Definition , when my process comes to this step, log generates and shows that file is generated successfully, but I don't see any generated file under Artifacts > drop folder.
NOTE: I am using same directory for generating text files where my exe is available.
How to achieve this in TFS Build , I am using Visual Studio Team Services.
Based on the log files, you just published the files that in the D:\a\1\a folder to the artifacts (e.g. CIRIg.Mvc.zip, CIRIg.Mvc.SourceManifest.xml, CIRIg.Mvc.deploy.cmd, CIRIg.Mvc.SetParameters.xml).
However, the generated txt file (636247216960041685.txt) is in the D:\a\1\s...) and isn’t copied to the D:\a\1\a folder. So, you don’t see it in Artifacts > drop folder.
To deal with that issue, you can generate the file to D:\a\1\a ($(build.artifactstagingdirectory)) folder or copy that file to that folder by using Copy Files step/task.

XCode - copying localy all external files linked into the project

When I made my project, I've added many files just by link, without copying them into the project folder. But now, I'd like to have a pack that include all the necessary files into the project folder.
How can I make all those external files being copied into the project folder without having to check them one by one ?
Simply
Delete all the files from your project.
Geather all the files you want to copy.
Drag them all together to your project again, and now check the "Copy item to the destination folder"
I believe this is the fastest way to do this.

File couldn't be copied to Project

I have just started making a test app , here is what happened.
I copied some files in to my project.
deleted them, as reference only.
I tried to add them again,
and i get the following error
" randomfile.h couldn't be copied to TestApp because an item with same name already exists "
randomfile.h is the file i am trying to add and TestApp is the project name.
How can i add the same file again?
Un-select the "Copy items into destination if needed" checkbox. Are you adding the file from and to the same folder? If it's from a different folder, then you need to rename or delete the one that you had before.
It worked, but i don't understand why this happened, can you explain
in detail?
You deleted the items by reference only, that means that you only deleted the projects reference to it, essentially, removing it from the project, but not deleting it from disk. So the file is still on your hard drive in your project files directory. Trying to copy another instance of it will be like trying to copy 2 files with the same name into the same directory, thus you get the "because an item with same name already exists" error
However, this doesn't work if you delete folders. Here are steps to reproduce:
Add a folder called "images".
In that folder, add a folder called "test".
Put a couple of files in the test folder.
Delete the test folder. Select "move to trash" (as opposed to delete references).
Try to add a "test" folder into the images folder by dragging in from finder.
Error by OP appears - xcode does not delete folders (or subfolders) when you select the move to trash option, even when you have that folder selected. You have to manually remove the folders from finder.
Go to project directory to find and delete the file that has the same name as the one you were trying to copy to project

netbeans ftp configuration

I've set up my FTP connection for my project, but when it uploads the file, it adds a directory named after the project to the uploads (which means it isn't going to the right folder).
i.e.
initial directory set to '/httpdocs';
no upload directory specified.
I upload a file from my local folder:
project name/library/script.php
I want it to go here:
FTP/httpdocs/library/script.php
but it's going here:
FTP/httpdocs/PROJECTNAME/library/script.php
Can anyone help me get this configured correctly?
Then you are making your project in netbeans one folder too high. The project should be created with the main folder being the root folder, not the folder that holds the root folder (the one with the name of the folder).
So, you need to recreate your project with the correct folder being the root folder, and you should be all set.