9

I got this error:

Error   1   Unable to open module file 'D:\business\shared\Dropbox\badgers\vb\vb.net\My Project\Application.Designer.vb': The system cannot find the path specified.    D:\business\shared\Dropbox\badgers\vb\vb.net\My Project\Application.Designer.vb 1   1   traverseweb4

Application.designer.vb is a generated file. I simply deleted that. How do I get that regenerated?

If I open the .vbproj file directly with notepad ++ I saw:

<Compile Include="My Project\Application.Designer.vb">
  <AutoGen>True</AutoGen>
  <DependentUpon>Application.myapp</DependentUpon>
</Compile>

So it clearly is autogenerated, so why vb.net blame me for not having that stupid file?

By the way removing those stupid lines in notepad ++ works. Now things work perfectly. But this pissed me off a lot.

Anyone can explain why it happen in the first place? Why hacking into a .vbproj file is necessary to get this fixed?

user4951
  • 32,206
  • 53
  • 172
  • 282

1 Answers1

3

When I've had problems like this in the past I usually clean the project (right click solution - clean) and then rebuild from the same menu - which usually fixes errors like this.

GJKH
  • 1,715
  • 13
  • 30
  • Thank you very much, your method was the way to go, I was having the exact same problem. – Saul Delgado Aug 08 '13 at 16:57
  • 2
    I had to use the asker's method of commenting out lines in the project file. This is nutty. Are there any other ways to resolve this? – Rikki Gibson Jul 29 '15 at 19:27
  • 1
    my solution was -> edit the vbproj file and delete the section. then to clean and rebuild. The source issue was not having the 'My Project' files in my source control before my laptop died. – John M Jun 01 '16 at 20:12