locked
Visual Studio restoring staff RRS feed

  • Question

  • User1536465747 posted

    Say that i have the following link 

    <li><a href='<%= FriendlyUrl.GenerateLink("home") %>'><i class="fa fa-home fa-fw"></i> Home</a></li>

    and i change to 

    <li><a href='<%= "http://" & Request.Url.Host & "/home") %>'><i class="fa fa-home fa-fw"></i> Home</a></li>

    If i try to publish the application i get some errors that FriendlyUrl is not declared. The worst part is that the code is restored so i lose my changes :(

    How do i prevent this behavior and get rid of the modified code?

    Wednesday, November 25, 2015 8:12 AM

All replies

  • User541108374 posted

    Hi,

    check that the dll for the FriendlyUrls is deployed on the server.

    Grz, Kris.

    Wednesday, November 25, 2015 9:50 AM
  • User1536465747 posted

    Hmm i am sorry but i am not quite sure what to check since this issue is happening on the workstation. Meaning it is not the server that causes the issue. 

    Rather it's the VS2k13 .NET 4.5 Web Application... i added FriendlyUrls via nuget btw 

    Any ideas?

    P.S. prior every publishing i delete the temp asp.net files as well as all files from the obj folder but it does not help 

    Wednesday, November 25, 2015 9:54 AM
  • User541108374 posted

    Hi,

    from your Original question I understood that it happens when publishing.

    If it happens locally you can perform a Clean Solution (under the build menu in Visual Studio). Then do a rebuild and see if it works out.

    Grz, Kris.

    Wednesday, November 25, 2015 11:40 AM
  • User1536465747 posted

    Uh i have tried that many times before and many other things too. Nothing helped so far :(

    Wednesday, November 25, 2015 11:57 AM
  • User541108374 posted

    many other things too

    Like?

    Also, does the same code work on another machine or that of a colleague?

    Grz, Kris.

    Wednesday, November 25, 2015 3:39 PM
  • User1536465747 posted

    Well it is working but the problem is that i cannot modify the code as it always changes the old code back.  Just like i explained in the original post.

    Meaning it's strictly about the Visual Studio 2k13 (same happens in 2k15) 

    Wednesday, November 25, 2015 6:08 PM
  • User541108374 posted

    Hi,

    Well it is working but the problem is that i cannot modify the code as it always changes the old code back.  Just like i explained in the original post.

    Ok, that was definitely not what I could make up from your original post.

    Are you making use of TFS or anything similar to safeguard your code and you overwrite your changes again with something older? Or is there some macro or linked file or gulp/grunt process that generates the file and generates it back to its old state?

    If you put the code on another folder, your entire solution, does it work then? Also, does it work on another pc?

    Grz,, Kris.

    Thursday, November 26, 2015 7:00 AM