I notice that Visual Studio 2010 database projects have a re-distributable component to support the deployment on end-user systems.
Will this component work against .Net 3.5, or does it require .Net 4.0?
From what I can tell, Visual Studio 2010 database projects will require .Net 4.0 on the target machine. If you inspect the redistributable components in %ProgramFiles%\Microsoft Visual Studio 10.0\VSTSDB\Deploy using Reflector, you'll see that they all depend on version 4.0.0.0 of the framework libraries.
In addition to this, the .deploymanifest files (which are really MSBuild files in disguise) specify 4.0 as the MSBuild tools version.
It looks like you would need to use Visual Studio Team System 2008 Database Edtion GDR R2 (which of course requires VS 2008) if you want to target .Net 3.5 on the database server.
Related
Our build environment is VS 2015 (ideally) targeting .net 4.0
We have just re-worked our visual studio plugins based on the Visual Studio extensibility project template in VS 2015. The resulting VSIX works great on VS 2015 & 2017 RC1.
However I would like to target the VSIX at VS 2010 (and ideally 2012). This is where the problems start....
VS 2010 uses .net 4.0.
I drop the compiler to .net 4.0
The VS 2015 (4.5) assemblies wont load (i.e. Microsoft.VisualStudio.Shell.14.0).
Thats OK as I don't use anything in them, so I drop the references to them in favour of the version 10.0 (2010) ones.
Great the code compiles.
But the VSIX package does not
1>C:\Program Files
(x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(1820,5):
warning MSB3274: The primary reference
"Microsoft.VisualStudio.Imaging, Version=14.0.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" 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=v4.0".
So the problem seems to be that if I target VS 2010 I need it to build as .net 4.0, but the VS 2015 build script requires .net 4.5.
I'm wondering if its possible to use the VS 2010 build tools in a VS 2015 project? Or must I convert my VS 2015 project back to VS 2010?
UPDATE
Starting to think this is not possible for other reasons...
https://learn.microsoft.com/en-us/visualstudio/extensibility/faq-2017
The new VSIX v3 format is backward compatible with VSIX v2, so you’ll
still be able to have a single VSIX with a single VSIX ID that
supports Visual Studio 2012 and later. The new VSIX v3 format does not
support Visual 2010 and earlier. To support Visual Studio 2010 onward,
you will need to create a separate extension (with a separate VSIX
ID).
I have ran into similar problem, so I have created a Nuget package called VsixUpdater, which can do the VSIX migration automatically if added to a VSIX project, it even works with older versions of Visual Studio (I tested it with 2012), after adding the package the generated VSIX packages will be V3 and 2017 compatible, see https://github.com/axodox/VsixUpdater for details.
Create a seperate project and VSIX for VS 2010 and another for VS 2012 and later. You can have a look at my source here: https://github.com/ErikEJ/SqlCeToolbox
Notice that I require .NET 4.5.1 for my VS 2010 extension also (simply requires that .NET 4.5.1 is present/installed on the PC, and it is built in to Windows 8.1 and later)
In the end I ended up with 2 projects
A project targeting VS 2010 compiled under .Net 4.0 using a version 2.0 manifest (built using VS 2015).
A project targeting VS 2012 + compiled under .Net 4.5
using a version 3.0 manifest (built using VS 2015).
There has been a certain amount of faffing around with references, but it all seems to work. Our only outstanding issue is the code signing, as VS 2015 will not accept anything below SHA256 and VS 2012 will not accept SHA256....
I have a wonderful solution in Visual Studio 2012 with a Web project using WebAPI and a supporting Web Service project for data using Entity Framework (EF) Code First. I was just told I need to see about using Visual Studio 2010.
Is there something I can do to work on this project in Visual Studio 2010?
As Henrick answers: you do not upgrade/downgrade VS installs, rather you install versions side by side.
You note two technologies that might be problematic:
EF Code First: this is supported from 4.1 (or was it 4.2?) which is supported against .NET 4.0 and VS2010. Providing your not using enum or geo/spatial data types (which require .NET 4.5) this should work, but you'll need to ensure you update to the EF5 NuGet package for .NET 4.
WebAPI: This is new in MVC4, which comes with VS2012, but is a separate install for .NET 4/VS2010.
Finally. While some project types with round trip between VS2012 and VS2010 SP1 (you need the service pack) it is not true for all project types. Details are on MSDN.
You can install Visual Studio 2010 separately and open the project and see. There is no danger in having version 2005, 2008, 2010 or 2012 of Visual Studio installed.
I know it's a bit close to
Can I use .NET 4.0 beta in Visual Studio 2008?
But my question is a bit different. I have a project that now uses .NET 4.0 (target .NET Framework 4.0) in Visual Studio 2010. Is it possible to use the project compiled dlls in Visual Studio 2008? How?
I don't want to use .NET4.0 directly in Visual Studio 2008, only the compiled dlls with target .NET Framework 4.0 (this is how my question is different that what has been asked so far).
I know that I was able to use .NET3.5 in Visual Studio 2005. So why not .NET4.0 in Visual Studio 2008?
.NET 3.5 didn't have new versions of mscorlib, System.dll etc - it had new assemblies, but the ones you could use from .NET 2 were the same.
.NET 4 introduces new versions of these core assemblies - and your built DLL will reference those new versions explicitly. Visual Studio 2008 doesn't know about those versions - or the CLR which goes with them.
If you want to use a library in Visual Studio 2008, you should target .NET 3.5 to start with.
Does Visual Studio 2010 Beta support .NET 2.0 projects?
What about opening SQL 2005 *.ndf files with the new IDE?
(meaning mdf files included in the project like App_Data DBs in web applications etc.)
Yes. VS2010 targets .NET Framework 2.0, 3.0, 3.5 and 4.0 (link)
DB projects have been somewhat superceded by the recent GDR R2 Database project release. It's a free download for team editions of Visual Studio 2008
This type of project was originally part of the database edition of Visual Studio.
It has the ability to import a schema from an existing database, perform schema compares, support multiple targets (System Test, UAT, Production, etc), perform TSQL static code analysis, and produce standalone deployment artifacts.
Is there a way to change .NET framework version of Visual Studio 2005 to 3.5?
No. Visual Studio 2005 only supports .NET 2.0 out-of-the-box. It can be updated to support .NET 3.0.
It is possible to compile .NET 3.5 code with a Visual Studio 2008 Express Edition, or without Visual Studio 2008 using Mono and I think the Windows/.NET SDK. However these will obviously not be integrated into Visual Studio 2005.
Visual Studio 2005 only supports .NET 2.0. The format of the solution file (.sln) changed in Visual Studio 2008 to allow you to select the target .NET version.
VS2008/2010 have a visual way of setting the project setting "TargetFrameworkVersion" which makes it easier, however I have found that adding the same tag to a VS2005 project will change the target framework. You might try adding 1(one) of the following into the section of your VS C# project.
<TargetFrameworkVersion>v3.0</TargetFrameworkVersion>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>