Skip to content

Commit 4a007ca

Browse files
committed
- Improved documentation: instructions for installing the older VS2015 version
- Fixes to prevent "Incorrect SDK version" in the generated project
1 parent bc6afb3 commit 4a007ca

File tree

7 files changed

+79
-20
lines changed

7 files changed

+79
-20
lines changed

.github/README.md

-13
This file was deleted.

README.md

+52
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
2+
# Visual Studio 2017 openFrameworks plugin
3+
4+
Allows to easily create new openFrameworks projects from inside Visual Studio 2017 and configure the addons in them.
5+
6+
- [Getting started](#getting-started)
7+
- [Contributing](#contributor-guidelines)
8+
- [Previous versions](#previous-versions)
9+
- [Release notes](#release-notes)
10+
11+
## Getting started
12+
13+
For more info on how to use openFrameworks with Visual Studio, check the setup
14+
guide at http://openframeworks.cc/setup/vs
15+
16+
Note that the guide might refer to Visual Studio 2015, but the instructions also apply to Visual Studio 2017.
17+
18+
### Note
19+
This project is an upgraded version from the original [Visual Studio 2015 extension](https://github.com/openframeworks/visualstudioPlugin),
20+
developed by by [@arturo](https://github.com/arturoc).
21+
22+
## Contributor guidelines
23+
24+
```
25+
The information below is for developers looking to contribute to the openFrameworks project creator for Visual Studio.
26+
To learn about how to get started with openFrameworks using Visual Studio check http://openframeworks.cc/setup/vs.
27+
```
28+
29+
To develop this solution further, clone the repo and open /src/VSIXopenFrameworks.sln in Visual Studio.
30+
31+
Running the **VSIXopenFrameworks** project (right-click, Debug, or F5) will start the experimental version of Visual Studio,
32+
which will run having the Visual Studio Extension (vsix) already loaded.
33+
34+
If you are new to Visual Studio Extension, check the documentation at
35+
https://docs.microsoft.com/en-us/visualstudio/extensibility/starting-to-develop-visual-studio-extensions?view=vs-2017.
36+
37+
## Previous versions
38+
39+
The project creator for Visual Studio 2015 is not from the Market Place, meaning it cannot be installed from Visual Studio
40+
Tools menu, Extensions and Updates, Online. If you are still using using VS 2015, you can manually installed the extension
41+
from https://github.com/openframeworks/visualstudioPlugin/tree/vs2015 and installing the VSIX file.
42+
43+
44+
## Release notes
45+
46+
2019-02-15 v0.5
47+
- Upgraded project file to use Visual Studio 2017 (ToolsVersion="15.0").
48+
- Included Contributor Guidelines and Release Notes.
49+
50+
2017-07-10 v0.4
51+
- First working version.Initial publication to Visual Studio Marketplace at
52+
https://marketplace.visualstudio.com/items?itemName=HalfA.openFrameworkspluginforVisualStudio2017

src/Wizard/OFUpdateWizard.cs

+3-3
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,9 @@ public bool ShouldAddProjectItem(string filePath)
6161
return false;
6262
}
6363

64-
private FormAddons inputForm;
65-
private List<string> addons;
64+
//private FormAddons inputForm;
65+
//private List<string> addons;
6666
private EnvDTE.DTE dte;
67-
private string itemName;
67+
//private string itemName;
6868
};
6969
}

src/Wizard/OFWizard.cs

+17
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,25 @@ public void ProjectFinishedGenerating(Project project)
4343
ofProject = Path.Combine(path);
4444
}
4545
dte.Solution.AddFromFile(ofProject);
46+
47+
//Setting the Windows target platform version of the project
48+
//to avoid the error with Windows SDK
49+
//Same problem as described here: https://sharepointforum.org/threads/creating-a-vsix-deployable-c-project-template.142260/
50+
51+
// use VCProject.LatestTargetPlatformVersion property, which is what the stock wizards use.
52+
VCProject vcProject = (VCProject)project.Object;
53+
string wtpv = vcProject.LatestTargetPlatformVersion;
54+
if (wtpv != null)
55+
{
56+
// we only have to do this for a single config, as the property in question is global.
57+
IVCCollection configs = (IVCCollection)vcProject.Configurations;
58+
VCConfiguration firstConfig = (VCConfiguration)configs.Item(1);
59+
IVCRulePropertyStorage rule = (IVCRulePropertyStorage)firstConfig.Rules.Item("ConfigurationGeneral");
60+
rule?.SetPropertyValue("WindowsTargetPlatformVersion", wtpv);
61+
}
4662
}
4763

64+
4865
public void ProjectItemFinishedGenerating(ProjectItem projectItem)
4966
{
5067

src/openFrameworksTemplate/Properties/AssemblyInfo.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
[assembly: AssemblyConfiguration("")]
1111
[assembly: AssemblyCompany("ofarturo")]
1212
[assembly: AssemblyProduct("openFrameworksTemplate")]
13-
[assembly: AssemblyCopyright("Copyright © ofarturo 2015")]
13+
[assembly: AssemblyCopyright("Copyright © ofarturo 2015, H.Scheidl 2017")]
1414
[assembly: AssemblyTrademark("")]
1515
[assembly: AssemblyCulture("")]
1616

src/openFrameworksTemplate/emptyExample.vcxproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2+
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
33
<ItemGroup Label="ProjectConfigurations">
44
<ProjectConfiguration Include="Debug|Win32">
55
<Configuration>Debug</Configuration>

src/source.extension.vsixmanifest

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<PackageManifest Version="2.0.0" xmlns="http://schemas.microsoft.com/developer/vsx-schema/2011" xmlns:d="http://schemas.microsoft.com/developer/vsx-schema-design/2011">
33
<Metadata>
4-
<Identity Id="VSIXopenframeworks2017.A049B6B4-2855-4C1C-A3A6-13ED823BB898" Version="0.4" Language="en-US" Publisher="Arturo Castro, Half Scheidl" />
4+
<Identity Id="VSIXopenframeworks2017.A049B6B4-2855-4C1C-A3A6-13ED823BB898" Version="0.5" Language="en-US" Publisher="Arturo Castro, Half Scheidl" />
55
<DisplayName>openFrameworks plugin for Visual Studio 2017</DisplayName>
66
<Description xml:space="preserve">openFrameworks plugin for Visual Studio 2017</Description>
7+
<MoreInfo>https://openframeworks.cc/</MoreInfo>
78
<License>GPLv3.txt</License>
9+
<GettingStartedGuide>https://openframeworks.cc/setup/vs/</GettingStartedGuide>
810
<Icon>__TemplateIcon.png</Icon>
911
</Metadata>
1012
<Installation>
@@ -23,6 +25,7 @@
2325
<Asset Type="Microsoft.VisualStudio.VsPackage" d:Source="Project" d:ProjectName="%CurrentProject%" Path="|%CurrentProject%;PkgdefProjectOutputGroup|" />
2426
</Assets>
2527
<Prerequisites>
26-
<Prerequisite Id="Microsoft.VisualStudio.Component.CoreEditor" Version="[15.0.26606.0,16.0)" DisplayName="Visual Studio core editor" />
28+
<Prerequisite Id="Microsoft.VisualStudio.Component.CoreEditor" Version="15.6" DisplayName="Visual Studio core editor" />
29+
<Prerequisite Id="Microsoft.VisualStudio.Component.VC.CoreIde" Version="15.6" DisplayName="Visual Studio C++ core features" />
2730
</Prerequisites>
2831
</PackageManifest>

0 commit comments

Comments
 (0)