Absent Member.
Absent Member.
129 views

Performance Center - Support Tip : Getting Compilation error in .Net script

This is for Vugen when recording a .Net script it may fail after compilation if you do not have the proper references to libraries in the script.

 

Link in knowledgebase: http://http://support.openview.hp.com/selfsolve/document/KM00484019

 

Error:

When compiling the script in VuGen, getting error:

c:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(847,9): warning 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.

 

You will also see:

error: "error CS0246: The type or namespace name 'xxxx' could not be found"

 

compilation.jpg

 

Cause:

This issue is because the reference is not added correctly in to Script.csproj

 

Fix:

If Visual Studio add in is installed:

1. Open the "Script.sln" by vs2010.

2. There is one item named "references" in the Solution explorer. Right click it and click "Add Reference" button

3. In the popup dialog, please add your reference dll lib in the Browse tab.

4. Save and close vs2010

5. Open the script in vugen and compile it again.

 

If Visual Studio add in is not installed:

1. open the file "Script.csproj" under the script folder with notepad. (or any other text editor)

2. There will be one element named "ItemGroup" in chich there are a group of "Reference".

3. Add you share dll lib like:

    <Reference Include="ICSharpCode.SharpZipLib">

      <HintPath>C:\xxxx\ICSharpCode.SharpZipLib.dll</HintPath>

    </Reference>

4. Save and close the file Script.csproj

5. Open the script in vugen and compile it again.

 

Regards,

Mario M.

HP LR/PC Support

If you are customer you can try posting on our internal forums for more personalized support.

LoadRunner:
http://h30499.www3.hp.com/t5/LoadRunner-Support-Customer/bd-p/loadrunner-support-customer-forum

Performance Center:
http://h30499.www3.hp.com/t5/Performance-Center-Support/bd-p/performance-center-support-customer

How to:
http://www.youtube.com/watch?v=4ChlysWupWM

If you find that this or any post resolves your issue, please be sure to mark it as an accepted solution.
Labels (1)
0 Likes
0 Replies
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.