0
votes

I am trying to create a build using Msbuild via Jenkins .  I installed the Msbuild plugin and configured the path of the same .I got the below error when I tried to build and then I installed framework 4.5 in the Jenkins server .

C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(983,5): warning MSB3644: The reference assemblies for framework ".NETFramework,Version=v4.5" 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:\jenkins\jobs\Job1\workspace\Proj1\Sample.csproj]

When I Build Again . I got the same error .

While configuring the Msbuild plugin in jenkins I need to provide the path of Msbuild.exe . Does this path change when Framework 4.5 is installed . ????

Appreciate your suggestion .

Thanks

Bala

1

1 Answers

0
votes

Did you try adding the target framework version in the MSbuild target?

<target name="build-solution"> 
    <echo message="Compiling ${project.name} application" />
    <property name="failure.reason" value="build-solution" />
    <exec program="${msbuild}">
        <arg value="${solution.name}" />
        <arg value="/verbosity:minimal" />
        <arg value="/property:Configuration=Release" />
        <arg value="/property:TargetFrameworkVersion=v4.5.2" />
        <arg value="/t:rebuild" />
    </exec>
</target>