R#6 - Suggests "Use directory" in razor views. How to disable?
Asked Answered
B

3

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"

Bomke answered 4/7, 2011 at 21:40 Comment(0)
M
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.

Monro answered 5/7, 2011 at 12:6 Comment(1)
Fantastic, now i can find how to turn any other annoyances off.Bomke
M
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.

Men answered 4/7, 2011 at 21:46 Comment(4)
This may have solved his specific problem but this is a real bug. You can see more information here. youtrack.jetbrains.net/issue/RSRP-273759. Too bad their not going to fix it. :(Corsage
Ha and funny that they link back here to the answer.Men
Bobby, we are going to fix this issue but more generally - by understanding MVC routing (there is linked issue for original issue - youtrack.jetbrains.net/issue/RSRP-225684). But, unfortunately, not in 6.1.Monro
Anyway, I have gone back to R#5, too many issues. Will try again at 6.1.Bomke
G
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.

Gristly answered 11/9, 2013 at 19:48 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.