Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not include the shared framework in the packages #24816

Merged
merged 4 commits into from
Aug 25, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,26 @@
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<!-- Set this to false because assemblies should not reference this assembly directly, (except for tests, of course). -->
<IsProjectReferenceProvider>false</IsProjectReferenceProvider>

<!--
This project compiles against Microsoft.AspNetCore.App from the SDK.
This ensures that it's packaging output is correct and does not include local artifacts.
-->
<UseAspNetCoreSharedRuntime>true</UseAspNetCoreSharedRuntime>
<DoNotApplyWorkaroundsToMicrosoftAspNetCoreApp>true</DoNotApplyWorkaroundsToMicrosoftAspNetCoreApp>
dougbu marked this conversation as resolved.
Show resolved Hide resolved
</PropertyGroup>

<ItemGroup>
<Reference Include="Microsoft.AspNetCore" />
<Reference Include="Microsoft.AspNetCore.Diagnostics" />
<Reference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" />
<Reference Include="Microsoft.AspNetCore.Components.Server" />
<Reference Include="Microsoft.AspNetCore.ResponseCompression" />
<FrameworkReference Include="Microsoft.AspNetCore.App" />

<ProjectReference
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Might be worth a comment about ensuring the latest framework bits exist before resolving the framework ref.

Include="$(RepoRoot)src\Framework\App.Runtime\src\Microsoft.AspNetCore.App.Runtime.csproj"
PrivateAssets="All"
ReferenceOutputAssembly="false"
SkipGetTargetFrameworkProperties="true" />

<Reference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" />
<Compile Include="$(SharedSourceRoot)CommandLineUtils\**\*.cs" />
<Reference Include="Microsoft.Extensions.Hosting" />
</ItemGroup>

<!-- Pack settings -->
Expand All @@ -37,19 +46,5 @@
<NuspecProperty Include="PackageThirdPartyNoticesFile=$(PackageThirdPartyNoticesFile)" />
</ItemGroup>

<Target Name="_FixupRuntimeConfig" BeforeTargets="_GenerateRuntimeConfigurationFilesInputCache">
<ItemGroup>
<_RuntimeFramework Include="@(RuntimeFramework)" />
<RuntimeFramework Remove="@(RuntimeFramework)" />
<RuntimeFramework Include="Microsoft.AspNetCore.App" FrameworkName="Microsoft.AspNetCore.App" Version="5.0.0-preview" />
</ItemGroup>
</Target>

<Target Name="_UndoRuntimeConfigWorkarounds" AfterTargets="GenerateBuildRuntimeConfigurationFiles">
<ItemGroup>
<RuntimeFramework Remove="@(RuntimeFramework)" />
<RuntimeFramework Include="@(_RuntimeFramework)" />
</ItemGroup>
</Target>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,18 @@
</PropertyGroup>

<ItemGroup>
<Reference Include="Microsoft.AspNetCore" />
<Reference Include="Microsoft.AspNetCore.Cors" />
<Reference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" />
<Reference Include="Selenium.Support" />
<Reference Include="Selenium.WebDriver" />
<ProjectReference Include="..\..\..\WebAssembly\DevServer\src\Microsoft.AspNetCore.Components.WebAssembly.DevServer.csproj" />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just curious: Why compile in these files instead of referencing the project❔ Should the files be moved into a Shared directory❔

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm also curious about that :)

My guess is it's something nonobvious about having to run it inside docker. Perhaps @pranavkm can clarify.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I completely lost track of this PR. The M.AspNetCore.App reference in the DevServer project is viral, any project that references it also needs to be able to resolve that reference. Compiling the relevant types by source avoids any further hacks.

<ProjectReference Include="..\TestApp\Wasm.Performance.TestApp.csproj" />
</ItemGroup>

<ItemGroup>
<Compile Include="..\..\..\WebAssembly\DevServer\src\Server\*.cs" />
</ItemGroup>

<Target Name="_AddTestProjectMetadataAttributes" BeforeTargets="BeforeCompile">
<ItemGroup>
<AssemblyAttribute
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
<ProjectReference Include="..\..\WebAssembly\testassets\HostedInAspNet.Client\HostedInAspNet.Client.csproj" />
<ProjectReference Include="..\..\WebAssembly\testassets\HostedInAspNet.Server\HostedInAspNet.Server.csproj" />
<ProjectReference Include="..\..\WebAssembly\testassets\StandaloneApp\StandaloneApp.csproj" />
<ProjectReference Include="..\..\WebAssembly\DevServer\src\Microsoft.AspNetCore.Components.WebAssembly.DevServer.csproj" />
<ProjectReference Include="..\testassets\BasicTestApp\BasicTestApp.csproj" />
<ProjectReference Include="..\testassets\TestServer\Components.TestServer.csproj" />
<ProjectReference Include="..\..\WebAssembly\testassets\Wasm.Authentication.Server\Wasm.Authentication.Server.csproj" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,13 @@
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\..\WebAssembly\DevServer\src\Microsoft.AspNetCore.Components.WebAssembly.DevServer.csproj" />
<ProjectReference Include="..\BasicTestApp\BasicTestApp.csproj" />
</ItemGroup>

<ItemGroup>
<Compile Include="..\..\..\WebAssembly\DevServer\src\Server\*.cs" />
</ItemGroup>

<ItemGroup>
<AssemblyAttribute Include="System.Reflection.AssemblyMetadataAttribute">
<_Parameter1>Microsoft.AspNetCore.Testing.BasicTestApp.ContentRoot</_Parameter1>
Expand Down
6 changes: 6 additions & 0 deletions src/Tools/dotnet-watch/src/DotnetToolSettings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<DotNetCliTool Version="1">
<Commands>
<Command Name="dotnet-watch" EntryPoint="dotnet-watch.dll" Runner="dotnet" />
</Commands>
</DotNetCliTool>
pranavkm marked this conversation as resolved.
Show resolved Hide resolved
31 changes: 14 additions & 17 deletions src/Tools/dotnet-watch/src/dotnet-watch.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@
<!-- This package is for internal use only. It contains a CLI which is bundled in the .NET Core SDK. -->
<IsShippingPackage>false</IsShippingPackage>
<ExcludeFromSourceBuild>false</ExcludeFromSourceBuild>

<!--
This project compiles against Microsoft.AspNetCore.App from the SDK.
This ensures that it's packaging output is correct and does not include local artifacts.
-->
<UseAspNetCoreSharedRuntime>true</UseAspNetCoreSharedRuntime>
<DoNotApplyWorkaroundsToMicrosoftAspNetCoreApp>true</DoNotApplyWorkaroundsToMicrosoftAspNetCoreApp>
</PropertyGroup>

<ItemGroup>
Expand All @@ -20,8 +27,13 @@
</ItemGroup>

<ItemGroup>
<Reference Include="Microsoft.AspNetCore" />
<Reference Include="Microsoft.AspNetCore.WebSockets" />
<FrameworkReference Include="Microsoft.AspNetCore.App" />

<ProjectReference
Include="$(RepoRoot)src\Framework\App.Runtime\src\Microsoft.AspNetCore.App.Runtime.csproj"
PrivateAssets="All"
ReferenceOutputAssembly="false"
SkipGetTargetFrameworkProperties="true" />

<Reference
Include="Microsoft.AspNetCore.Watch.BrowserRefresh"
Expand Down Expand Up @@ -53,19 +65,4 @@
</ItemGroup>
</Target>

<Target Name="_FixupRuntimeConfig" BeforeTargets="_GenerateRuntimeConfigurationFilesInputCache">
<ItemGroup>
<_RuntimeFramework Include="@(RuntimeFramework)" />
<RuntimeFramework Remove="@(RuntimeFramework)" />
<RuntimeFramework Include="Microsoft.AspNetCore.App" FrameworkName="Microsoft.AspNetCore.App" Version="5.0.0-preview" />
</ItemGroup>
</Target>

<Target Name="_UndoRuntimeConfigWorkarounds" AfterTargets="GenerateBuildRuntimeConfigurationFiles">
<ItemGroup>
<RuntimeFramework Remove="@(RuntimeFramework)" />
<RuntimeFramework Include="@(_RuntimeFramework)" />
</ItemGroup>
</Target>

</Project>
8 changes: 8 additions & 0 deletions src/Tools/dotnet-watch/test/dotnet-watch.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@
<AssemblyName>Microsoft.DotNet.Watcher.Tools.Tests</AssemblyName>
<DefaultItemExcludes>$(DefaultItemExcludes);TestProjects\**\*</DefaultItemExcludes>
<TestGroupName>DotNetWatcherToolsTests</TestGroupName>

<!--
This project compiles against Microsoft.AspNetCore.App from the SDK.
This ensures that it's packaging output is correct and does not include local artifacts.
-->
<UseAspNetCoreSharedRuntime>true</UseAspNetCoreSharedRuntime>
<DoNotApplyWorkaroundsToMicrosoftAspNetCoreApp>true</DoNotApplyWorkaroundsToMicrosoftAspNetCoreApp>
</PropertyGroup>

<ItemGroup>
Expand All @@ -14,6 +21,7 @@

<ItemGroup>
<ProjectReference Include="..\src\dotnet-watch.csproj" />
<FrameworkReference Include="Microsoft.AspNetCore.App" />
</ItemGroup>

<ItemGroup>
Expand Down