-
Notifications
You must be signed in to change notification settings - Fork 446
MSBuildifying gulpified node #237
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nit: suggest changing extension to There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I started with .proj but VS refused to add it to the solution. Hence changing to project to pretend it's a .csproj |
||
<Project Sdk="Microsoft.NET.Sdk"> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this even a typescript project? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Probably don't need to reference Microsoft.NET.Sdk. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Similar to above - it makes project references work. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. To clarify - currently there is no Typescript support/tooling for VS2017. I wanted to see what they did in previous versions and if you create a "Typescript project" in VS2015 it will be a *.csproj. I tried using their MSBuild tasks from VS2015 but they are compiled against .NET Framework and "our" MSBuild could not load them. When they have tools for VS2017 and netcore MSBuild tasks we need to make sure that there is an easy way to use the latest version of the compiler (i.e. you don't have to reinstall typescript MSBuild/tools if you want to move to a new compiler version) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
<Import Project="..\..\build\common.props" /> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>netstandard1.0</TargetFramework> | ||
<IsPackable>false</IsPackable> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup> | ||
<SignalRClientDistFolder>$(MSBuildThisFileDirectory)..\..\dist\</SignalRClientDistFolder> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<Inputs Include="*.ts;" /> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not sure how well VS does with this project. You might try using There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. VS showed the files just fine. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I was also able to build the ts client. |
||
<Outputs Include="@(Inputs -> '$(SignalRClientDistFolder)src\%(FileName).d.ts')" /> | ||
<Outputs Include="@(Inputs -> '$(SignalRClientDistFolder)src\%(FileName).js')" /> | ||
<Outputs Include="$(SignalRClientDistFolder)browser\signalr-client.js" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<None Include="tsconfig.json" /> | ||
</ItemGroup> | ||
|
||
<!-- this target relies on npm packages being restored manually or when running full build --> | ||
<Target Name="BuildTSClient" Inputs="@(Inputs)" Outputs="@(Outputs)" BeforeTargets="Build"> | ||
<Exec Command="npm run gulp -- --gulpfile $(MSBuildThisFileDirectory)gulpfile.js build-ts-client" /> | ||
</Target> | ||
|
||
<Target Name="CleanTSClient" AfterTargets="Clean"> | ||
<RemoveDir Directories="$(SignalRClientDistFolder)" /> | ||
</Target> | ||
</Project> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Try adding
ReferenceOutputAssembly="false"
to all ProjectReference to the TS project. This will suppress NuGet attempting to use the project reference as a compile reference.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Turned out that I can't do that. With this settings I can build from command line but when I build with VS it fails to build the project due to:
Cannot find project info for 'C:\Source\SignalR-Core\src\Microsoft.AspNetCore.SignalR.Client.TS\Microsoft.AspNetCore.SignalR.Client.TS.csproj'. This can indicate a missing project reference.