Skip to content

Commit

Permalink
Merge pull request #95 from egvijayanand/working
Browse files Browse the repository at this point in the history
Support for NuGet CPM option from within VS IDE
  • Loading branch information
egvijayanand authored Jun 24, 2024
2 parents 78e9876 + 19c13fd commit eb1674f
Show file tree
Hide file tree
Showing 30 changed files with 216 additions and 274 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@
"$schema": "http://json.schemastore.org/vs-2017.3.host",
"icon": "ide/icon.png",
"symbolInfo": [
{
"id": "central-pkg-mgmt",
"name": {
"text": "Use _NuGet Central Package Management (CPM)"
},
"isVisible": true,
"defaultValue": "false"
},
{
"id": "razor-class-library",
"name": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,19 +55,19 @@
"replaces": "DOTNET_TFM",
"defaultValue": "net8.0"
},
"razor-class-library": {
"central-pkg-mgmt": {
"type": "parameter",
"datatype": "bool",
"defaultValue": "false",
"description": "Option to create a Razor Class Library (RCL) to abstract Razor components.",
"displayName": "Option to create a _Razor Class Library (RCL) to abstract Razor components"
"description": "Option to configure NuGet Central Package Management (CPM).",
"displayName": "Option to configure _NuGet Central Package Management (CPM)"
},
"central-pkg-mgmt": {
"razor-class-library": {
"type": "parameter",
"datatype": "bool",
"defaultValue": "false",
"description": "Option to configure NuGet Central Package Management (CPM).",
"displayName": "Option to configure NuGet Central Package Management (CPM)"
"description": "Option to create a Razor Class Library (RCL) to abstract Razor components.",
"displayName": "Option to create a _Razor Class Library (RCL) to abstract Razor components"
},
"frameworkLower": {
"type": "generated",
Expand Down Expand Up @@ -117,6 +117,10 @@
"type": "computed",
"value": "(central-pkg-mgmt)"
},
"SolnFile": {
"type": "computed",
"value": "(!no-solution-file)"
},
"HostIdentifier": {
"type": "bind",
"binding": "HostIdentifier"
Expand All @@ -138,22 +142,19 @@
],
"modifiers": [
{
"condition": "(no-solution-file || !(HostIdentifier == \"dotnetcli\" || HostIdentifier == \"dotnetcli-preview\"))",
"condition": "(!(SolnFile || RazorLib))",
"exclude": [
"BlazorWinForms.1.sln"
]
},
{
"condition": "(!CentralPkgMgmt || !(HostIdentifier == \"dotnetcli\" || HostIdentifier == \"dotnetcli-preview\"))",
"condition": "(!CentralPkgMgmt)",
"exclude": [
"Directory.Packages.props"
]
},
{
"condition": "(RazorLib)",
"exclude": [
"BlazorWinForms.1.sln"
],
"rename": {
"Data/WeatherForecast.cs": "BlazorWinForms.1.RazorLib/Data/WeatherForecast.cs",
"Data/WeatherForecastService.cs": "BlazorWinForms.1.RazorLib/Data/WeatherForecastService.cs",
Expand Down Expand Up @@ -193,16 +194,14 @@
"wwwroot/css/open-iconic/README.md": "BlazorWinForms.1/wwwroot/css/open-iconic/README.md",
"wwwroot/css/app.css": "BlazorWinForms.1/wwwroot/css/app.css",
"wwwroot/favicon.ico": "BlazorWinForms.1/wwwroot/favicon.ico",
"wwwroot/index.html": "BlazorWinForms.1/wwwroot/index.html",
"BlazorWinForms.1.RazorLib.sln": "BlazorWinForms.1.sln"
"wwwroot/index.html": "BlazorWinForms.1/wwwroot/index.html"
}
},
{
"condition": "(!RazorLib)",
"exclude": [
"BlazorWinForms.1.RazorLib/BlazorWinForms.1.RazorLib.csproj",
"BlazorWinForms.1.RazorLib/_Imports.razor",
"BlazorWinForms.1.RazorLib.sln"
"BlazorWinForms.1.RazorLib/_Imports.razor"
],
"rename": {
"BlazorWinForms.1/_Imports.razor": "_Imports.razor"
Expand Down

This file was deleted.

6 changes: 6 additions & 0 deletions src/BlazorTemplatesCLI/BlazorWinForms/BlazorWinForms.1.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@
<ImplicitUsings>enable</ImplicitUsings>
<RootNamespace>BlazorWinForms._1</RootNamespace>
</PropertyGroup>
<!--#if (CentralPkgMgmt && SolnFile && !RazorLib)-->

<ItemGroup>
<None Remove="Directory.Packages.props" />
</ItemGroup>
<!--#endif-->

<ItemGroup>
<!--#if (CentralPkgMgmt)-->
Expand Down
13 changes: 13 additions & 0 deletions src/BlazorTemplatesCLI/BlazorWinForms/BlazorWinForms.1.sln
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,15 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.30114.105
MinimumVisualStudioVersion = 10.0.40219.1
#if (RazorLib)
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BlazorWinForms.1", "BlazorWinForms.1\BlazorWinForms.1.csproj", "{BFE86658-D849-4D16-9254-B6375A7C11E5}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BlazorWinForms.1.RazorLib", "BlazorWinForms.1.RazorLib\BlazorWinForms.1.RazorLib.csproj", "{C94ED45B-38CD-4ACB-B35D-71D65C816C27}"
EndProject
#else
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BlazorWinForms.1", "BlazorWinForms.1.csproj", "{BFE86658-D849-4D16-9254-B6375A7C11E5}"
EndProject
#endif
#if (CentralPkgMgmt)
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{1D17E9ED-22F1-4992-AE45-B8507EFD6950}"
ProjectSection(SolutionItems) = preProject
Expand All @@ -25,5 +32,11 @@ Global
{BFE86658-D849-4D16-9254-B6375A7C11E5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BFE86658-D849-4D16-9254-B6375A7C11E5}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BFE86658-D849-4D16-9254-B6375A7C11E5}.Release|Any CPU.Build.0 = Release|Any CPU
#if (RazorLib)
{C94ED45B-38CD-4ACB-B35D-71D65C816C27}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C94ED45B-38CD-4ACB-B35D-71D65C816C27}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C94ED45B-38CD-4ACB-B35D-71D65C816C27}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C94ED45B-38CD-4ACB-B35D-71D65C816C27}.Release|Any CPU.Build.0 = Release|Any CPU
#endif
EndGlobalSection
EndGlobal
14 changes: 7 additions & 7 deletions src/BlazorTemplatesCLI/BlazorWinForms/Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,19 @@
</PropertyGroup>
<ItemGroup>
<!--#if (Net9)-->
<PackageVersion Include="Microsoft.AspNetCore.Components.Web" Version="9.0.0-preview.4.24267.6" />
<PackageVersion Include="Microsoft.AspNetCore.Components.WebView.WindowsForms" Version="9.0.0-preview.4.10690" />
<PackageVersion Include="Microsoft.Extensions.Hosting" Version="9.0.0-preview.4.24266.19" />
<PackageVersion Include="Microsoft.AspNetCore.Components.Web" Version="9.0.0-preview.5.24306.11" />
<PackageVersion Include="Microsoft.AspNetCore.Components.WebView.WindowsForms" Version="9.0.0-preview.5.24307.10" />
<PackageVersion Include="Microsoft.Extensions.Hosting" Version="9.0.0-preview.5.24306.7" />
<!--#elif (Net8)-->
<PackageVersion Include="Microsoft.AspNetCore.Components.Web" Version="8.0.5" />
<PackageVersion Include="Microsoft.AspNetCore.Components.WebView.WindowsForms" Version="8.0.40" />
<PackageVersion Include="Microsoft.AspNetCore.Components.Web" Version="8.0.6" />
<PackageVersion Include="Microsoft.AspNetCore.Components.WebView.WindowsForms" Version="8.0.60" />
<PackageVersion Include="Microsoft.Extensions.Hosting" Version="8.0.0" />
<!--#elif (Net7)-->
<PackageVersion Include="Microsoft.AspNetCore.Components.Web" Version="7.0.19" />
<PackageVersion Include="Microsoft.AspNetCore.Components.Web" Version="7.0.20" />
<PackageVersion Include="Microsoft.AspNetCore.Components.WebView.WindowsForms" Version="7.0.101" />
<PackageVersion Include="Microsoft.Extensions.Hosting" Version="7.0.1" />
<!--#else-->
<PackageVersion Include="Microsoft.AspNetCore.Components.Web" Version="6.0.30" />
<PackageVersion Include="Microsoft.AspNetCore.Components.Web" Version="6.0.31" />
<PackageVersion Include="Microsoft.AspNetCore.Components.WebView.WindowsForms" Version="6.0.553" />
<PackageVersion Include="Microsoft.Extensions.Hosting" Version="6.0.1" />
<!--#endif-->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@
"$schema": "http://json.schemastore.org/vs-2017.3.host",
"icon": "ide/icon.png",
"symbolInfo": [
{
"id": "central-pkg-mgmt",
"name": {
"text": "Use _NuGet Central Package Management (CPM)"
},
"isVisible": true,
"defaultValue": "false"
},
{
"id": "razor-class-library",
"name": {
Expand Down
29 changes: 14 additions & 15 deletions src/BlazorTemplatesCLI/BlazorWpf/.template.config/template.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,19 +55,19 @@
"replaces": "DOTNET_TFM",
"defaultValue": "net8.0"
},
"razor-class-library": {
"central-pkg-mgmt": {
"type": "parameter",
"datatype": "bool",
"defaultValue": "false",
"description": "Option to create a Razor Class Library (RCL) to abstract Razor components.",
"displayName": "Option to create a _Razor Class Library (RCL) to abstract Razor components"
"description": "Option to configure NuGet Central Package Management (CPM).",
"displayName": "Option to configure NuGet Central Package Management (CPM)"
},
"central-pkg-mgmt": {
"razor-class-library": {
"type": "parameter",
"datatype": "bool",
"defaultValue": "false",
"description": "Option to configure NuGet Central Package Management (CPM).",
"displayName": "Option to configure NuGet Central Package Management (CPM)"
"description": "Option to create a Razor Class Library (RCL) to abstract Razor components.",
"displayName": "Option to create a _Razor Class Library (RCL) to abstract Razor components"
},
"frameworkLower": {
"type": "generated",
Expand Down Expand Up @@ -117,6 +117,10 @@
"type": "computed",
"value": "(central-pkg-mgmt)"
},
"SolnFile": {
"type": "computed",
"value": "(!no-solution-file)"
},
"HostIdentifier": {
"type": "bind",
"binding": "HostIdentifier"
Expand All @@ -138,22 +142,19 @@
],
"modifiers": [
{
"condition": "(no-solution-file || !(HostIdentifier == \"dotnetcli\" || HostIdentifier == \"dotnetcli-preview\"))",
"condition": "(!(SolnFile || RazorLib))",
"exclude": [
"BlazorWpf.1.sln"
]
},
{
"condition": "(!CentralPkgMgmt || !(HostIdentifier == \"dotnetcli\" || HostIdentifier == \"dotnetcli-preview\"))",
"condition": "(!CentralPkgMgmt)",
"exclude": [
"Directory.Packages.props"
]
},
{
"condition": "(RazorLib)",
"exclude": [
"BlazorWpf.1.sln"
],
"rename": {
"Data/WeatherForecast.cs": "BlazorWpf.1.RazorLib/Data/WeatherForecast.cs",
"Data/WeatherForecastService.cs": "BlazorWpf.1.RazorLib/Data/WeatherForecastService.cs",
Expand Down Expand Up @@ -195,16 +196,14 @@
"wwwroot/css/open-iconic/README.md": "BlazorWpf.1/wwwroot/css/open-iconic/README.md",
"wwwroot/css/app.css": "BlazorWpf.1/wwwroot/css/app.css",
"wwwroot/favicon.ico": "BlazorWpf.1/wwwroot/favicon.ico",
"wwwroot/index.html": "BlazorWpf.1/wwwroot/index.html",
"BlazorWpf.1.RazorLib.sln": "BlazorWpf.1.sln"
"wwwroot/index.html": "BlazorWpf.1/wwwroot/index.html"
}
},
{
"condition": "(!RazorLib)",
"exclude": [
"BlazorWpf.1.RazorLib/BlazorWpf.1.RazorLib.csproj",
"BlazorWpf.1.RazorLib/_Imports.razor",
"BlazorWpf.1.RazorLib.sln"
"BlazorWpf.1.RazorLib/_Imports.razor"
],
"rename": {
"BlazorWpf.1/_Imports.razor": "_Imports.razor"
Expand Down
55 changes: 0 additions & 55 deletions src/BlazorTemplatesCLI/BlazorWpf/BlazorWpf.1.RazorLib.sln

This file was deleted.

6 changes: 6 additions & 0 deletions src/BlazorTemplatesCLI/BlazorWpf/BlazorWpf.1.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@
<ImplicitUsings>enable</ImplicitUsings>
<RootNamespace>BlazorWpf._1</RootNamespace>
</PropertyGroup>
<!--#if (CentralPkgMgmt && SolnFile && !RazorLib)-->

<ItemGroup>
<None Remove="Directory.Packages.props" />
</ItemGroup>
<!--#endif-->

<ItemGroup>
<!--#if (CentralPkgMgmt)-->
Expand Down
13 changes: 13 additions & 0 deletions src/BlazorTemplatesCLI/BlazorWpf/BlazorWpf.1.sln
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,15 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.30114.105
MinimumVisualStudioVersion = 10.0.40219.1
#if (RazorLib)
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BlazorWpf.1", "BlazorWpf.1\BlazorWpf.1.csproj", "{F7B43479-A7C7-4021-BDD2-2C7F90604B4A}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BlazorWpf.1.RazorLib", "BlazorWpf.1.RazorLib\BlazorWpf.1.RazorLib.csproj", "{A5AE4880-77B8-43F6-B7F9-76D6F94D54A6}"
EndProject
#else
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BlazorWpf.1", "BlazorWpf.1.csproj", "{F7B43479-A7C7-4021-BDD2-2C7F90604B4A}"
EndProject
#endif
#if (CentralPkgMgmt)
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{1D17E9ED-22F1-4992-AE45-B8507EFD6950}"
ProjectSection(SolutionItems) = preProject
Expand All @@ -25,5 +32,11 @@ Global
{F7B43479-A7C7-4021-BDD2-2C7F90604B4A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F7B43479-A7C7-4021-BDD2-2C7F90604B4A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F7B43479-A7C7-4021-BDD2-2C7F90604B4A}.Release|Any CPU.Build.0 = Release|Any CPU
#if (RazorLib)
{A5AE4880-77B8-43F6-B7F9-76D6F94D54A6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A5AE4880-77B8-43F6-B7F9-76D6F94D54A6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A5AE4880-77B8-43F6-B7F9-76D6F94D54A6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A5AE4880-77B8-43F6-B7F9-76D6F94D54A6}.Release|Any CPU.Build.0 = Release|Any CPU
#endif
EndGlobalSection
EndGlobal
Loading

0 comments on commit eb1674f

Please sign in to comment.