|
1 | 1 | <Project Sdk="Microsoft.NET.Sdk">
|
2 | 2 |
|
3 | 3 | <PropertyGroup>
|
4 |
| - <TargetFrameworks>netstandard2.0;netcoreapp3.0;net461</TargetFrameworks> |
5 |
| - <TargetFrameworks Condition="'$(OS)' != 'Windows_NT'">netstandard2.0</TargetFrameworks> |
| 4 | + <TargetFrameworks>netstandard2.0;netcoreapp3.1;net461;net5.0</TargetFrameworks> |
| 5 | + <TargetFrameworks Condition="'$(OS)' != 'Windows_NT'">netstandard2.0;net5.0;netcoreapp3.1</TargetFrameworks> |
6 | 6 | <PackageId>Jering.Javascript.NodeJS</PackageId>
|
7 | 7 | <Authors>JeremyTCD</Authors>
|
8 | 8 | <Title>Invoke Javascript in NodeJS, from C#</Title>
|
|
21 | 21 | <GenerateDocumentationFile>true</GenerateDocumentationFile>
|
22 | 22 | <PackageIconUrl>https://raw.githubusercontent.com/JeringTech/Javascript.NodeJS/master/nuget_icon.png</PackageIconUrl>
|
23 | 23 | <CodeAnalysisRuleSet>../../Jering.Javascript.NodeJS.ruleset</CodeAnalysisRuleSet>
|
24 |
| - <HttpServerSourceName Condition="'$(TargetFramework)' == 'netcoreapp3.0'">Http20Server.js</HttpServerSourceName> |
25 |
| - <HttpServerSourceName Condition="'$(TargetFramework)' != 'netcoreapp3.0'">Http11Server.js</HttpServerSourceName> |
| 24 | + <HttpServerSourceName Condition="'$(TargetFramework)' == 'netcoreapp3.1' Or '$(TargetFramework)' == 'net5.0'">Http20Server.js</HttpServerSourceName> |
| 25 | + <HttpServerSourceName Condition="'$(TargetFramework)' != 'netcoreapp3.1' And '$(TargetFramework)' != 'net5.0'">Http11Server.js</HttpServerSourceName> |
26 | 26 | <HttpServerBundleName>HttpServer.js</HttpServerBundleName>
|
27 | 27 | <!-- Exclude Javascript\bin and Javascript\node_modules from project - https://github.com/dotnet/cli/issues/7525 -->
|
28 | 28 | <DefaultItemExcludes>Javascript\bin\**;Javascript\node_modules\**;$(DefaultItemExcludes)</DefaultItemExcludes>
|
|
80 | 80 | </EmbeddedResource>
|
81 | 81 | </ItemGroup>
|
82 | 82 |
|
83 |
| - <!-- TODO one target per bundle or one target for all bundles? will have to generalize webpack.config if one target per bundle. --> |
84 | 83 | <!--
|
85 | 84 | Notes on BeforeTargets: DispatchToInnerBuilds only runs if we're multi-targeting. PreBuildEvent runs before builds for each framework.
|
86 | 85 | If BeforeTargets contains only DispatchToInnerBuilds and we specify a framework when we call dotnet build, JavascriptBuild does not run.
|
87 | 86 | If BeforeTargets contains only PreBuildEvent and we multi-target, JavascriptBuild runs multiple times in parallel.
|
88 | 87 | So we must specify both. This way if we are multi-targeting, JavascriptBuild runs once, before DispatchToInnerBuilds after which inputs == outputs.
|
89 | 88 | If we aren't multi-targeting, JavascriptBuild runs before PreBuildEvent.
|
90 | 89 | -->
|
91 |
| - <Target Name="JavascriptBuildNonWindows" BeforeTargets="PreBuildEvent" Inputs="@(JavascriptInputs)" Outputs="@(JavascriptOutputs)" Condition="'$(OS)' != 'Windows_NT'"> |
92 |
| - <Yarn WorkingDirectory=".\Javascript" Command="run build --env.mode=$(Configuration) --env.entry=.\Servers\OutOfProcess\Http\Http11Server.ts" /> |
93 |
| - <Yarn WorkingDirectory=".\Javascript" Command="run build --env.mode=$(Configuration) --env.entry=.\Servers\OutOfProcess\Http\Http20Server.ts" /> |
94 |
| - </Target> |
95 |
| - |
96 |
| - <Target Name="JavascriptBuildWindows" BeforeTargets="DispatchToInnerBuilds" Inputs="@(JavascriptInputs)" Outputs="@(JavascriptOutputs)" Condition="'$(OS)' == 'Windows_NT'"> |
| 90 | + <Target Name="JavascriptBuildWindows" BeforeTargets="DispatchToInnerBuilds" Inputs="@(JavascriptInputs)" Outputs="@(JavascriptOutputs)"> |
97 | 91 | <Yarn WorkingDirectory=".\Javascript" Command="run build --env.mode=$(Configuration) --env.entry=.\Servers\OutOfProcess\Http\Http11Server.ts" />
|
98 | 92 | <Yarn WorkingDirectory=".\Javascript" Command="run build --env.mode=$(Configuration) --env.entry=.\Servers\OutOfProcess\Http\Http20Server.ts" />
|
99 | 93 | </Target>
|
|
0 commit comments