You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This build pack currently only supports discovering csproj, fsproj, and vbproj files (see source). Additionally, this build pack only detects the need for node/npm when it sees either referenced in a Target/Exec/Command XML element hierarchy (see source).
Microsoft / Visual Studio also has esproj files, which are used for JavaScript projects. esproj files also don't use a Target/Exec/Command structure because it's hidden behind the Microsoft.VisualStudio.JavaScript.Sdk SDK, and instead an esproj file looks like:
<ProjectSdk="Microsoft.VisualStudio.JavaScript.Sdk/0.5.128-alpha">
<PropertyGroup>
<StartupCommand>npm run dev</StartupCommand>
<JavaScriptTestRoot>src\</JavaScriptTestRoot>
<JavaScriptTestFramework>Jest</JavaScriptTestFramework>
<!-- Allows the build (or compile) script located on package.json to run on Build -->
<ShouldRunBuildScript>false</ShouldRunBuildScript>
<!-- Folder where production build objects will be placed -->
<PublishAssetsDirectory>$(MSBuildProjectDirectory)\dist</PublishAssetsDirectory>
</PropertyGroup>
</Project>
A file extension by itself is not truly indicative of a dependency on node/npm, but fairly likely.
Look for usage of the Microsoft.VisualStudio.JavaScript.Sdk SDK in any project file?
Usage of the SDK would be a better indicator of needing the node/npm commands.
Look for package.json files, similar to how the npm-install build pack detects its need (see source)?
This may be a bit of a stretch for this build pack without a direct linkage to some .NET project / solution.
Motivation
With lack of support for esproj files, it requires developers to add unnecessary customizations to other project files in order for node/npm to be detected as being necessary and available during a build, similar to a MSBuild Target like what's in the Angular MSBuild .csproj file:
<ErrorCondition="'$(ErrorCode)' != '0'"Text="Node.js is required to build and run this project. To continue, please install Node.js from https://nodejs.org/, and then restart your command prompt or IDE." />
<MessageImportance="high"Text="Restoring dependencies using 'npm'. This may take several minutes..." />
. In the case of the ASP.NET React template, this would mean adding customizations to the server csproj file, in order for the client esproj to be built feasibly.
The text was updated successfully, but these errors were encountered:
Describe the Enhancement
This build pack currently only supports discovering
csproj
,fsproj
, andvbproj
files (see source). Additionally, this build pack only detects the need for node/npm when it sees either referenced in aTarget
/Exec
/Command
XML element hierarchy (see source).Microsoft / Visual Studio also has
esproj
files, which are used for JavaScript projects.esproj
files also don't use aTarget
/Exec
/Command
structure because it's hidden behind theMicrosoft.VisualStudio.JavaScript.Sdk
SDK, and instead anesproj
file looks like:For reference of
esproj
files, please see:Possible Solutions
One, or a combination, of the following:
Look for
esproj
files in FindProjectFileA file extension by itself is not truly indicative of a dependency on node/npm, but fairly likely.
Look for usage of the
Microsoft.VisualStudio.JavaScript.Sdk
SDK in any project file?Usage of the SDK would be a better indicator of needing the node/npm commands.
Look for
package.json
files, similar to how thenpm-install
build pack detects its need (see source)?This may be a bit of a stretch for this build pack without a direct linkage to some .NET project / solution.
Motivation
With lack of support for
esproj
files, it requires developers to add unnecessary customizations to other project files in order for node/npm to be detected as being necessary and available during a build, similar to a MSBuildTarget
like what's in the Angular MSBuild.csproj
file:dotnet-publish/integration/testdata/angular_msbuild/angular_msbuild.csproj
Lines 24 to 32 in 982a8ad
csproj
file, in order for the clientesproj
to be built feasibly.The text was updated successfully, but these errors were encountered: