Last post Sep 20, 2017 05:22 PM by jzero
Sep 16, 2017 12:37 AM|wendy elizabeth|LINK
I just started to be assigned a work station that was low on memory so I accidently removed the wrong version of the .net framework. To correct the problem, I downloaded .net framework 4.0 since that is what the application uses. This web form application
uses vb.net 2010 visual studio ide.
I problem is I probably downloaded the wrong version. The application probably was using a version number 4.3 I am guessing.
Thus I am trying to determine what I need to do to solve the problem.
Here is where the steps of where the problem lies:
1. When I try to debug the application, I get the following error message:
If you cannot see the message, it basically says to retarget the project.
Once I see the above message, I just click the OK button. I do not know where to point the application.
2. After that point I get lots of messages that look like the following:
AttendanceLetters\App_Code\mylistbox.vb(1): Build (web): Reference assemblies for target .NET Framework version not found; please ensure they are installed, or select a valid target version.
Thus to solve the problem can you tell me the following:
1. Can you tell me and/or point to a url (link) that will solve the problem tell me how and/or how to point the application to the correct target link?
2. If that is not possible, do I need to download some version of the .net framework that the application is expecting to see? If so, how can I tell what version the application is looking for?
3. If the above solutions do not work. should I uninstall the visual studio 2010 that is on this workstation and reinstall a new version so that the application can find the correct version of the .net framework?
4. If you have a different solution would you tell me what I should do to solve the problem?
Sep 18, 2017 05:43 AM|Billy Liu|LINK
The target framework for existing projects can be changed.
If you change the target to an earlier version of the .NET Framework, Visual Studio might not be able to automatically make all the changes that would be required.
You might have to make changes manually in order to run the project.
For information about how to change the target Framework version of an existing project, see How to Change the Target Framework Version of an Existing Web Project.
Sep 18, 2017 04:57 PM|wendy elizabeth|LINK
When I did what you suggested, I found that I do not have the .net 4 framework installed on this workstation.Last week I uninstalled the .net framework 4.7 and visual studio 2012 since none of my applications use Visual Studio 2012 currently. Another reason
I removed .net framework 4.7,since I was going to install the .net framework 4.0, there was a message saying that the install could not happen since there is a later version already installed on this computer.
Last week I uninstalled .net framework 4.7 and installed framework 4.0. Now I cannot find the install of .net framework 4.0 and I see .net framework 4.7 instead. I know the uninstall .net framework 4.7 and .net framework 4.0 occurred since I watched it.
Thus do you think I should uninstall .net framework 4.7 and reinstall .net framework 4.0?
Do you have suggestions on what I should try next?
Sep 19, 2017 12:14 PM|Billy Liu|LINK
I think it's better to install .net framework 4.7.
Because the Source code written for one version of the .NET Framework should compile on later versions of the .NET Framework.
You could refer the link below for more information:
Sep 19, 2017 02:14 PM|wendy elizabeth|LINK
So you are saying that I should convert the application to visual studio 2012? Does .net framework 4.7 point to Visual studio 2012?
Is there any way that the Visual studio 2010 can use the .net framework 4.7? When I look at the frameworks that can be connected, I do not see .net framework 4.7 listed?
Sep 19, 2017 05:31 PM|PatriceSc|LINK
The problem is that all 4.x versions are a full, highly compatible replacement for all previous 4.x version so with 4.7 installed you could run applications targeting .NET 4.0, 4.5 and any other version up to 4.7. You could just have kept that and not seeing
4.0 was perfectly fine.
As you previously had 4.7 it seems your best bet is to just reinstall 4.7 to try to get back at the previous state.
And then using Visual Studio you can still tell which version is targeted in project properties so that even with 4.7 on your machine you can create an app that will run on a machine that only have 4.0 or 4.5 installed.
Sep 19, 2017 07:25 PM|wendy elizabeth|LINK
I have reinstalled .net framework 4.7 and I am wondering what you mean by ' version is targeted in project properties'?
I tried to get a screen print for you to look at, but I could not get it placed in this answer this the picture is not a url.
Basically I think you mean the Properties Pages->Build-> target framework version, correct? If not what do you mean?
When I looked at the targeted versions I only see versions 2.0, 3.0, and 3.5 in the dropdown list.
This dropdown list does not include any version of the .net framework > 3.5. (basically version 4.7 is not in the list.)
Thus could you tell me if I am on the correct visual studio location ? If so, how can I get the .net framework 4.7 to appear in this dropdown list?
Sep 19, 2017 08:01 PM|jzero|LINK
Correct there should be a .Net Framework 4 along with older versions.
Also take a look in web.config file (if it is intact) to know what is the "targetFramework" it is set to use.
Sep 20, 2017 04:33 PM|wendy elizabeth|LINK
Thank you for your answers so far!
However I have the following items to mention which include:
1. web.config file value= targetFramework="4.0"
2. In the dropdown list of .net frameworks, the highest version of the framework that is listed is 3.5.
Basically the visual studio that I am using does not know that my computer has .net framework 4.7 on it. Thus what can I do so my visual studio 2010 knows there is a .net framework 4.7 that it can use?
3. Just for testing, I changed the targetFramework to be 3.5 and in the properties of the project, I
got the following error message:
"App_Code\json.vb(1): Build (web): Reference assemblies for target .NET Framework version not found;
please ensure they are installed, or select a valid target version."
4. When I changed the
and that did not work.
how can I make the visual studio 2010 that I am using know that there is a 4.7 .net framework it can use?
what do you think my next step should be?
Sep 20, 2017 05:22 PM|jzero|LINK
OK, webform app is targeting .Net 4
Basically how can I make the visual studio 2010 that I am using know that there is a 4.7 .net framework it can use?
Also I have to confess, do not have 4.7 installed here.
The other thing not clear, is if your problem resides in VS2010 not finding .Net 4.0 or if is a .Net Framework problem.
You can try this tool, maybe it helps, https://support.microsoft.com/en-gb/help/2698555/microsoft--net-framework-repair-tool-is-available