Project file expected at

Viewed 3244

I have this line in my code

<script src="@Url.Content("~/Scripts/jquery-1.7.2.min.js")" type="text/javascript"> </script>

and this part of it

jquery-1.7.2.min.js

gets highlighted by Visual Studio with the error

Project file expected at <path>.

What does this mean and how do I solve it?

Thanks,

Sachin

3 Answers

Additionally to what Ian Newson said you can also directly edit the .proj file. Make sure you have a line like

<Content Include="My\Custom\Path\My.ascx" />

I am using Source="pack://application:,,,/path/file.svg" and in my case something was apparently messed up in my project, so I had to clear ReSharper's cache and restart Visual Studio, and when Visual Studio came back the resource files were not included in the project anymore, so I had to re-include them, and mark them all as "Resource" and "Do not copy". Once I did that, the warnings disappeared.

Related