1

Resolved

Please target as low a version of .NET as possible

description

At changesets 65477 and 65478, the projects were upgraded to Visual Studio 2010 and the versions were bumped from 2.0 and 3.5 to 4.0.
 
The problem with that is a project that must target, say, .NET version 3.5 (for legacy reasons) can not reference SharpBITS.Base.dll. It is possible to develop and compile with Visual Studio 2010 and the newest C# compiler and related tools, but still target an older framework version.
 
This can be as simple as changing the following line in SharpBITS.Base.csproj (I picked version 3.5 to be consistent with my example):
@@ -22,7 +22,7 @@
 <UpgradeBackupLocation>
 </UpgradeBackupLocation>
 <OldToolsVersion>3.5</OldToolsVersion>
  • <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
  • <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
    <PublishUrl>publish\</PublishUrl>
    <Install>true</Install>
    <InstallFrom>Disk</InstallFrom>
     
    ...or can be done from within Visual Studio itself by a right-click on the project > Properties > Application > Target framework.
     
    Alternately, you could do what James does with his Newtonsoft.Json NuGet package and bundle assemblies targeting multiple frameworks at once, but that's more work. :)
     
    Thanks!
  • Oli

comments

wrote Sep 28, 2012 at 5:46 PM

Associated with changeset 81751.

wrote Sep 28, 2012 at 6:16 PM

wrote Sep 28, 2012 at 6:17 PM

wrote Sep 28, 2012 at 6:22 PM

wrote Feb 14, 2013 at 8:11 PM

wrote May 16, 2013 at 9:58 AM

wrote May 16, 2013 at 9:59 AM

wrote Jun 14, 2013 at 7:15 AM