0

I am using Visual Studio 2013 with tfs to modify an MVC solution in C#. In one of the repositories, we have a few overloaded method like this

public static null Method1(object, string)
public static List<object> Method1(DateTime, DateTime, string, string)
public static null Method2(object, string)
public static List<object> Method2(DateTime, DateTime, string, string)

I did a build and tested locally and the code could find both versions of each method. Everything functioned normally. But when I did a publish, the published version could not find the List<object> Method1(DateTime, DateTime, string, string) versions.

Another developer was in the middle of unrelated changes. She checked in her half-finished work so I could get latest. Now the issue is gone and both versions of each method can be found whether built locally or published.

Any clue what happened? Again, we both considered what changes she recently checked in and they are on completely different classes in the project.

3
  • 1
    Publish could not break your code. Clearly, you are publishing old code. Somehow. Apr 16, 2015 at 15:10
  • That's what we thought, but why would publish use old code while my builds were working correctly? Apr 16, 2015 at 16:28
  • Either it published old code, or it failed to update new code, leaving the old code. But publish doesn't modify any code at all. Unless this could be different based on web.config? web.config transforms run during a publish. Apr 16, 2015 at 17:24

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.