Visual Studio 2015: Create VSTO project for Office 2010 and above that targets .NET 3.5
Asked Answered
P

3

6

Is it possible to create VSTO project for Office 2010 and above that targets .NET 3.5 in Visual Studio 2015?

When I try to create it I don't see any project templates: 1

If I change version of .NET Framework to 4.0 or above then I can see project templates for Office 2010: 2

I have Windows 10 with activated .NET 3.5 feature, VS 2015 Enterprise.

Piperonal answered 4/9, 2015 at 9:25 Comment(4)
Not sure if this can be considered an answer or not, but I've had some trouble with getting and installer and a .VSTO add in to work. but I did in the end... Basically the way I think it works is, publish your add in like normal, project - publish. Then go to the output folder of the publish, note the folder structure and the files. In Visual studio, add new project to add in project, of other project type - Setup project. Then in the file system, in the application files, add the "Application files" Folder which is in your published add in folder, along with everything as is. If they have a..Baumann
... if they have a folder called 'dog' with 2 files in it, in visual studio, add those folders and files as they are. Then hit build, find your .exe in my documents, visual studio, projects, your project, bin, debug or release, and there it is. Once you run that setup, by default it will install to C:\program files(x86)\default company name\... But I think from there, once you've installed the msi or exe in my documents, excel should now have the add in... If I'm not mistaken...Baumann
Oh ya, you totally have to download office tools for visual studio - visualstudio.com/en-us/features/office-tools-vs.aspxBaumann
And here's the plugin for creating setup projects - visualstudiogallery.msdn.microsoft.com/…Baumann
P
1

MSDN says that we cannot develop VSTO Addins that targets .NET 3.5 since Visual Studio 2012: 1

For more information, please, see "Visual Studio Tools for Office Runtime Installation Scenarios":

Piperonal answered 6/9, 2015 at 21:13 Comment(0)
S
0

VSTO allows creating version specific add-ins. Typically each VSTO version supports only two Office versions. I suppose the latest version supports only Office 2013 and Office 2016. That's why you don't see templates for Office 2010. You need to install an old VS version if you need to create a project for Office 2010.

Note, you can run solutions created in VS2015 in previous Office versions. See Running Solutions in Different Versions of Microsoft Office for more information.

Scarron answered 4/9, 2015 at 13:7 Comment(2)
I can create Office 2010 VSTO AddIn in Visual Studio 2015. But the minimum version of .NET Framework is 4.0. I'll update the question with screenshot.Piperonal
This answer is not correct. Because you can create both 2010 and 2013/2015 VSTO add-ins in Visual Studio 2015, but you must install Microsoft Office Developer Tools Preview 2 for Visual Studio 2015 from this link: microsoft.com/en-us/download/details.aspx?id=51683Schuh
C
0

I run into this all the time. I just set up a Windows 7 Virtual Machine with Visual Studio 2010 installed. When I need a new project, I make it on that VM, then copy the files over to my primary hard disk and open them in Visual Studio 2015 Community, which has to have the latest VSTO installed. It takes care of any upgrades necessary (usually), and then do all my work there. I've got Visual Studio 2010 Pro on the Virtual Machine. I'm not sure if you can do it with the free Express version or not.

I always target .NET 4.0 in my projects. Haven't targeted 3.5 in a long time so I don't know if VSTO will work with it or not. I wouldn't be surprised to find you just have to change the .NET version requirement in your Project file and it works, but also wouldn't be surprised if it failed. .NET 3.5 to 4 is a simple and very low risk upgrade, so if you can't get VSTO to work with 3.5, I'd recommend adding a .NET installer to your installer.

Courier answered 23/12, 2015 at 20:2 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.