# Missing vbc.rsp file



## Nozoned (Jan 28, 2012)

Hello everyone, I had a problem today when I tried to compile a program using vbc. I was getting errors saying InputBox$ was not declared. I found a quick fix by adding two lines at the beginning of the program:

Imports System
Imports Microsoft.VisualBasic.Interaction

A student in the class informed me that those lines are usually found in a file named vbc.rsp. Although the latest version of .NET that I use as my path variable does not have this file, all the older versions did.

The same student with the same version of Windows and .NET sent me his vbc.rsp file. I added it to the folder where it should have been and tried again but with the same errors. Any idea why I do not have the file or why adding it does not work?

Win7 Pro
.NET framework v4.0.30319

Thanks for any help!
Richie


----------



## FordGT90Concept (Jan 28, 2012)

You can try making sure Microsoft.VisualBasic is included in the references (if it is a Visual Basic project, it will have it already) and have Imports Microsoft.VisualBasic at the top of the document.

Only Visual Basic has the InputBox method.  The other .NET languages want you to make your own form with the DialogResult button properties set.


----------



## Nozoned (Jan 29, 2012)

FordGT90Concept said:


> You can try making sure Microsoft.VisualBasic is included in the references (if it is a Visual Basic project, it will have it already) and have Imports Microsoft.VisualBasic at the top of the document.
> 
> Only Visual Basic has the InputBox method.  The other .NET languages want you to make your own form with the DialogResult button properties set.



As of now we are importing most of the program from text book downloadable material. Then we use a text editor to finish writing the programs and compile/run them in cmd. So maybe when we actually start using the Visual Studio IDE it will not be a problem. I was told that if I just use the two imports lines that I added tomy first project and named it vbc.rsp, instead of trying to use his whole file, that it would work. I should be able to give this a shot tomorrow. Another thing we seemed to have found out is that this is only a problem with custom installs of Win7. Everyone with a prebuilt system has the .rsp file.

Thanks for your time,
Richie


----------



## FordGT90Concept (Jan 29, 2012)

I would repair Visual Studio.  You can find them in the Control Panel under Programs & Features.


If that don't fix it, try reinstalling/repairing .NET Framework 4.0:
http://www.microsoft.com/download/en/details.aspx?id=17718


----------

