7

I am using R#6 and when I edit some razor views, R#6 suggests that I "use directory".

(Whine :)) I dont want to! How do I turn off this annoyance? I have searched through R#6 options. It is definitely R# since the annoyance goes away when i suspend R#.

In the printscreen, R# wants to change /SignUp to ../Signup.

It is incorrect because the view is the layout and could be in any directory structure. So i want it to be /Signup

enter image description here

Solution: As derigel states. Wait for the warning to show. Hit escape. Then CTRL+Enter. A mini menu appears where you can suppress or change the warning severity. I changed the warning severity to "do not show"

Valamas
  • 24,169
  • 25
  • 107
  • 177

3 Answers3

6

Valamas, OffBySome gave you really good advice, but you still able to disable this warning locally by comment or generally, at all. It's some UI problem here - first, press escape to disable popup, and then, press alt+enter and you will bring few options how to disable this warning.

derigel
  • 3,218
  • 2
  • 19
  • 31
4

For your url's, try using relative urls by using @Url.Content("~/images/image.jpg") and @Url.Action("Action", "Controller") instead of hard-coding the absolute / urls. I think this will resolve the Resharper issue, and also make your url's relative in case you are hosting this as a subsite on an IIS instance.

bkaid
  • 51,465
  • 22
  • 112
  • 128
  • 1
    This may have solved his specific problem but this is a real bug. You can see more information here. http://youtrack.jetbrains.net/issue/RSRP-273759. Too bad their not going to fix it. :( – Bobby Cannon Jul 12 '11 at 00:09
  • 1
    Ha and funny that they link back here to the answer. – bkaid Jul 12 '11 at 00:23
  • Bobby, we are going to fix this issue but more generally - by understanding MVC routing (there is linked issue for original issue - http://youtrack.jetbrains.net/issue/RSRP-225684). But, unfortunately, not in 6.1. – derigel Jul 12 '11 at 10:40
  • Anyway, I have gone back to R#5, too many issues. Will try again at 6.1. – Valamas Jul 12 '11 at 11:15
1

I solved it by properly entering the path.

Original

    <Image Source="Images\Q_hor_pos_full_rgb.gif" Height="76" Margin="6,-3,0,7" HorizontalAlignment="Left"/>

It turns out that I had placed this xaml file in a subfolder, and that the Images folder was actually one level higher:

  • Main\Images\Q_hor_pos_full_rgb.gif
  • Main\UserControls\File.xaml

Fixed

    <Image Source="..\Images\Q_hor_pos_full_rgb.gif" Height="76" Margin="6,-3,0,7" HorizontalAlignment="Left"/>

As soon as I did that, the application found the file with no problem.