Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VS2022 #75

Merged
merged 6 commits into from
Feb 2, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions .vssbe
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@
"#[var libCore = #[var numSBE]]",
"#[var libCoreInt = $([System.Convert]::ToInt32(\"$(libCore.Replace('.', '0'))\"))]#[\" v0.12.5 -> 1205 \"]",
"",
"#[var cfgSDK = #[( $(Configuration) =^ \"_SDK15\" ) {15} else {10} ]]",
"",
"#[var vssbeConf = $(Configuration:vsSolutionBuildEvent)]",
"#[var cfgSDK = $(vssbeConf.Trim('RELDBGCI_SK'))]",
"",
"",
"#[var tplVersion = // This code was generated by a vsSolutionBuildEvent. ",
Expand Down Expand Up @@ -193,13 +193,17 @@
"",
"#[var vsixvnum = #[var numSBE]]",
"",
"#[( $(Configuration) ^= \"RCI_\" ) {",
"#[( $(IsRCI) ) {",
" #[var numSBE = #[var numSBE].#[var revBuild]]",
"}]",
" $(fRCI = 'RCI/')",
"}",
"else{ $(fRCI = '') }]",
"",
"#[File replace.Regexp(\"#[var pDir]/sdk10.vsixmanifest\", \"<Version>[0-9.]+</Version>\", \"<Version>#[var vsixvnum]</Version>\")]",
"",
"#[File replace.Regexp(\"#[var pDir]/sdk15.vsixmanifest\", \"(<Identity.*?) Version=\\\"[0-9.]+\\\"\", \"$1 Version=\\\"#[var vsixvnum]\\\"\")]",
"",
"#[File replace.Regexp(\"#[var pDir]/sdk17.vsixmanifest\", \"(<Identity.*?) Version=\\\"[0-9.]+\\\"\", \"$1 Version=\\\"#[var vsixvnum]\\\"\")]",
""
]
}
Expand Down Expand Up @@ -330,7 +334,7 @@
"#[var buildInfo = vsSolutionBuildEvent #[var numSBE]+#[var bSha1]",
"",
"",
"Configuration: #[var cfgFull] ( #[var cfg] )",
"Configuration: #[var fRCI]#[var cfgFull] ( #[var cfg] )",
"SDK base: #[var cfgSDK]",
"",
"Sha1: #[var bSha1]",
Expand Down
14 changes: 9 additions & 5 deletions Bridge/Bridge.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,21 @@
<RootNamespace>net.r_eg.vsSBE.Bridge</RootNamespace>
</PropertyGroup>

<ItemGroup Condition="'$(VsSbeSdkBase)'=='10'">
<ItemGroup Condition="'$(VsSbeSdkBase)' == '17'">
<PackageReference Include="Microsoft.VisualStudio.Interop" Version="$(MicrosoftVisualStudioInteropVersion)" ExcludeAssets="runtime" />
</ItemGroup>

<ItemGroup Condition="'$(VsSbeSdkBase)' == '15'">
<PackageReference Include="Microsoft.VisualStudio.Shell.Interop" Version="$(MicrosoftVisualStudioShellInteropVersion)" />
</ItemGroup>

<ItemGroup Condition="'$(VsSbeSdkBase)' == '10'">
<Reference Include="Microsoft.VisualStudio.Shell.Interop, Version=7.1.40304.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<HintPath>..\packages\vsSBE.SDK.$(vsSBE_SDK)\lib\$(Sdk10libTarget)\Microsoft.VisualStudio.Shell.Interop.dll</HintPath>
<Private>True</Private>
</Reference>
</ItemGroup>

<ItemGroup Condition="'$(VsSbeSdkBase)'=='15'">
<PackageReference Include="Microsoft.VisualStudio.Shell.Interop" Version="$(MicrosoftVisualStudioShellInteropVersion)" />
</ItemGroup>

<ItemGroup>
<Content Include="changelog.txt" />
</ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions CI.MSBuild/CI.MSBuild.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
<ProjectReference Include="..\MvsSln\MvsSln\MvsSln.csproj">
<Project>{F905DFB2-2E67-4FF7-9001-924F6F2D645D}</Project>
<Name>MvsSln</Name>
<AdditionalProperties Condition="'$(IsVSSDK15)'!='true'">TargetFramework=net40</AdditionalProperties>
<AdditionalProperties Condition="'$(IsVSSDK15)'=='true'">TargetFramework=netstandard2.0</AdditionalProperties>
<AdditionalProperties Condition="'$(VsSbeSdkBase)' == '10'">TargetFramework=net40</AdditionalProperties>
<AdditionalProperties Condition="'$(VsSbeSdkBase)' >= '15'">TargetFramework=netstandard2.0</AdditionalProperties>
</ProjectReference>
</ItemGroup>
<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion CI.MSBuild/Initializer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ public ILibrary load(InitializerProperties prop)
protected void header()
{
log.info($"{Environment.NewLine} vsSolutionBuildEvent");
log.info( " Copyright (c) 2013-2021 Denis Kuzmin <x-3F@outlook.com> github/3F");
log.info( " Copyright (c) 2013-2022 Denis Kuzmin <x-3F@outlook.com> github/3F");
log.info($" CI.MSBuild: {System.Diagnostics.FileVersionInfo.GetVersionInfo(Assembly.GetExecutingAssembly().Location).ProductVersion}");
log.info($" https://github.com/3F/vsSolutionBuildEvent {Environment.NewLine}");
}
Expand Down
22 changes: 7 additions & 15 deletions Devenv/Devenv.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,16 @@
<NoStandardLibraries>false</NoStandardLibraries>
</PropertyGroup>

<PropertyGroup Condition="'$(VsSbeSdkBase)' >= '15'">
<EnableDefaultItems>false</EnableDefaultItems>
</PropertyGroup>

<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
</ItemGroup>

<ItemGroup Condition="'$(VsSbeSdkBase)'=='10'">
<ItemGroup Condition="'$(VsSbeSdkBase)' == '10'">
<Reference Include="EnvDTE, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<EmbedInteropTypes>False</EmbedInteropTypes>
<HintPath>..\packages\vsSBE.SDK.$(vsSBE_SDK)\lib\$(Sdk10libTarget)\EnvDTE.dll</HintPath>
Expand Down Expand Up @@ -44,24 +48,12 @@
</Reference>
</ItemGroup>

<ItemGroup Condition="'$(VsSbeSdkBase)'=='15'">
<PackageReference Include="envdte" Version="$(EnvDteVersion)" />
<PackageReference Include="envdte80" Version="$(EnvDte80Version)" />
<PackageReference Include="Microsoft.VisualStudio.OLE.Interop" Version="$(MicrosoftVisualStudioOLEInteropVersion)" />
<PackageReference Include="Microsoft.VisualStudio.Shell.Interop" Version="$(MicrosoftVisualStudioShellInteropVersion)" />
<Reference Include="Microsoft.VisualStudio.Shell.10.0">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\vsSBE.SDK.$(vsSBE_SDK)\lib\$(Sdk15libTarget)\Microsoft.VisualStudio.Shell.10.0.dll</HintPath>
<Private>True</Private>
</Reference>
</ItemGroup>

<ItemGroup>
<ItemGroup Condition="'$(VsSbeSdkBase)' == '10'">
<ProjectReference Include="..\Bridge\Bridge.csproj" />
<ProjectReference Include="..\Provider\Provider.csproj" />
</ItemGroup>

<ItemGroup>
<ItemGroup Condition="'$(VsSbeSdkBase)' == '10'">
<Content Include="changelog.txt" />
<Content Include="Devenv.AddIn">
<SubType>Designer</SubType>
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2013-2021 Denis Kuzmin <x-3F@outlook.com> github/3F
Copyright (c) 2013-2022 Denis Kuzmin <x-3F@outlook.com> github/3F
Copyright (c) vsSolutionBuildEvent contributors https://github.com/3F/vsSolutionBuildEvent

GNU LESSER GENERAL PUBLIC LICENSE
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
to service projects, libraries, build processes, runtime environment of the Visual Studio, MSBuild Tools, and …

```r
Copyright (c) 2013-2021 Denis Kuzmin <x-3F@outlook.com> github/3F
Copyright (c) 2013-2022 Denis Kuzmin <x-3F@outlook.com> github/3F
```

[ 「 <sub>@</sub> ☕ 」 ](https://3F.github.io/Donation/) [![LGPLv3](https://img.shields.io/badge/license-LGPLv3-008033.svg)](LICENSE)
Expand Down
8 changes: 8 additions & 0 deletions appveyor-build.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
@echo off

setlocal
cd tools
call netfx4sdk -mode sys
endlocal

build %*
38 changes: 38 additions & 0 deletions appveyor-tests.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
@echo off
echo Usage: %~nx0 [configuration name or nothing to test all]

set "cfg=%~1"
set ciLogger=Appveyor.TestLogger -Version 2.0.0
set tcmd=dotnet test --no-build --no-restore --test-adapter-path:. --logger:Appveyor

::::::::::::::::::::

setlocal
cd CI.MSBuild.Test
nuget install %ciLogger%
endlocal
setlocal
cd vsSolutionBuildEventTest
nuget install %ciLogger%
endlocal

if not defined cfg (

call %tcmd% -c REL_SDK10 CI.MSBuild.Test
call %tcmd% -c REL_SDK15 CI.MSBuild.Test
call %tcmd% -c REL_SDK17 CI.MSBuild.Test

call %tcmd% -c REL_SDK10 vsSolutionBuildEventTest
call %tcmd% -c REL_SDK15 vsSolutionBuildEventTest
call %tcmd% -c REL_SDK17 vsSolutionBuildEventTest

) else (
call %tcmd% -c %cfg% CI.MSBuild.Test
call %tcmd% -c %cfg% vsSolutionBuildEventTest
)

exit /B 0

:err
echo. Build failed. 1>&2
exit /B 1
17 changes: 7 additions & 10 deletions build.bat
Original file line number Diff line number Diff line change
@@ -1,21 +1,18 @@
@echo off
echo Usage: %~nx0 [RCI flag] [configuration name or nothing to build all]
echo DBG == Debug; REL == Release; + _SDK10/15/17
if "%~1"=="RCI" ( set "IsRCI=1" & set "cfg=%~2" ) else ( set "IsRCI=" & set "cfg=%~1" )

REM https://github.com/3F/vsSolutionBuildEvent/pull/45#issuecomment-506754001
set hMSBuild=-notamd64

set cim=packages\vsSolutionBuildEvent\cim.cmd -vsw-priority Microsoft.NetCore.Component.SDK
::::::::::::::::::::
set __p_call=1

call tools\gnt /p:ngconfig="tools/packages.config" || goto err

:: Build
set bnode=%cim% %hMSBuild% /m:7 /p:Platform="Any CPU" /v:m

:: DBG == Debug; REL == Release; RCI == CI Release; + _SDK10/15
set cfg=%~1
set bnode=packages\vsSolutionBuildEvent\cim.cmd -vsw-priority Microsoft.NetCore.Component.SDK /m:7 /v:m /p:Platform="Any CPU"
if not defined cfg (

call %bnode% /p:Configuration=REL_SDK10 || goto err
call %bnode% /p:Configuration=REL_SDK15 || goto err
call %bnode% /p:Configuration=REL_SDK17 || goto err

) else call %bnode% /p:Configuration=%cfg% || goto err

Expand Down
18 changes: 13 additions & 5 deletions common.props
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@

<VsSbeTfmSdk10>net40</VsSbeTfmSdk10>
<VsSbeTfmSdk15>net472</VsSbeTfmSdk15>
<VsSbeTfmSdk17>$(VsSbeTfmSdk15)</VsSbeTfmSdk17>

<!-- For a non-SDK-stlye projects using TargetFrameworkVersion property -->
<VsSbeTfmVersionSdk10>v4.0</VsSbeTfmVersionSdk10>
<VsSbeTfmVersionSdk15>v4.7.2</VsSbeTfmVersionSdk15>
<VsSbeTfmVersionSdk17>$(VsSbeTfmVersionSdk15)</VsSbeTfmVersionSdk17>

</PropertyGroup>

Expand All @@ -23,7 +25,7 @@
</PropertyGroup>

<PropertyGroup>
<Configurations>DBG_SDK10;DBG_SDK15;REL_SDK10;REL_SDK15</Configurations>
<Configurations>DBG_SDK10;REL_SDK10;DBG_SDK15;REL_SDK15;DBG_SDK17;REL_SDK17</Configurations>
<Configuration Condition="'$(Configuration)'==''">DBG_SDK10</Configuration>
<Platform Condition="'$(Platform)'==''">AnyCPU</Platform>
</PropertyGroup>
Expand All @@ -44,19 +46,25 @@
<PropertyGroup Condition="$(Configuration.Contains('SDK10'))">
<TargetFrameworks Condition="'$(UsingMicrosoftNETSdk)'=='true'">$(VsSbeTfmSdk10)</TargetFrameworks>
<TargetFrameworkVersion Condition="'$(UsingMicrosoftNETSdk)'!='true'">$(VsSbeTfmVersionSdk10)</TargetFrameworkVersion>
<DefineConstants>NET_40;$(DefineConstants)</DefineConstants>
<DefineConstants>$(DefineConstants);NET_40;SDK10</DefineConstants>
<SdklibTarget>net40</SdklibTarget>
<VsSbeSdkBase>10</VsSbeSdkBase>
<IsVSSDK15>false</IsVSSDK15>
</PropertyGroup>

<PropertyGroup Condition="$(Configuration.Contains('SDK15'))">
<TargetFrameworks Condition="'$(UsingMicrosoftNETSdk)'=='true'">$(VsSbeTfmSdk15)</TargetFrameworks>
<TargetFrameworkVersion Condition="'$(UsingMicrosoftNETSdk)'!='true'">$(VsSbeTfmVersionSdk15)</TargetFrameworkVersion>
<SdklibTarget>net45</SdklibTarget>
<VsSbeSdkBase>15</VsSbeSdkBase>
<IsVSSDK15>true</IsVSSDK15>
<DefineConstants>$(DefineConstants);VSSDK_15_AND_NEW;CODE_ANALYSIS</DefineConstants>
<DefineConstants>$(DefineConstants);SDK15_OR_HIGH;SDK15;CODE_ANALYSIS</DefineConstants>
</PropertyGroup>

<PropertyGroup Condition="$(Configuration.Contains('SDK17'))">
<TargetFrameworks Condition="'$(UsingMicrosoftNETSdk)'=='true'">$(VsSbeTfmSdk17)</TargetFrameworks>
<TargetFrameworkVersion Condition="'$(UsingMicrosoftNETSdk)'!='true'">$(VsSbeTfmVersionSdk17)</TargetFrameworkVersion>
<SdklibTarget>net45</SdklibTarget>
<VsSbeSdkBase>17</VsSbeSdkBase>
<DefineConstants>$(DefineConstants);SDK15_OR_HIGH;SDK17;CODE_ANALYSIS</DefineConstants>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)' == 'Debug' Or $(Configuration.Contains('DBG_'))">
Expand Down
2 changes: 1 addition & 1 deletion inc/modules/common.props
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
<Copyright Condition="'$(Copyright)'==''">Copyright (c) 2013-2021 Denis Kuzmin &lt;x-3F@outlook.com&gt; github/3F</Copyright>
<DocumentationFile>$(OutputPath)$(AssemblyName).xml</DocumentationFile>
<Configurations>DBG_SDK10;DBG_SDK15;REL_SDK10;REL_SDK15</Configurations>
<Configurations>DBG_SDK10;REL_SDK10;DBG_SDK15;REL_SDK15;DBG_SDK17;REL_SDK17</Configurations>
<OverrideLSenderConfigurations>$(Configurations)</OverrideLSenderConfigurations>
<NoWarn>1701;1702;CS1591</NoWarn>
<LangVersion>latest</LangVersion>
Expand Down
5 changes: 4 additions & 1 deletion inc/tests/LSender/LSenderTest/LSenderTest.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">

<Import Project="..\common.props" />

<PropertyGroup>
<DefineConstants>LSR_FEATURE_S_VECTOR;$(DefineConstants)</DefineConstants>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="$(IncModulesDir)LSender\LSender.csproj" />
<ProjectReference Include="..\DepA\DepA.csproj" />
Expand Down
2 changes: 1 addition & 1 deletion inc/tests/SobaScript.Z.VSTest/SobaScript.Z.VSTest.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<AssemblyOriginatorKeyFile>$(RepoDirRoot)SobaScript.Z.VS\SobaScript.Z.VSTest\key.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Moq" Version="4.13.0" />
<PackageReference Include="Moq" Version="$(MoqVersion)" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion inc/tests/common.props
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>$(RepoDirRoot)com.github.3F.test.snk</AssemblyOriginatorKeyFile>
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
<Configurations>DBG_SDK10;DBG_SDK15;REL_SDK10;REL_SDK15</Configurations>
<Configurations>DBG_SDK10;REL_SDK10;DBG_SDK15;REL_SDK15;DBG_SDK17;REL_SDK17</Configurations>
<OverrideLSenderConfigurations>$(Configurations)</OverrideLSenderConfigurations>
<NoWarn>1701;1702;CS1591</NoWarn>
<LangVersion>latest</LangVersion>
Expand Down
Loading