Skip to content

Commit 09ce2f2

Browse files
committed
Setting ReferenceOutputAssembly to falso on references to esproj
Esprojs may be referenced by ASP.Net projects (or others). When this happens, the .net project will have to not reference output assembly on the esproj, because there is no output assembly. This targets provides that behavior. There was an argument for putting this in this file instead of in the sdk. The discussion can be found here: dotnet/sdk#34983
1 parent 3c910ba commit 09ce2f2

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

src/Tasks/Microsoft.Common.CurrentVersion.targets

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!--
1+
<!--
22
***********************************************************************************************
33
Microsoft.Common.CurrentVersion.targets
44
@@ -1511,6 +1511,22 @@ Copyright (C) Microsoft Corporation. All rights reserved.
15111511
============================================================
15121512
-->
15131513
<Target Name="AfterResolveReferences"/>
1514+
1515+
<!--
1516+
============================================================
1517+
IgnoreJavaScriptOutputAssembly
1518+
1519+
esproj are JavaScript or TypeScript Projects that never produce an assembly.
1520+
Set ReferenceOutputAssembly to false in any reference to an esproj.
1521+
============================================================
1522+
-->
1523+
<Target Name="IgnoreJavaScriptOutputAssembly" BeforeTargets="AssignProjectConfiguration">
1524+
<ItemGroup>
1525+
<ProjectReference Condition="'%(Extension)' == '.esproj'">
1526+
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
1527+
</ProjectReference>
1528+
</ItemGroup>
1529+
</Target>
15141530

15151531
<!--
15161532
============================================================

0 commit comments

Comments
 (0)