Project folder expected at <physical path> when using ASP.NET MVC 2 and VS 2010 RC

We're using ReSharper 5.0.1626.93 which is reporting an error whenever we use Url.Content("~/Controller/Action") in our code.  The error that ReSharper reports is "Project folder expected at <physical path>."  Using Url.Content("~/Controller/Action") is the recommend approach to referring to a controller/action so that it is resolved in Visual Studio and in IIS.

Note, this error was not being reported with the pervious version of 5.0 that we were using.

Thanks,
Matt

0
8 comments

I can't reproduce this with Build 1629. Could you try it with this build?

--
Hadi Hariri
Technology Evangelist
JetBrains, Inc
"Develop with pleasure!"
http://www.jetbrains.com | http://hadihariri.com | http://twitter.com/hhariri

0

Thanks.  I tried 1629 this morning and the issue is no longer reproducible.

0

This error seems to be back, or maybe not entirely fixed. I get the same error using something like:
Url.Content("~/ClientBin/SilverlightFileUploader.xap")

I'm using 5.0.1659.36

0
Avatar
Andrey Serebryansky

Hello Steve
     Could you please attach a small sample solution? Thank you!

Andrey Serebryansky

Support Engineer

JetBrains, Inc

http://www.jetbrains.com

"Develop with pleasure!"

0

Unfortunately I can't seem to repeat it in a new project, and the solution I'm working on at the moment is too large and sensitive to send through or try and pare down to something I can send (or find out what might be causing it). Is there anything else I can do to help investigate this?

Oh! And I've just realised the downside of hijacking someone else's thread (sorry!). I'm using MVC 2 and VS 2008.

Please feel free to move this into a new topic if need be.

0
Avatar
Andrey Serebryansky

Hello Steve
     I'm afraid it's really hard to investigate such kind of problems without a repro solution. Could you please create a copy of your solution and then "strip" it down (remove most of the projects and files while keeping the behavior reproducible)? You can send the reduced version to andrew dot serebryansky at jetbrains dot com directly. Thank you!

Andrey Serebryansky

Support Engineer

JetBrains, Inc

http://www.jetbrains.com

"Develop with pleasure!"
0

I found the problem. And maybe this is what the message is telling me, although I think it's far from clear or useful. The path I was pointing to wasn't included in the Project (by design), but *did* exist. It looks like if the asset/link doesn't exist or is included in the project, you don't get this error. But if it exists but isn't included, you get this error.

If this is a feature then I think you should be able to override it, but I question its usefulness in the first place, certainly if marked as a red error rather than a warning or suggestion.

Thanks for your help in trying to track this down.

Summary then:

  • No error if the file or folder doesn't exist
  • No error if the file or folder exists and is in the project
  • Error thrown if the file or folder exists and isn't included in the project
0

The required entry in the proj file is something along:

<Content Include="Controls\Auftrag\AuftragAnzeigenOverlay.ascx" />

0

Please sign in to leave a comment.