Home All Groups Group Topic Archive Search About

Changed Date on PC, now project doesn't compile source code changes

Author
20 Jan 2006 11:55 AM
Martin Horn
Hi,

I have encountered a problem with compiling my project. Basically what
happened was that I noticed my PC date was set a day into the future, so I
reset it to the correct date. Now when I compile my project it ignores any
changes I have made to the source code.

Can anyone help me to fix this problem, I have tried obvious stuff like
deleting the Bin folder and re-saving the source files to make sure they
don't have dates in the future, but it still doesn't work.

So far the only solution I have found is to either keep the date a day ahead
or wait until the real date catches up with the date of the project, neither
of which is really an option. Also the second option would be impossible if
for example, the date was out by a year!

There must be a simple way to fix this, can anyone help?

Kind regards,

Martin Horn.

Author
20 Jan 2006 12:12 PM
Ken Tucker [MVP]
Hi,

        If you are using vs 2005 try going to the build menu and clean
solution.

Ken
-----------------
Show quoteHide quote
"Martin Horn" <mvh***@theinternet.com> wrote in message
news:Mc4Af.4914$mf2.3560@newsfe6-win.ntli.net...
> Hi,
>
> I have encountered a problem with compiling my project. Basically what
> happened was that I noticed my PC date was set a day into the future, so I
> reset it to the correct date. Now when I compile my project it ignores any
> changes I have made to the source code.
>
> Can anyone help me to fix this problem, I have tried obvious stuff like
> deleting the Bin folder and re-saving the source files to make sure they
> don't have dates in the future, but it still doesn't work.
>
> So far the only solution I have found is to either keep the date a day
> ahead or wait until the real date catches up with the date of the project,
> neither of which is really an option. Also the second option would be
> impossible if for example, the date was out by a year!
>
> There must be a simple way to fix this, can anyone help?
>
> Kind regards,
>
> Martin Horn.
>
Author
20 Jan 2006 12:25 PM
Martin Horn
Hi Ken,

tried that as suggested, didn't fix the problem.

It's a bit scary that I can break a project just by changing the date on the
PC!

Martin.

Show quoteHide quote
"Ken Tucker [MVP]" <vb***@bellsouth.net> wrote in message
news:etB6ArbHGHA.1312@TK2MSFTNGP09.phx.gbl...
> Hi,
>
>        If you are using vs 2005 try going to the build menu and clean
> solution.
>
> Ken
> -----------------
> "Martin Horn" <mvh***@theinternet.com> wrote in message
> news:Mc4Af.4914$mf2.3560@newsfe6-win.ntli.net...
>> Hi,
>>
>> I have encountered a problem with compiling my project. Basically what
>> happened was that I noticed my PC date was set a day into the future, so
>> I reset it to the correct date. Now when I compile my project it ignores
>> any changes I have made to the source code.
>>
>> Can anyone help me to fix this problem, I have tried obvious stuff like
>> deleting the Bin folder and re-saving the source files to make sure they
>> don't have dates in the future, but it still doesn't work.
>>
>> So far the only solution I have found is to either keep the date a day
>> ahead or wait until the real date catches up with the date of the
>> project, neither of which is really an option. Also the second option
>> would be impossible if for example, the date was out by a year!
>>
>> There must be a simple way to fix this, can anyone help?
>>
>> Kind regards,
>>
>> Martin Horn.
>>
>
>
Author
20 Jan 2006 12:39 PM
Herfried K. Wagner [MVP]
"Martin Horn" <mvh***@theinternet.com> schrieb:
> tried that as suggested, didn't fix the problem.
>
> It's a bit scary that I can break a project just by changing the date on
> the PC!

I have heard about this problem in the past.  I suggest to search for tools
which can be used to change file times.

--
M S   Herfried K. Wagner
M V P  <URL:http://dotnet.mvps.org/>
V B   <URL:http://classicvb.org/petition/>
Author
20 Jan 2006 1:47 PM
Martin Horn
I had a suspicion it was going to come to this, and I had already had a look
for free 'touch' utils that could handle multiple dirs/files, without much
success.

So I wrote my own, which has fixed the problem for me.

Here is what I came up with in case anyone wants to use it.

Thanks for the feedback,

Kind regards,

Martin.

Imports System
Imports System.IO


Public Class Form1

    Private Sub Form1_Load(ByVal sender As System.Object, _
    ByVal e As System.EventArgs) Handles MyBase.Load

        ' Change this to the folder that contains your project
        Dim di As DirectoryInfo = New DirectoryInfo("C:\Prog")

        Dim diNext As DirectoryInfo
        Dim fiArr As FileInfo()
        Dim fri As FileInfo

        Try
            fiArr = di.GetFiles
            For Each fri In fiArr
                fri.LastAccessTime = Date.Today
                fri.LastWriteTime = Date.Today
            Next fri

            Dim dirs As DirectoryInfo() = _
            di.GetDirectories("*.*", _
            SearchOption.AllDirectories)

            For Each diNext In dirs
                fiArr = diNext.GetFiles
                For Each fri In fiArr
                    fri.LastAccessTime = Date.Today
                    fri.LastWriteTime = Date.Today
                Next fri
            Next
        Catch ex As Exception
            Debug.Print("The process failed: {0}", _
            ex.ToString())
        End Try


    End Sub
End Class

Show quoteHide quote
"Herfried K. Wagner [MVP]" <hirf-spam-me-here@gmx.at> wrote in message
news:u8vyZ6bHGHA.2064@TK2MSFTNGP09.phx.gbl...
> "Martin Horn" <mvh***@theinternet.com> schrieb:
>> tried that as suggested, didn't fix the problem.
>>
>> It's a bit scary that I can break a project just by changing the date on
>> the PC!
>
> I have heard about this problem in the past.  I suggest to search for
> tools which can be used to change file times.
>
> --
> M S   Herfried K. Wagner
> M V P  <URL:http://dotnet.mvps.org/>
> V B   <URL:http://classicvb.org/petition/>
Author
23 Jan 2006 1:23 PM
Andrew Morton
Martin Horn wrote:
> I had a suspicion it was going to come to this, and I had already had
> a look for free 'touch' utils that could handle multiple dirs/files,
> without much success.

JFTR,
http://home.worldonline.dk/ninotech/freeutil.htm

Andrew
Author
24 Jan 2006 6:09 PM
Martin Horn
Thanks Andrew,

downloaded and now residing in my 'utils' folder...

Martin.

Show quoteHide quote
"Andrew Morton" <a**@in-press.co.uk.invalid> wrote in message
news:OOtl0ECIGHA.376@TK2MSFTNGP12.phx.gbl...
> Martin Horn wrote:
>> I had a suspicion it was going to come to this, and I had already had
>> a look for free 'touch' utils that could handle multiple dirs/files,
>> without much success.
>
> JFTR,
> http://home.worldonline.dk/ninotech/freeutil.htm
>
> Andrew
>