Unity5 I lost my codes inside .cs file. C# files still exist, but codes gone - metafile

Unity 5.1.2f1 (64-bit) version.(windows 8.1) I closed Unity. After a while ago I opened Unity and I had some errors in Console.Then I clicked the error and I realized that I lost my code in some of my C# files.Then I checked folders of my scripts and I checked date modified section of my C# files.
Here is image of my problem.
http://www.imagesturk.net/images/2015/08/19/Capture662cb.md.png
as you can see, some of file's modified date is in 7th month and other's modified date is in 8th date. Problem is I just saved those file's (7th month) just couple of days.
I had this problem before as well. That time only few changes lost and I re-code those files, but not I lost hundreds lines of codes, so I can't re-code all same. Is there any way to recover those codes?

Related

File Date Created Newer than Modified Date

We have noticed a file come through a work flow which initially involves uploading the file from the clients computer to our server which the application there moves the completed file to a holding folder and then another application picks it up parses video information from it then moves it to a new folder.
After the entire flow completed it was noticed that Last modified date was older than when the file was even uploaded through the website and the date created was set to the time it was uploaded.
by the way the two dates were almost 24 hours apart.
any idea how this could happen>
It could have something to do with the way the files are processed, where the modified time is left to the time where the contents of the file changed, but the created time is when the file in the new location was created.
This happens, for example, when you download a zip file and unzip the contents. The created time is the time you extracted the archive, but the modified time is the time when the author last updated the contents. At least, that's what happens to me.
Keep in mind that time stamps on files are just properties of the file. Usually the OS takes care of updating them for you. But they can be changed at will if you know how.

Should a TFS Changeset only reference files in the solution?

I'm writing a tool to automate documentation and deployment of code for our website and I came across an anomaly while testing and it throws into doubt my understanding of changesets.
What I'm seeing is a changeset referencing files that aren't actually part of the solution (although at one point they were).
As best as I can determine this is the series of events (all but the last step happened before I joined the company and so this is all deduced from source control history) :
A folder is added to a project containing around a dozen txt files which serve as templates for e-mails and these are checked in to TFS
2 weeks later four of the txt files are removed from the project but not physically deleted
2 years later a developer had a task to update e-mail templates and changed all the txt files in the folder including the four that aren't "in" the project
Developer checks in his changes resulting in Changeset X
When I look at Changeset X and its list of changes it includes an "edit" to each of the txt files including the four removed files. I've checked the CSPROJ file and there is definitely no reference to the removed files in there at the point the changeset was made.
When my code iterates through all the changes in the changeset it tries to marry up the changed file to the project it belongs to in order to identify what file(s) need to be deployed as a result of the change - ie if its .html or .jpg then it just gets copied but if its source code then I need to deploy the associated binary that gets compiled from the file). So when it finds these files and tries to find a project that they belong to it fails.
Should the changeset reference these removed files or is it a bug in TFS? Or could it be something that happened when the code was migrated from TFS 2008 to TFS 2012 at some time in the 2 years before the two changesets? If its not a bug then in what circumstances would you expect TFS to track changes to files not in the project?
I've tried to replicate it by setting up a totally new project and adding it to source control and then adding, removing and editing an associated text file but I can't get it to behave in the same way.
TFS is right. Visual Studio Solutions are a nice interface for visually managing a subset of files in Version Control. It is common to have more than one solution and change files in multiple places, but still is a single logical change that I want to record as a single changeset.

Data not getting displayed in Silverlight project

I am given with a silverlight project. Its partially done and DB Connections are given. I just copied the project into my system. I have started debugging. Then, the front end UI is getting displayed but with no data. Dropdown are there, Grid headers etc..but data not getting retrieved from Database. I could not find why is that exactly as i am new to silverlight.
Can anyone help me out..
Got it. At last found date in incorrect format. System date and code written for date format are not matching.

How to resolve error loading DB project in Visual Studio 2010

I suddenly started getting the following error in the "General" ouput window of Visual Studio 2010 when loading the database project as part of a pretty large solution:
Cannot evaluate the item metadata "%(FullPath)". The item metadata "%(FullPath)" cannot be applied to the path "obj\Debug|Any CPU\Database.dbschema". Illegal characters in path. C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets
Nothing has changed in the .Net framework recently, and there is not mention of FullPath in the Database.dbproj file.
Googling around yielded this blog entry, but resetting the Visual Studio environment did not help:
http://social.msdn.microsoft.com/Forums/en/vstsdb/thread/14eecc38-87fe-4234-b5fa-c2fa7cab9ae9
After much banging my head against the wall, it occurred to me to try and load the DB project on its own, outside the solution. Lo and behold, that worked. This gave me the clue that something was wrong with the solution itself. I compared the .sln file that was generated when I opened the project on its own with the contents of the large solution, but nothing obvious jumped out. In the end, I deleted the .suo file and that solved it for about a day. The next day, the problem returned, and deleting the .suo file did not fix it.
The culprit? ReSharper 6 EAP. Disable ReSharper and the problem goes away.
http://youtrack.jetbrains.net/issue/RSRP-255109
As a side note for someone that may stumble on this post in the future. Whenever you get a error that says something like:
cannot evaluate the item metadata (fullpath) etc...
Most of the time this relates to the character limitations of paths that cannot exceed 260 characters all the way to the bin folder. It is a really cryptic error that has wasted too many people's time in the past.
Watch the length of those project names and the depth of your folder structure ;-)

Differences in XAP-File - but there are none?

I have a very strange problem. Maybe some can give me some more ideas...
I have a hosted (IIS) SL4-App. In the clientbin there is one xap-file. If I took the installation from our buildserver, all works fine, despite one (and only one) datetimepicker delivers an validaton error if I enter a valid date (string could not be determined as datetime). On a datepicker on the same control, with the exact same xaml (despite the binding), there is no problem.
Ok so far. The strange thing is, this problem only occurs, when I use the xap-file from the build server. If I replace the xap with my local one (based on the same sources of course), it works like it should. Of course I compared the contents of the two xap-files, but both were same.
I have no idea what is going on here...

Resources