1

I just upgraded my TFS source to use DevExpress 15.2.5. However, now I get a bunch of warnings in the output such as

C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(1819,5): warning MSB3274: The primary reference "C:\Users\User1\Source\Release\V6.1\CommonBin\Release\WebControls.dll" could not be resolved because it was built against the ".NETFramework,Version=v4.5" framework. This is a higher version than the currently targeted framework ".NETFramework,Version=v3.5".

and

C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(1819,5): warning MSB3275: The primary reference "C:\Users\User1\Source\Release\V6.1\CommonBin\Release\WebControls.dll" could not be resolved because it has an indirect dependency on the assembly "DevExpress.Data.v15.2, Version=15.2.5.0, Culture=neutral, PublicKeyToken=7ea533hgx2169hs3" which was built against the ".NETFramework,Version=v4.0,Profile=Client" framework. This is a higher version than the currently targeted framework ".NETFramework,Version=v3.5".

along with about 30 other similar warnings.

It's obvious that something is out of sync with my assemblies because they are referencing the wrong versions. So I looked at my TFS project .csproj file. The version of DevExpress and .NET framework that are being referenced in there are correct.

I then went to the Microsoft.Common.targets file and opened in Notepad. I noticed that file is referencing the old version of everything. How do I get this in sync with my TFS assemblies?

Tim
  • 952
  • 3
  • 12
  • 31

1 Answers1

1

It looks like you need to change your project to use the .NET framework version 4.5 on the project properties page:

enter image description here

Word of warning this may result in more warnings or errors depending on the .NET APIs you use.

chief7
  • 14,263
  • 14
  • 47
  • 80
  • That's the weird thing. I doubled checked the Target Framework of the projects and they are correct. What I think has happened is that the MSBuild has moved out of TFS and so it doesn't have access to everything during the build. – Tim Feb 19 '16 at 21:01
  • How are you referencing DevExpress? I always try to use Nuget packages when available to avoid installing components and dealing with version mismatches. If its a Nuget package you can either check it in with the code or use Nuget restore to ensure you get the right version. – chief7 Feb 19 '16 at 21:16
  • I also always use Nuget package. However for this, Nuget only has DevExtreme. I needed the entire DevExpress package. So I had to install to my machine. I then have all of the .dlls referenced in my build's External Reference folder. This all worked great until upgrading to version 15.4.5. So as un update I was able to get passed the above errors. You were actually right in the beginning. I overlooked that ONE of my projects were still referencing .NET Framework 3.5. I made this change and got rid of my original errors. I have errors saying assemblies cant be found. I will keep digging. – Tim Feb 19 '16 at 22:40