Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Request For Advice on Editing an Application

Status
Not open for further replies.

kc27

Technical User
Sep 10, 2008
171
US
I installed Microsoft Visual Studio Community 2017 in order to make an edit to an application that was developed by a developer that is no longer with our company. The application executable is ap9.exe (details below)

Assembly Ap9.exe
Member of Custom Component Set
H:\My Documents\AP9\Ap9.exe

Attributes:
[System.Reflection.AssemblyCopyrightAttribute("Copyright © My Company Inc. 2015"),
System.Diagnostics.DebuggableAttribute(263),
System.Reflection.AssemblyTrademarkAttribute(""),
System.Reflection.AssemblyProductAttribute("WindowsApplication1"),
System.Reflection.AssemblyCompanyAttribute("My Company Inc."),
System.Reflection.AssemblyDescriptionAttribute(""),
System.Reflection.AssemblyTitleAttribute("WindowsApplication1"),
System.Runtime.CompilerServices.CompilationRelaxationsAttribute(8),
System.Runtime.CompilerServices.RuntimeCompatibilityAttribute(WrapNonExceptionThrows = true),
System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.0,Profile=Client", FrameworkDisplayName = ".NET Framework 4 Client Profile"),
System.Reflection.AssemblyFileVersionAttribute("1.0.0.0"),
System.Runtime.InteropServices.GuidAttribute("4eb7ccd1-daf8-4ab5-bbf4-eceb6708658c"),
System.Runtime.InteropServices.ComVisibleAttribute(false)]

When I use the Visual Studio Explorer, the screen shot below is what I see. The file highlighted in the screen shot contains the code that required updating. I made the change, then saved the "Profiler.vb" file. With the "Profiler.vb" file still open, I went to the Visual Studio "Build" pull-down menu, and selected "Build Solution" I then get this error:

Build started ...
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(1111,5): error MSB3644: The reference assemblies for framework ".NETFramework,Version=v4.0,Profile=Client" were not found. To resolve this, install the SDK or Targeting Pack for this framework version or retarget your application to a version of the framework for which you have the SDK or Targeting Pack installed. Note that assemblies will be resolved from the Global Assembly Cache (GAC) and will be used in place of reference assemblies. Therefore your assembly may not be correctly targeted for the framework you intend.
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(1111,5): error MSB3644: The reference assemblies for framework ".NETFramework,Version=v4.0" were not found. To resolve this, install the SDK or Targeting Pack for this framework version or retarget your application to a version of the framework for which you have the SDK or Targeting Pack installed. Note that assemblies will be resolved from the Global Assembly Cache (GAC) and will be used in place of reference assemblies. Therefore your assembly may not be correctly targeted for the framework you intend.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

My questions are:
1. Is this the correct procedure to edit and compile the AP9.exe application?
2. Assuming I can get NETFramework,Version=v4.0 installed and working, is this all I need to do to edit this application?

Thanks for any guidance you can offer


ap9_folder_view_gd9hzy.gif
 
Well, it seems there are 2 possible fixes here.

1) Change the target framework of the application. To do this, In Visual Studio with the project open, go to Project-><Project name> Properties. In the page that opens, click Compile on the left-side menu, then click the "Advanced Compile Options" button. In the "Advanced Compiler Settings" dialog, change the "Target Framework (all configurations)" drop-down to a framework that is installed on your PC. Close the dialog, and then hit Save for the properties. Try to build.

2) Download and install .NET Framework 4, then try to build:
Post again if neither of these works.


I used to rock and roll every night and party every day. Then it was every other day. Now I'm lucky if I can find 30 minutes a week in which to get funky. - Homer Simpson

Arrrr, mateys! Ye needs ta be preparin' yerselves fer Talk Like a Pirate Day!
 
jebenson

Thank you for the advice and clear directions on this. I used a combination of what you suggested. I reinstalled .NET Framework 4, and checked the target framework using your instructions in step 1. The build then completed successfully.

1>------ Build started: Project: VGProfilesAP9, Configuration: Debug x86 ------
1> VGProfilesAP9 -> H:\My Documents\AP9\VGProfilesAP9\VGProfilesAP9\bin\Debug\VGP9.exe
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========

Are applications like dependent on specific versions of .NET - that is if it was originally built with .NET Framework 4, it cannot be built with any later versions of .NET?

Thanks again for the help.

 
If an application is built with one version of the framework it can be built with a later version, but you have to target the app to the later version. If you leave it targeted to the earlier version and that version is not present, you get the error you originally saw.

I used to rock and roll every night and party every day. Then it was every other day. Now I'm lucky if I can find 30 minutes a week in which to get funky. - Homer Simpson

Arrrr, mateys! Ye needs ta be preparin' yerselves fer Talk Like a Pirate Day!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top