deleted csproj File by mistake - asp.net-mvc

I mistakenly deleted the csproj File in my project, and now I'm getting an error message :
now I don't know how can I restore it or make a new one, I couldn't find any file with csproj suffix in template files associating with this project file.

I had the same issue. I followed the below steps and it worked.
Create a new project
Copy its .csproj file into your folder
Rename the .csproj file to your project name

Related

Git says I delete one line in .pbxproj file when I add new files to my project

I added two new files to my Xcode project and when I ran git diff on pbxproj file it showed the added files but also indicated that I deleted one line of pbxproj which I didn’t. I have tried discarded all changes and re-add the new files, and it still showed I delete a line in pbxproj. However, I can still build the project without error. What might be the cause?

Copy an existing Xcode project results in files with wrong references

I have a working project that builds ok. (Xcode 6.0.1)
There were images added that were at one folder (/Downloads) and were substituted by new ones (/MyDir/MyProject).
At adding files process copy options, group and add to it's targets were selected.
After a copy and paste at Finder from the root project folder to the new project some images contain references at Targets / Build Phases / Copy Bundle Resources to old folder (Downloads) while they are ok at original project.
I've deleted the .git from initial project to make sure it's not a git problem.
Already tried
rm -rf ~/Library/Developer/Xcode/DerivedData/
Any ideas? Thank you
In the rightmost panel, which contains Identity and Type, check to see if the "Location" field is Absolute Path, Relative to Group, or Relative to Project, and set each file accordingly to what it should be. Xcode seems to create new files with creative ideas on how this should be set.
check in your project build phases if there are some missing references and delete the one you don't need

TFS Build fails with "Could not copy file" of file not even in the project

I have TFS Build set up, which worked fine until yesterday. Since then I get the following error from one project:
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\WebApplications\Microsoft.WebApplication.targets
(182): Could not copy the file
"Content\themes\base\images\ui-bg_flat_0_aaaaaa_40x100.png" because it
was not found.
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\WebApplications\Microsoft.WebApplication.targets
(182): Could not copy the file
"Content\themes\base\images\ui-bg_flat_75_ffffff_40x100.png" because
it was not found. C:\Program Files
(x86)\MSBuild\Microsoft\VisualStudio\v11.0\WebApplications\Microsoft.WebApplication.targets
(182): Could not copy the file
"Content\themes\base\images\ui-bg_glass_55_fbf9ee_1x400.png" because
it was not found.
C:\Program Files
(x86)\MSBuild\Microsoft\VisualStudio\v11.0\WebApplications\Microsoft.WebApplication.targets
(182): Could not copy the file
"Content\themes\base\images\ui-bg_glass_65_ffffff_1x400.png" because
it was not found. C:\Program Files
...and about 10 more...
The files mentioned by the error are nowhere to be found, not in the project nor in any folder of the project.
Does anyone know how to get rid of this error?
At Ln 182 of the .target file is the following:
<Copy SourceFiles="#(Content)" Condition="'%(Content.Link)' == ''"
DestinationFolder="$(WebProjectOutputDir)\%(Content.RelativeDir)"
SkipUnchangedFiles="true"
Retries="$(CopyRetryCount)"
RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)" />
I also have a second project in the solution which is nearly the same and builds fine.
Grep/Search the entire source tree for those filenames - something must be referencing them.
Adding the missing files to source control solved the problem for me.

Xcode copying unnecessary files into target

In my Xcode project, I have it set to copy all the files I need in the "Copy bundle resources" step and it doesn't link to any extra libraries, yet when I compile the project it copies a number of files that aren't even in the project's file references (a number of .dll files that have nothing to do with this version of the app).
The files may have accidentally been added to the "copy bundle resources" step at one point but were since removed. How can I find out why are these files still being copied and how can I prevent it?
Turns out the files were left over from a build before those files were removed. Trashing the app from the products folder got rid of the extra files.

Crystal's rpt published to the wrong folder

I am using ASP.NET MVC 2 in Visual Studio 2010. In my project I have created a 'Crystal' folder containing crystal reports .rpt files. I have set the 'build action' of each .rpt files to 'Content', hoping that these .rpt files will be copied to the target folder when I 'publish'.
Those .rpt files were copied to a 'Crystal' folder indeed, but there was a duplicate 'Crystal' folder below the 'bin' folder.
How can I make the 'Crystal' folder not appear inside the 'bin' folder?
Set the Copy to Output Directory option to Do not copy for this file.

Resources