Skip to content

Commit 1bb61bc

Browse files
committed
Batch file added to build plugin using VS2010/2012
1 parent d941e7a commit 1bb61bc

3 files changed

Lines changed: 60 additions & 1 deletion

File tree

Plugin/Plugin.csproj

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,20 @@
1212
<RootNamespace>EditorConfig.VisualStudio</RootNamespace>
1313
<AssemblyName>EditorConfigPlugin</AssemblyName>
1414
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
15+
</PropertyGroup>
16+
<!-- Look for the SDK specific to the current version of Visual Studio -->
17+
<PropertyGroup>
18+
<VsSdkTargets>$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v$(VisualStudioVersion)\VSSDK\Microsoft.VsSDK.targets</VsSdkTargets>
19+
<VsSdkTargets Condition=" '$(VisualStudioVersion)' == '' ">$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v10.0\VSSDK\Microsoft.VsSDK.targets</VsSdkTargets>
20+
</PropertyGroup>
21+
<!-- This is needed to prevent forced migrations when opening the project in Vs2012 -->
22+
<PropertyGroup Condition=" '$(VisualStudioVersion)' == '11.0' ">
1523
<MinimumVisualStudioVersion>11.0</MinimumVisualStudioVersion>
1624
</PropertyGroup>
25+
<!-- This is needed to prevent forced migrations when opening the project in Vs2013 -->
26+
<PropertyGroup Condition=" '$(VisualStudioVersion)' == '12.0' ">
27+
<MinimumVisualStudioVersion>12.0</MinimumVisualStudioVersion>
28+
</PropertyGroup>
1729
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
1830
<DebugSymbols>true</DebugSymbols>
1931
<DebugType>full</DebugType>
@@ -22,8 +34,9 @@
2234
<DefineConstants>DEBUG;TRACE</DefineConstants>
2335
<ErrorReport>prompt</ErrorReport>
2436
<WarningLevel>4</WarningLevel>
25-
<DeployExtension>True</DeployExtension>
2637
<PlatformTarget>x86</PlatformTarget>
38+
<CreateVsixContainer>True</CreateVsixContainer>
39+
<DeployExtension>True</DeployExtension>
2740
</PropertyGroup>
2841
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
2942
<DebugType>pdbonly</DebugType>
@@ -33,6 +46,8 @@
3346
<ErrorReport>prompt</ErrorReport>
3447
<WarningLevel>4</WarningLevel>
3548
<PlatformTarget>x86</PlatformTarget>
49+
<CreateVsixContainer>True</CreateVsixContainer>
50+
<DeployExtension>True</DeployExtension>
3651
</PropertyGroup>
3752
<ItemGroup>
3853
<Compile Include="ListenerBase.cs" />

build.VS2010.cmd

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
@echo off
2+
3+
cd /d "%~p0"
4+
5+
set PATH=%PATH%;%ProgramFiles%\CMake 2.8\bin
6+
7+
cd Core
8+
cmake . -G "Visual Studio 10" -DMSVC_MD=ON -DBUILD_DOCUMENTATION=OFF
9+
IF ERRORLEVEL 1 EXIT /B 1
10+
cd ..
11+
12+
set msbuild="%windir%\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe"
13+
set msbuildparams=/p:Configuration=Release /t:Rebuild /nologo /v:m
14+
15+
%msbuild% Core\editorconfig.sln %msbuildparams%
16+
IF ERRORLEVEL 1 EXIT /B 1
17+
18+
%msbuild% EditorConfig.VisualStudio.sln /p:PlatformToolset=v100 /p:Platform="Win32" %msbuildparams%
19+
IF ERRORLEVEL 1 EXIT /B 1
20+
21+
echo.
22+
pause

build.VS2012.cmd

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
@echo off
2+
3+
cd /d "%~p0"
4+
5+
set PATH=%PATH%;%ProgramFiles%\CMake 2.8\bin
6+
7+
cd Core
8+
cmake . -G "Visual Studio 11" -DMSVC_MD=ON -DBUILD_DOCUMENTATION=OFF
9+
IF ERRORLEVEL 1 EXIT /B 1
10+
cd ..
11+
12+
set msbuild="%programfiles(x86)%\MSBuild\12.0\Bin\MSBuild.exe"
13+
set msbuildparams=/p:Configuration=Release /t:Rebuild /nologo /v:m
14+
15+
%msbuild% Core\editorconfig.sln %msbuildparams%
16+
IF ERRORLEVEL 1 EXIT /B 1
17+
18+
%msbuild% EditorConfig.VisualStudio.sln /p:PlatformToolset=v110 /p:Platform="Win32" %msbuildparams%
19+
IF ERRORLEVEL 1 EXIT /B 1
20+
21+
echo.
22+
pause

0 commit comments

Comments
 (0)