Getting Compilation error in .Net script

  • KM00484019
  • 07-Aug-2013
  • 02-Sep-2013


Getting Compilation error in .Net script


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"

image text


This issue is because the referenced assemblies were not added correctly in to Script.csproj


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">
4. Save and close the file Script.csproj
5. Open the script in vugen and compile it again.