Skip to content

Commit

Permalink
net40, net46, net472, netstandard2.0, netcoreapp2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
3F committed Oct 11, 2019
1 parent 6e8947c commit a7c9fd2
Show file tree
Hide file tree
Showing 4 changed files with 78 additions and 33 deletions.
7 changes: 7 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@

# Our batch files requires CRLF for correct work.
# https://github.com/3F/hMSBuild/issues/2

*.bat text eol=crlf
*.cmd text eol=crlf
*.tpl text eol=crlf
55 changes: 25 additions & 30 deletions .vssbe
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
"Mode": {
"$type": "net.r_eg.vsSBE.Events.ModeScript, vsSolutionBuildEvent",
"Type": "Script",
"Command": "#[($(Configuration) == \"PublicRelease\") {\n #[$(cfgname = 'Release')]\n $(isCIBuild = true)\n}\nelse{\n #[$(cfgname = $(Configuration))]\n}]\n\n#[$(dbin = \"bin/$(cfgname)/\")]\n\n$(revDeltaBase = \"2017/06/22\")\n$(revDeltaMin = $([System.Math]::Pow(10, 3)))\n$(revDeltaMax = 65534) #[\" limit of AssemblyVersion - 65534 max allowed ! that is 65536 (0-65535) is not a correct range, (2^16 - 2) \"]\n\n$$(netstamp = $(TargetFrameworkVersion.Replace('v', '').Replace('.', '')))\n\n$(pDir = \"MvsSln\")\n$(odir = \"$(dbin)raw/\")\n\n#[var +revBuild]\n#[var +bSha1]\n#[var +bName]\n#[var +bRevc]\n\n#[var pVer = #[File get(\".version\")]]\n\n##[IO delete.directory(\"$(dbin)\", true)]\n#[IO copy.directory(\"\", \"$(dbin)\", true)]",
"Command": "#[($(Configuration) == \"PublicRelease\") {\n #[$(cfgname = 'Release')]\n $(isCIBuild = true)\n}\nelse{\n #[$(cfgname = $(Configuration))]\n}]\n\n#[$(dbin = \"bin/$(cfgname)/\")]\n\n$(revDeltaBase = \"2017/06/22\")\n$(revDeltaMin = $([System.Math]::Pow(10, 3)))\n$(revDeltaMax = 65534) #[\" limit of AssemblyVersion - 65534 max allowed ! that is 65536 (0-65535) is not a correct range, (2^16 - 2) \"]\n\n$$(netstamp = $(TargetFrameworkVersion.Replace('v', '').Replace('.', '')))\n\n$(pDir = \"MvsSln\")\n$(odir = \"$(dbin)raw\")\n\n#[var +revBuild]\n#[var +bSha1]\n#[var +bName]\n#[var +bRevc]\n\n#[var pVer = #[File get(\".version\")]]\n\n##[IO delete.directory(\"$(dbin)\", true)]\n#[IO copy.directory(\"\", \"$(dbin)\", true)]",
"Command__": [
"#[($(Configuration) == \"PublicRelease\") {",
" #[$(cfgname = 'Release')]",
Expand All @@ -110,7 +110,7 @@
"$$(netstamp = $(TargetFrameworkVersion.Replace('v', '').Replace('.', '')))",
"",
"$(pDir = \"MvsSln\")",
"$(odir = \"$(dbin)raw/\")",
"$(odir = \"$(dbin)raw\")",
"",
"#[var +revBuild]",
"#[var +bSha1]",
Expand Down Expand Up @@ -393,7 +393,7 @@
"Mode": {
"$type": "net.r_eg.vsSBE.Events.ModeScript, vsSolutionBuildEvent",
"Type": "Script",
"Command": "#[IO copy.file(\n \"$(SolutionDir)tools/*.*\", \n \"$(odir)/tools/\", \n true, \n {\"*.nuspec\"})]\n\n##[IO copy.file(\"tools/MvsSln.nuspec\", \"$(odir)/MvsSln.nuspec\", true)]\n##[IO copy.file(\"$(pDir)/$(OutputPath:$(pDir))/*.*\", \n \"$(odir)/lib/net$(netstamp)/\", true)]\n\n#[IO copy.file(\n {\"License.txt\", \"Readme.md\", \"changelog.txt\", \".version\", \"$(pDir)/obj/build-info.txt\"}, \n \"$(odir)/\", true\n)]\n\n#[IO copy.file\n(\n \"$(pDir)/$(OutputPath:$(pDir))/net40/*.*\", \n \"$(odir)/lib/net40/\", \n true,\n {\"*.json\"}\n)]\n\n#[IO copy.file\n(\n \"$(pDir)/$(OutputPath:$(pDir))/netstandard2.0/*.*\", \n \"$(odir)/lib/netstandard2.0/\", \n true, \n {\"*.json\"}\n)]\n\n\n",
"Command": "#[IO copy.file(\n \"$(SolutionDir)tools/*.*\", \n \"$(odir)/tools/\", \n true, \n {\"*.nuspec\"})]\n\n##[IO copy.file(\"tools/MvsSln.nuspec\", \"$(odir)/MvsSln.nuspec\", true)]\n##[IO copy.file(\"$(pDir)/$(OutputPath:$(pDir))/*.*\", \n \"$(odir)/lib/net$(netstamp)/\", true)]\n\n#[IO copy.file(\n {\"License.txt\", \"3rd-party.txt\", \"Readme.md\", \"changelog.txt\", \".version\", \"$(pDir)/obj/build-info.txt\"}, \n \"$(odir)/\", true\n)]\n\n#[$(_targets = $(TargetFrameworks))]\n#[$(_loop = true)]\n\n#[Box iterate(i = 0; $(_loop); i += 1): \n #[try\n {\n \n #[$(_target = $(_targets.Split(\";\")[$(i)]))]\n \n #[IO copy.file\n (\n \"$(pDir)/$(OutputPath:$(pDir))/$(_target)/*.*\", \n \"$(odir)/lib/$(_target)/\", \n true,\n {\"*.json\"}\n )]\n }\n catch { $(_loop = false) }]\n]\n",
"Command__": [
"#[IO copy.file(",
" \"$(SolutionDir)tools/*.*\", ",
Expand All @@ -406,27 +406,29 @@
" \"$(odir)/lib/net$(netstamp)/\", true)]",
"",
"#[IO copy.file(",
" {\"License.txt\", \"Readme.md\", \"changelog.txt\", \".version\", \"$(pDir)/obj/build-info.txt\"}, ",
" {\"License.txt\", \"3rd-party.txt\", \"Readme.md\", \"changelog.txt\", \".version\", \"$(pDir)/obj/build-info.txt\"}, ",
" \"$(odir)/\", true",
")]",
"",
"#[IO copy.file",
"(",
" \"$(pDir)/$(OutputPath:$(pDir))/net40/*.*\", ",
" \"$(odir)/lib/net40/\", ",
" true,",
" {\"*.json\"}",
")]",
"",
"#[IO copy.file",
"(",
" \"$(pDir)/$(OutputPath:$(pDir))/netstandard2.0/*.*\", ",
" \"$(odir)/lib/netstandard2.0/\", ",
" true, ",
" {\"*.json\"}",
")]",
"",
"#[$(_targets = $(TargetFrameworks))]",
"#[$(_loop = true)]",
"",
"#[Box iterate(i = 0; $(_loop); i += 1): ",
" #[try",
" {",
" ",
" #[$(_target = $(_targets.Split(\";\")[$(i)]))]",
" ",
" #[IO copy.file",
" (",
" \"$(pDir)/$(OutputPath:$(pDir))/$(_target)/*.*\", ",
" \"$(odir)/lib/$(_target)/\", ",
" true,",
" {\"*.json\"}",
" )]",
" }",
" catch { $(_loop = false) }]",
"]",
""
]
}
Expand Down Expand Up @@ -454,7 +456,7 @@
"Mode": {
"$type": "net.r_eg.vsSBE.Events.ModeScript, vsSolutionBuildEvent",
"Type": "Script",
"Command": "##[IO replace(\"$(odir)/MvsSln.nuspec\", \"{build_info}\", \"$(buildInfo)\")]\n\n##[NuGet gnt.raw(\"/t:pack /p:ngin=\\\"$(odir)\\\" /p:ngout=\\\"$(dbin)\\\"\")]\n\n#[($(revBuild) == \"\" || $(revBuild) ~= \"*\") {\n #[$(zipname = \"MvsSln.$(pVer).zip\")]\n}\nelse {\n #[$(zipname = \"MvsSln.$(pVer).$(revBuild)+$(bSha1).zip\")]\n}]\n\n#[7z pack.files({ \n \"$(odir)\\\\lib\\\\netstandard2.0\\\\*.*\",\n \"$(odir)\\\\lib\\\\net40\\\\*.*\",\n \"$(odir)\\\\tools\\\\*.*\",\n \"$(odir)\\\\*.*\"\n }, \n \"$(dbin)\\\\$(zipname)\", \n { \"$(odir)\\\\*.nuspec\" })]\n \n#[IO copy.file\n(\n \"$(pDir)/$(OutputPath:$(pDir))/*$(pVer).nupkg\",\n \"$(dbin)/\", \n true \n)]",
"Command": "##[IO replace(\"$(odir)/MvsSln.nuspec\", \"{build_info}\", \"$(buildInfo)\")]\n\n##[NuGet gnt.raw(\"/t:pack /p:ngin=\\\"$(odir)\\\" /p:ngout=\\\"$(dbin)\\\"\")]\n\n#[($(revBuild) == \"\" || $(revBuild) ~= \"*\") {\n #[$(zipname = \"MvsSln.$(pVer).zip\")]\n}\nelse {\n #[$(zipname = \"MvsSln.$(pVer).$(revBuild)+$(bSha1).zip\")]\n}]\n\n#[7z pack.directory(\"$(odir)\", \"$(dbin)\\\\$(zipname)\")]\n\n#[IO copy.file\n(\n \"$(pDir)/$(OutputPath:$(pDir))/*$(pVer).nupkg\",\n \"$(dbin)/\", \n true \n)]",
"Command__": [
"##[IO replace(\"$(odir)/MvsSln.nuspec\", \"{build_info}\", \"$(buildInfo)\")]",
"",
Expand All @@ -467,15 +469,8 @@
" #[$(zipname = \"MvsSln.$(pVer).$(revBuild)+$(bSha1).zip\")]",
"}]",
"",
"#[7z pack.files({ ",
" \"$(odir)\\\\lib\\\\netstandard2.0\\\\*.*\",",
" \"$(odir)\\\\lib\\\\net40\\\\*.*\",",
" \"$(odir)\\\\tools\\\\*.*\",",
" \"$(odir)\\\\*.*\"",
" }, ",
" \"$(dbin)\\\\$(zipname)\", ",
" { \"$(odir)\\\\*.nuspec\" })]",
" ",
"#[7z pack.directory(\"$(odir)\", \"$(dbin)\\\\$(zipname)\")]",
"",
"#[IO copy.file",
"(",
" \"$(pDir)/$(OutputPath:$(pDir))/*$(pVer).nupkg\",",
Expand Down
33 changes: 33 additions & 0 deletions 3rd-party.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
MvsSln [ https://github.com/3F/MvsSln ]
- - - - - - - - - - - - - - - - - - - - -

# Third-party software components


## MvsSln and its various packages may* include or reference:
(*- specific target platforms or some complex archives)

* Microsoft Build
https://github.com/microsoft/msbuild

* hMSBuild
https://github.com/3F/hMSBuild

* GetNuTool
https://github.com/3F/GetNuTool


## Dev Dependencies includes the following tools for src:

* vsSolutionBuildEvent
https://github.com/3F/vsSolutionBuildEvent

* MSTest Framework
https://github.com/microsoft/testfx

* hMSBuild
https://github.com/3F/hMSBuild

* GetNuTool
https://github.com/3F/GetNuTool

16 changes: 13 additions & 3 deletions MvsSln/MvsSln.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
</PropertyGroup>

<PropertyGroup>
<TargetFrameworks>netstandard2.0;net40</TargetFrameworks>
<TargetFrameworks>netcoreapp2.1;netstandard2.0;net472;net46;net40</TargetFrameworks>
<RootNamespace>net.r_eg.MvsSln</RootNamespace>
<AssemblyName>MvsSln</AssemblyName>
<SignAssembly>true</SignAssembly>
Expand Down Expand Up @@ -73,6 +73,10 @@
<Pack>True</Pack>
<PackagePath></PackagePath>
</None>
<None Include="..\3rd-party.txt">
<Pack>True</Pack>
<PackagePath></PackagePath>
</None>
<None Include="..\Readme.md">
<Pack>True</Pack>
<PackagePath></PackagePath>
Expand Down Expand Up @@ -104,14 +108,20 @@
</None>
</ItemGroup>

<!-- GAC -->
<ItemGroup Condition=" '$(TargetFramework)' == 'net40' ">
<Reference Include="Microsoft.CSharp" />
<Reference Include="Microsoft.Build" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' ">
<ItemGroup Condition=" '$(TargetFramework)' != 'net40' ">
<PackageReference Include="Microsoft.CSharp" Version="4.6.0" />
<PackageReference Include="Microsoft.Build" Version="15.9.20" />

<!-- Microsoft.Build -->
<PackageReference Version="16.3.0" Condition=" 'netcoreapp2.1' == '$(TargetFramework)' " Include="Microsoft.Build" />
<PackageReference Version="15.9.20" Condition=" 'netstandard2.0' == '$(TargetFramework)' " Include="Microsoft.Build" />
<PackageReference Version="16.3.0" Condition=" 'net472' == '$(TargetFramework)' " Include="Microsoft.Build" />
<PackageReference Version="15.9.20" Condition=" 'net46' == '$(TargetFramework)' " Include="Microsoft.Build" />
</ItemGroup>

</Project>

0 comments on commit a7c9fd2

Please sign in to comment.